kaansoral / adventureland

Adventure Land The Open Source CODE MMORPG
Other
189 stars 60 forks source link

init_game now runs server_bfs for instance maps with npcs or monsters #137

Open thmsndk opened 4 months ago

thmsndk commented 4 months ago

This PR makes it easier to make new instances. Instead of hardcoding server_bfs for instances in init_game it will now dynamically acquire them from G.maps. and run server_bfs if there are npcs or monsters in the instance.

This change was initially part of the bee dungeon branch i'm working on.

This is the console output from my ptr server with added debug, keep in mind create_instance in server_functions.js will also call server_bfs if precompute has not been run.

log output from my change where i've added a console log for precomputed.

2024-08-13 20:48:46 tomb is precomputed
2024-08-13 20:48:46 dungeon0 is precomputed
2024-08-13 20:48:46 shellsisland is precomputed
2024-08-13 20:48:48 crypt is precomputed
2024-08-13 20:48:48 winter_instance is precomputed