Skip to content

Conversation

@Aingar
Copy link
Collaborator

@Aingar Aingar commented Nov 17, 2023

Includes removal of several redundant anticheat checks, or checks that were no longer even use for years.


TRY_HOOK {
if (iAccepted)
{ // save both chars to prevent cheating in case of server crash
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it safe to remove this? It seems to me that removing this creates an obvious duplication cheat.

  1. Let's say I have characters A and B in game. Character A has 0 credits and character B has 100 million.
  2. I use a trade to move 100 million from character B to character A.
  3. I then take character A, dock it and log it off, saving those credits.
  4. I then park character B in space and wait for some server crash (or do it myself if I know some behaviour that might trigger one), never having the new character file saved.
  5. Now I have two characters with 100 million credits.

LoadUserSettings(iClientID);

// log
if (set_bLogConnects)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

wstring wscIP;
HkGetPlayerIP(iClientID, wscIP);

foreach(set_lstBans, wstring, itb)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we seem to be getting rid of random things without proper cleanup here - set_lstBans is still defined somewhere

iPlayers++;

if (iPlayers > (Players.GetMaxPlayerCount() - set_iReservedSlots))
{ // check if player has a reserved slot
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we're getting rid of the reserved slots functionality altogether, HkSetReservedSlot/CmdSetReservedSlot/HkGetReservedSlot/CmdGetReservedSlot must go too

#define OBJ_ASTEROID (1 << 29)


enum EquipmentClass : uint
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok but I don't see what this has to do with optimisations

{
None = 0,
LightEquip = 1 << 0,
AttachedFx = 1 << 1, // contrails
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are 1<<2, 1<<3, 1<<4?

ShieldGenerator = 1 << 9,
Thruster = 1 << 10,
CargoPod = 1 << 11,
CloakingDevice = 1 << 12,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where are 1<<13, 1<<14, 1<<15?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants