thmsndk / Screeps3D

A 3D client for the MMORTS Screeps.com
90 stars 17 forks source link

fix: flags will be removed from the client if a flag no longer exist. #207

Closed kurtish closed 4 years ago

kurtish commented 4 years ago

Fixed Stale Flags, and flags not getting removed isse: Fixes https://github.com/thmsndk/Screeps3D/issues/109

To Test:

  1. Load the Web/Steam Client
  2. Load Screeps3D with this Branch
  3. On the Web/Steam Client Spam a bunch of flags in a Room
  4. While watching the Screeps3D client, remove the flags on the Steam/Web client and the flags should also disappear on the Screeps3d Client.
kurtish commented 4 years ago

I will make some updates to this PR :)

kurtish commented 4 years ago

@thmsndk I will ping you when I make the suggested changes to this PR for a re-review :)

kurtish commented 4 years ago

@thmsndk updates made. the removing of objects once instead of once per Unpack method was a great Idea. A new RemoveObjects() was created and is now called last to do a cleanup pass on objects and flags.

I removed the unneeded room check for flags as well as renamed the lists to make them a little more clear hopefully :)