-
Notifications
You must be signed in to change notification settings - Fork 33
FLHook core optimizations #347
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
|
||
| TRY_HOOK { | ||
| if (iAccepted) | ||
| { // save both chars to prevent cheating in case of server crash |
There was a problem hiding this comment.
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.
- Let's say I have characters A and B in game. Character A has 0 credits and character B has 100 million.
- I use a trade to move 100 million from character B to character A.
- I then take character A, dock it and log it off, saving those credits.
- 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.
- Now I have two characters with 100 million credits.
| LoadUserSettings(iClientID); | ||
|
|
||
| // log | ||
| if (set_bLogConnects) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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, |
There was a problem hiding this comment.
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?
Includes removal of several redundant anticheat checks, or checks that were no longer even use for years.