riperiperi / FreeSO

Re-implementation of The Sims Online.
http://freeso.org
Mozilla Public License 2.0
817 stars 95 forks source link

Implement Cheat Commands into VM #164

Closed JDrocks450 closed 4 years ago

JDrocks450 commented 4 years ago

A command VMBudgetCheatCmd has been added for Simitone. It uses a VMCheatContext to define the cheat's behavior and parameters. Each cheat can have individually defined behavior or reuse behavior from another cheat. It also allows the cheat to see which avatar sent it when it is executed to allow in the future possible denial of access to certain cheats for individual players.

JDrocks450 commented 4 years ago

Removed the unnecessary changes and moved cheat flag for moveobjects out of VMContext.

JDrocks450 commented 4 years ago

Added basic serialization to VMNetCheatCmd which can be expanded upon as cheats become more complex, renamed VMBudgetCheatCmd, and moved VMCheatState variable to where you suggested. Lastly, some VMCheatContext variables' types have been switched to smaller ones to keep serialized data sizes lower without affecting functionality.

riperiperi commented 4 years ago

This looks much better, thank you for the changes!

JDrocks450 commented 4 years ago

Anytime! My bad for including all the extra nonsense :P