Zet0rz / nZombies-Unlimited

nZombies Unlimited
MIT License
43 stars 15 forks source link

Dynamic Nav Modifiers #26

Open Zet0rz opened 5 years ago

Zet0rz commented 5 years ago

Since the game reloads the map every time a config is loaded, navmesh modifications can be modified without doing permanent changes to the mesh and saving it. This lets the player mark navmeshes as "To be deleted" which will be completely removed in gameplay, achieving the same functionality as Locked Navmeshes in the original, but at a likely more efficient level. Similarly, door-locked navmeshes can be disconnected from neighboring meshes until the door is opened, at which point it is connected. This will also allow temporary nZombies-only navs, such as shortcuts for zombies.

As long as nav_save is never called during gameplay, these changes will not affect any other gamemode on the same level.

Allow the player modifying the navmesh (permanently), but upon saving, save to a renamed file by first renaming the original, saving, then renaming the new, and renaming the original back to its original name. In gameplay, rename them to load the nZombies file rather than the original.

This method has the potential danger of crashes and other unexpected exits to not rename the files back. It is likely not smart to do this option.