Files
Bubberstation/code/controllers
Kylerace c7a399ec4a Fixes bug with atoms (including new players!!!!) not spawned from the holodeck being deleted by it if they happened to be initialized at the same time (#57510)
About The Pull Request

Fixes #57446
yeah not my best moment, holodeck currently sets SSatoms to add every call to InitAtom() to a list and then give it back to the holodeck console (it actually goes through map_template/holodeck to do it but whatever). However it turns out atom/New() calls InitAtom too, so if an atom is created while SSatoms is still creating the list to give to the holodeck then that atom is added to the list regardless of whether or not its actually from the holodeck template.

Now theres an extra argument to InitAtom that tells it whether its spawned directly from a map template (ie, its part of the input list of uninitialized atoms that InitializeAtoms was given) or otherwise the output list that the holodeck uses is populated by calling GetAllContents on all atom/movables spawned directly from the template.

also renamed some vars in initTemplateBounds because it was hard to reason what it was doing and made it use as anything

also note that loading a map template with returns_created_atoms = TRUE will no longer track atoms that arent in the map file but are spawned directly onto a turf, currently nothing does this with the holodeck (which is the only map template that has this feature)

by the way this bug is my fault
Why It's Good For The Game

incredibly incredibly unlucky new players dont deserve to be deleted just because they didnt spawn in the holodeck
Changelog

🆑
fix: the holodeck is no longer so powerful that it can destroy anything and everything that dares to start existing while it's busy loading programs
/🆑
2021-03-20 11:56:35 +13:00
..
2021-03-17 05:51:53 -07:00