danielkrupinski / Osiris

Cross-platform game hack for Counter-Strike 2 with Panorama-based GUI.
MIT License
3.36k stars 961 forks source link

chams issue since update 25.02.20 #1154

Closed steel4me closed 4 years ago

steel4me commented 4 years ago

just for info. had a strange thing, one of my five teammates had no chams. i forgot to save screenshot. never had this before, maybe it has something to do with update, also i had strange freezes.

trying to find out more, can someone doublecheck or confirm?

steel4me commented 4 years ago

y, seems to be update ;)

steel4me commented 4 years ago

Ok...thought i can find it easy but with local bot game it doesnt occur, i made a screen from MM, maybe someone have this too?

image

image

ghost commented 4 years ago

custom player models have a different name and are not picked up by chams. https://github.com/danielkrupinski/Osiris/blob/master/Osiris/Hacks/Chams.cpp#L47 modify it to include the new names.

steel4me commented 4 years ago

custom player models have a different name and are not picked up by chams. https://github.com/danielkrupinski/Osiris/blob/master/Osiris/Hacks/Chams.cpp#L47 modify it to include the new names.

makes sense. thank you. i will have a look, any experience about freezes or laggs since update from yesterday?

Evilhelder commented 4 years ago

stil crashing... D:

tamas0313 commented 4 years ago

where to find custom models names?

steel4me commented 4 years ago

stil crashing... D:

i had no crash till now! everything works fine, expect some strange mini laggs / freezes since update and missing custom model names for chams. they just dont draw for that player

EDIT: Okay, i see im just behind some commits from daniel. but i think your crash has nothing to do with this issue

steel4me commented 4 years ago

where to find custom models names?

As far as i know:

For CTs Local CT (SAS) : ctm_sas B Squadron Officer: ctm_sas_variantf Special agent Ava: ctm_fbi_variantb FBI operator: ctm_fbi_variantf Markus Delrow: ctm_fbi_variantg Michael Syfers: ctm_fbi_varianth SEAL Team 6 Soldier: ctm_st6_variante Buckshot: ctm_st6_variantg Lt. Commander Ricksaw: ctm_st6_varianti 3rd Commando Company: ctm_st6_variantk Two Times McCoy: ctm_st6_variantm

For Ts The Elite Mr. Muhlik: tm_leet_variantf Ground Rebel: tm_leet_variantg Osiris: tm_leet_varianth Prof. Shahmat: tm_leet_varianti Local T (Phoenix): tm_phoenix Enforcer: tm_phoenix_variantf Slingshot: tm_phoenix_variantg Soldier: tm_phoenix_varianth Dragomir: tm_balkan_variantf Rezan The Ready: tm_balkan_variantg The Doctor Romanov: tm_balkan_varianth Maximus: tm_balkan_varianti Blackwolf: tm_balkan_variantj

But this is only used for Visuals.cpp with getModel and as far as i understand, has nothing to do with Chams.cpp if (std::strstr(info.model->name, "models/player"))

@xAkiraMiura so, i have to take my statement back, it doesn't make sense...in matchmaking every model should begin with "models/player" and chams should draw, this is ugly to debug, i try to attach console and see what info.model->name gives me back. Terrible thing is, we don't get this reproduced in bot game...maybe in casual, lets see...

ghost commented 4 years ago

bot's don't have custom models. you have to try it with a friend that has a custom model.

steel4me commented 4 years ago

bot's don't have custom models. you have to try it with a friend that has a custom model.

done. And yes, that was what i aldready wrote above! Thats why i took one account with osiris in debug mode and another with AVG sandbox.

Joined both accounts to the same server. With second account i took same CT model from screenshot (Buckshot: ctm_st6_variantg) and chams rendering / drawing was correct.

Output was ...models/player/custom_player/legacy/ctm_st6_variantg.mdl

Something strange is going on.

I don't play much csgo, only matchmaking sometimes. No casual or other modes. Till now, i had this bug only in matchmaking.

Did some offsets / signatures change? Are some Entitys wrong?

tamas0313 commented 4 years ago

bool Chams::render(void ctx, void state, const ModelRenderInfo& info, matrix3x4* customBoneToWorld) const noexcept { if (std::strstr(info.model->name, "models/player")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_sas.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_sas_variantf.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_fbi_variantb.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_fbi_variantf.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_fbi_variantg.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_fbi_varianth.mdl"))
return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_st6_variantg.mdl"))
return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_st6_variante.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_st6_varianti.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_st6_variantk.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/ctm_st6_variantm.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_leet_variantf.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_leet_variantg.mdl"))
return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_leet_varianth.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_leet_varianti.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_phoenix.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_phoenix_variantf.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_phoenix_variantg.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_phoenix_varianth.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_balkan_variantf.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_balkan_variantg.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_balkan_varianth.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_balkan_varianti.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); if (std::strstr(info.model->name, "models/player/custom_player/legacy/tm_balkanvariantj.mdl")) return renderPlayers(ctx, state, info, customBoneToWorld); else if (std::strstr(info.model->name, "sleeve")) renderSleeves(ctx, state, info, customBoneToWorld); else if (std::strstr(info.model->name, "arms")) renderHands(ctx, state, info, customBoneToWorld); else if (std::strstr(info.model->name, "models/weapons/v") && !std::strstr(info.model->name, "tablet") && !std::strstr(info.model->name, "parachute") && !std::strstr(info.model->name, "fists")) renderWeapons(ctx, state, info, customBoneToWorld);

return true;

}

for me working!

steel4me commented 4 years ago

you don't have to do that...interpret it for yourself as "if string contains"... "models/player" inlcudes all your if statements.

ghost commented 4 years ago

in hkDME print every model name that wasn't picked up by an if statement. the model might have been renamed from models/player to something else.

tamas0313 commented 4 years ago

you don't have to do that...interpret it for yourself as "if string contains"... "models/player" inlcudes all your if statements.

can u help me? can you show me ur code?

steel4me commented 4 years ago

in hkDME print every model name that wasn't picked up by an if statement. the model might have been renamed from models/player to something else.

O.K., i try.

can u help me? can you show me ur code?

At the moment i have no solution sorry, I only said that this statement -> if (std::strstr(info.model->name, "models/player")) matches all your other statements, cause, when info.model->name contains "models/player" the if statement will be true already!

tamas0313 commented 4 years ago

ohhhh thank you i understand

ZerGo0 commented 4 years ago

The models with patches are probably causing this issue. I tried to debug it, but I couldn't get anything useful out of my test. I pretty much logged all models in a file, but the missing model wasn't there.

Might sound retarded, but it doesn't seem like drawModelExecute picks them up. ^^

Nvm, it actually picks them up, not really sure why it doesn't apply the chams tbh.

danielkrupinski commented 4 years ago

@ZerGo0 Thanks for the info. I think I've found the cause - we abort chams drawing if material has been overridden (to fix glow not working with chams enabled) https://github.com/danielkrupinski/Osiris/blob/8af4c1366f61e7b3c300a38598ebe17aa9583515/Osiris/Hacks/Chams.cpp#L63 and because patches override player material (just like weapon skins do) chams aren't working.

steel4me commented 4 years ago

The models with patches are probably causing this issue. ~I tried to debug it, but I couldn't get anything useful out of my test. I pretty much logged all models in a file, but the missing model wasn't there.~

~Might sound retarded, but it doesn't seem like drawModelExecute picks them up. ^^~

Nvm, it actually picks them up, not really sure why it doesn't apply the chams tbh.

yesterday i gave up too, after logging everything i was able. but i have not much knowledge as you have.

@ZerGo0 Thanks for the info. I think I've found the cause - we abort chams drawing if material has been overridden (to fix glow not working with chams enabled)

https://github.com/danielkrupinski/Osiris/blob/8af4c1366f61e7b3c300a38598ebe17aa9583515/Osiris/Hacks/Chams.cpp#L63

and because patches override player material (just like weapon skins do) chams aren't working.

That makes sense now. Thank you for explaining.

danielkrupinski commented 4 years ago

Probably fixed in 6c856033c49a4608ad447762f86890ddcc5e21d7

ZerGo0 commented 4 years ago

Probably fixed in 6c85603

Pretty sure that you also have to change this? https://github.com/danielkrupinski/Osiris/blob/6c856033c49a4608ad447762f86890ddcc5e21d7/Osiris/Hooks.cpp#L207