Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Refactor|Hexen|ACS: Renamed some ACS scripting components, for clarity
  • Loading branch information
danij-deng committed Jan 26, 2014
1 parent 9a8242f commit d8b1dfa
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 113 deletions.
10 changes: 4 additions & 6 deletions doomsday/plugins/common/src/g_game.c
Expand Up @@ -2701,7 +2701,6 @@ void G_DoLeaveMap(void)
NetSv_SendGameState(GSF_CHANGE_MAP, DDSP_ALL_PLAYERS);

G_DoLoadMap(&p);
Uri_Delete(p.mapUri);

if(hasBrief)
{
Expand All @@ -2727,16 +2726,15 @@ void G_DoLeaveMap(void)
randomClassParm = oldRandomClassParm;

// Launch waiting scripts.
if(!deathmatch)
{
P_CheckACScriptStore(gameMap);
}
P_ACScriptRunDeferredTasks(gameMap/*p.mapUri*/);
#endif

Uri_Delete(p.mapUri);

// In a non-network, non-deathmatch game, save immediately into the autosave slot.
if(!IS_NETGAME && !deathmatch)
{
AutoStr* name = G_GenerateSaveGameName();
AutoStr *name = G_GenerateSaveGameName();
savestateworker_params_t p;

p.name = Str_Text(name);
Expand Down
5 changes: 3 additions & 2 deletions doomsday/plugins/hexen/include/acscript.h
Expand Up @@ -60,9 +60,10 @@ void P_ACScriptTagFinished(int tag);
void P_ACScriptPolyobjFinished(int tag);

/**
* Scans the ACS store and executes all scripts belonging to the current map.
* To be called when the current map changes to activate any deferred scripts which
* should now begin/resume.
*/
void P_CheckACScriptStore(uint map);
void P_ACScriptRunDeferredTasks(uint map/*Uri const *map*/);

void P_WriteGlobalACScriptData(void);
void P_ReadGlobalACScriptData(int saveVersion);
Expand Down

0 comments on commit d8b1dfa

Please sign in to comment.