When deleting an entity, saving the game and then loading that save game, it is possible for a newly created entity to have the same id as the old deleted entity id.
If the old entity variable is not yet overwritten, it will then return true for IsEntity(&entity).
This can be fixed by making sure the variable value is reset after calling DeleteEntity
While it helps in some cases it's not the root cause and has to be fixed differently...
So, we probably don't want to merge this. Instead, we shouldn't zero the cookie counter during entity manager's full-erase
When deleting an entity, saving the game and then loading that save game, it is possible for a newly created entity to have the same id as the old deleted entity id.
If the old entity variable is not yet overwritten, it will then return true for
IsEntity(&entity)
.This can be fixed by making sure the variable value is reset after calling
DeleteEntity
Also fixes https://github.com/PiratesAhoy/new-horizons/issues/141