L-Leite / cso2-launcher

A custom launcher for CSO2
MIT License
113 stars 56 forks source link

Add a "custom" folder for modding cso2 client and fix sv_cheats. #22

Closed GEEKiDoS closed 5 years ago

GEEKiDoS commented 5 years ago

21

L-Leite commented 5 years ago

Thanks for the time and effort towards this.

I'm not pushing this into master yet, since I have big changes in a local branch in my machine.

It uses CMake to generate the project files (since we already need it for PolyHook 2). This should fix issues such as #14.

GEEKiDoS commented 5 years ago

Thanks for the time and effort towards this.

I'm not pushing this into master yet, since I have big changes in a local branch in my machine.

It uses CMake to generate the project files (since we already need it for PolyHook 2). This should fix issues such as #14.

Nice! It would nice if you use the cmake to generate the source sdk too

L-Leite commented 5 years ago

Thanks for the time and effort towards this. I'm not pushing this into master yet, since I have big changes in a local branch in my machine. It uses CMake to generate the project files (since we already need it for PolyHook 2). This should fix issues such as #14.

Nice! It would nice if you use the cmake to generate the source sdk too

I'm looking to remove appframework, tier1, tier2 and tier3 dependencies from the launcher.

We will still have tier0.lib and vstdlib.lib as dependencies, since we need their imports

With these changes, we won't have to generate any Source SDK project files.

GEEKiDoS commented 5 years ago

I fixed sv_cheats I guess? qq 20190205142407

L-Leite commented 5 years ago

Nice. Do you know how the original CanCheat?

IDA's pseudocode looks like this to me:

bool CanCheat()
{
  if ( CBaseServer::m_State < 3 )
    return dword_108D2384 == 1;
  else
    return dword_10800FCC <= 1;
}

I have no clue what 108D2384 or 10800FCC are, but I think they're part of the CBaseServer class. Do you know what they are?

I found other weird "backdoors" in CCSPlayer::ClientCommand.

If someone sends a specific command to the host/dedicated server, you can enable noclip. Maybe it's some GM function.

Either way, your sv_cheats fix looks good to me

GEEKiDoS commented 5 years ago

Nice. Do you know how the original CanCheat?

IDA's pseudocode looks like this to me:

bool CanCheat()
{
  if ( CBaseServer::m_State < 3 )
    return dword_108D2384 == 1;
  else
    return dword_10800FCC <= 1;
}

I have no clue what 108D2384 or 10800FCC are, but I think they're part of the CBaseServer class. Do you know what they are?

I found other weird "backdoors" in CCSPlayer::ClientCommand.

If someone sends a specific command to the host/dedicated server, you can enable noclip. Maybe it's some GM function.

Either way, your sv_cheats fix looks good to me

The dword_10800FCC looks like is same as the sv.GetMaxClients()(Check SV_ActivateServer at 0x1016DBB0).

But about the dword_108D2384, I really have no idea about it.

GEEKiDoS commented 5 years ago

I think I would create a new branch before change anything next time lol.

L-Leite commented 5 years ago

@GEEKiDoS I got the launcher to load decrypted files, but the files have an issue.

UnCSO2 is leaving extra bytes in the end of the decrypted files due to padding.

I opened an issue there, Ochii/UnCSO2#3

GEEKiDoS commented 5 years ago

I belive there's few traps while the CanCheat() returns true, After changing the sv_cheats to 1, The game keeps dropping network packet even you are host, And you can see other's viewmodel: 1