madiskoivopuu / cs2skinchangermenu

5 stars 5 forks source link

Game Crash #3

Open jackKiZhu opened 11 months ago

jackKiZhu commented 11 months ago

I found that when I call InitializeNetvars, the game crashes. If I don't call this function, changing the skin will have no effect.

madiskoivopuu commented 11 months ago

Is the error coming from the FindDeclaredClass function?

jackKiZhu commented 11 months ago

Is the error coming from the FindDeclaredClass function?

I'm not sure if it's the problem, the myfile path is fine, but the game crashes once this function is called!

jackKiZhu commented 11 months ago

Is the error coming from the FindDeclaredClass function?

I'm not sure if it's the problem, the myfile path is fine, but the game crashes once this function is called!

I blocked FindDeclaredClass and the for loop below, so the game wouldn't crash. but C_CSPlayerPawn* pawn = localPlayer->m_hPlayerPawn().GetEnt(); pawn is null,if (!pawn) will return;

madiskoivopuu commented 11 months ago

I'll have to look deeper into it, the GetEnt function is returning the wrong bucket index etc. They might've changed how entity list addressing by handle works.

jackKiZhu commented 11 months ago

I'll have to look deeper into it, the GetEnt function is returning the wrong bucket index etc. They might've changed how entity list addressing by handle works.

Okay, waiting for your good news!

madiskoivopuu commented 11 months ago

Netvars weren't parsed properly and there was an issue with 1 pattern which hadn't been included. Currently theres more bugs than that so the skin changer doesn't work, e.g setting attribute results in a crash.

jackKiZhu commented 11 months ago

I'll have to look deeper into it, the GetEnt function is returning the wrong bucket index etc. They might've changed how entity list addressing by handle works.

LocalPlayer ->m_ Has hPlayerPawn(). GetEnt() been fixed? I consulted other source codes and found that the feature code for obtaining entities is 8B D3 E8? 48 8B F8 48 85 C0 74 76, can you refer to it?

madiskoivopuu commented 11 months ago

LocalPlayer ->m_ Has hPlayerPawn(). GetEnt() been fixed?

Yes, this works now. Netvars all had offset 0 due to a mistake I made in schema.h.

jackKiZhu commented 11 months ago

LocalPlayer ->m_ Has hPlayerPawn(). GetEnt() been fixed?

Yes, this works now. Netvars all had offset 0 due to a mistake I made in schema.h.

Okay, I'll give it a try.

jackKiZhu commented 11 months ago

LocalPlayer ->m_ Has hPlayerPawn(). GetEnt() been fixed?

Yes, this works now. Netvars all had offset 0 due to a mistake I made in schema.h.

Just went to try it, the skin modified the Desert Eagle, and the game crashed when buying weapons.

jackKiZhu commented 11 months ago

LocalPlayer ->m_ Has hPlayerPawn(). GetEnt() been fixed?

Yes, this works now. Netvars all had offset 0 due to a mistake I made in schema.h.

I checked and found that the game crashes as soon as SetStattrak is called. It seems to be because weapon->m_hStattrakEntity(). Set(-1) caused.

madiskoivopuu commented 11 months ago

That netvar wasn't working since they changed the class name. That netvar now works, but stattrak and nametags still cause a crash and I couldn't figure out exactly why. I suggest just not trying to apply nametag or stattrak for now.

jackKiZhu commented 11 months ago

That netvar wasn't working since they changed the class name. That netvar now works, but stattrak and nametags still cause a crash and I couldn't figure out exactly why. I suggest just not trying to apply nametag or stattrak for now.

Another very strange problem is that my gloves fail after replacing the CT or T, and the weapon skin occasionally fails.