nonperforming / openspadesplus

Basically competitive OpenSpades, I guess
GNU General Public License v3.0
5 stars 1 forks source link

prevent fallingblocks from being created in the first place? #57

Open VierEck opened 1 year ago

VierEck commented 1 year ago

current method only prevents fallingblocks from being rendered.

how about we dont create fallingblocks to begin with? this will prevent fallingblocks from being created and updated completely which will save a bit of computing and might boost performance a bit.

BlocksFell() creates the falling blocks entities https://github.com/nonperforming/openspadesplus/blob/1791181941719e8f9303384ceaa8b365767e4d09/Sources/Client/Client_Update.cpp#L1106-L1125

then check for p_fallingblocks and serverlimits for permission to call AddLocalEntity (creates the fallingblocks entity) https://github.com/nonperforming/openspadesplus/blob/1791181941719e8f9303384ceaa8b365767e4d09/Sources/Client/Client_Update.cpp#L1111

if we still want the tear sound to play then move these lines up before AddLocalEntity https://github.com/nonperforming/openspadesplus/blob/1791181941719e8f9303384ceaa8b365767e4d09/Sources/Client/Client_Update.cpp#L1113-L1124