How do modules end? (Source Code)

Help regarding development/scripting, troubleshooting or just general gameplay -- anything that hasn't already been answered in the Wiki or pinned FAQs.

Moderator: Developers

Post Reply
Poop Loops
Tranch (Novice)
Tranch (Novice)
Posts: 116
Joined: Sat Apr 18, 2009 9:08 pm
Location: Washington State

How do modules end? (Source Code)

Post by Poop Loops »

I have a problem in the latest SVN where my characters don't export when quitting a module, only when exiting the game entirely.

I've been looking and looking, but I can't find anything in the source code that controls a module ending, or at least, I haven't recognized if I have seen it.

In game.c there is the main loop that ends with game_quit_module() and do_flip_pages(), and then returns btrue*

game_quit_module() doesn't actually export any characters, nor do any functions that it calls. I've tried manually adding in "export_all_local_players()" to game_quit_module(), or right before it is called, or adding in game_update_imports() instead, which seems more thorough, but it just does weird things to me such as mess up my inventory items. I'm just stuck and would like to know the structure of the code a bit better. :)

*why are bool values here btrue and bfalse and not just FALSE and TRUE? It's also not a regular bool type, but some custom one...
Post Reply