Closed BR- closed 9 years ago
Do we have any way of firing events or something that other things can listen for, so they could reset themselves on map change or something?
The better way to do this would be to basically reset the entire VM and start again, but that would be horrible without caching, and I'm not sure if it's entirely feasible either.
Not as far as I know. I want a quick-fix for the event, we can work on a more proper way after.
Yeah, your current method works fine for now. A basic event system may be useful for a lot of things like this though, where we want arbitrary parts of the game to react to other arbitrary things.
Working on it... My current method only switches the map, though it should be extendable with some work to switch gamemode, mods, client code, etc as well.
Currently has a few bugs: I need to reset state (score, etc), respawn people, and find all the things that are calculated once on map load.