diff --git a/src/acs/interface.cpp b/src/acs/interface.cpp index 2b1b5b050..13a53c04e 100644 --- a/src/acs/interface.cpp +++ b/src/acs/interface.cpp @@ -293,11 +293,11 @@ void ACS_RunPlayerFinishScript(player_t *player) } /*-------------------------------------------------- - void ACS_RunPositionScript(void) + void ACS_RunRaceStartScript(void) See header file for description. --------------------------------------------------*/ -void ACS_RunPositionScript(void) +void ACS_RunRaceStartScript(void) { Environment *env = &ACSEnv; @@ -305,7 +305,7 @@ void ACS_RunPositionScript(void) ACSVM::HubScope *const hub = global->getHubScope(0); ACSVM::MapScope *const map = hub->getMapScope(0); - map->scriptStartType(ACS_ST_POSITION, {}); + map->scriptStartType(ACS_ST_RACESTART, {}); } /*-------------------------------------------------- @@ -324,29 +324,6 @@ void ACS_RunOvertimeScript(void) map->scriptStartType(ACS_ST_OVERTIME, {}); } -/*-------------------------------------------------- - void ACS_RunEmeraldScript(mobj_t *mo) - - See header file for description. ---------------------------------------------------*/ -void ACS_RunEmeraldScript(mobj_t *mo) -{ - Environment *env = &ACSEnv; - - ACSVM::GlobalScope *const global = env->getGlobalScope(0); - ACSVM::HubScope *const hub = global->getHubScope(0); - ACSVM::MapScope *const map = hub->getMapScope(0); - - ACSVM::MapScope::ScriptStartInfo scriptInfo; - ThreadInfo info; - - P_SetTarget(&info.mo, mo); - - scriptInfo.info = &info; - - map->scriptStartTypeForced(ACS_ST_EMERALD, scriptInfo); -} - /*-------------------------------------------------- void ACS_RunGameOverScript(void) diff --git a/src/acs/interface.h b/src/acs/interface.h index 11544cb21..12acc1ca7 100644 --- a/src/acs/interface.h +++ b/src/acs/interface.h @@ -171,13 +171,13 @@ void ACS_RunLapScript(mobj_t *mo, line_t *line); /*-------------------------------------------------- - void ACS_RunPositionScript(void); + void ACS_RunRaceStartScript(void); Runs the map's special script for when the level goes past the POSITION period. --------------------------------------------------*/ -void ACS_RunPositionScript(void); +void ACS_RunRaceStartScript(void); /*-------------------------------------------------- @@ -190,16 +190,6 @@ void ACS_RunPositionScript(void); void ACS_RunOvertimeScript(void); -/*-------------------------------------------------- - void ACS_RunEmeraldScript(mobj_t *mo); - - Runs the map's special script for when the - Special Stage Chaos Emerald is collected. ---------------------------------------------------*/ - -void ACS_RunEmeraldScript(mobj_t *mo); - - /*-------------------------------------------------- void ACS_RunGameOverScript(void); diff --git a/src/acs/thread.hpp b/src/acs/thread.hpp index 3f86fb54d..95d4f3a59 100644 --- a/src/acs/thread.hpp +++ b/src/acs/thread.hpp @@ -38,12 +38,10 @@ enum acs_scriptType_e ACS_ST_DEATH = 3, // DEATH: Runs when a player dies. ACS_ST_ENTER = 4, // ENTER: Runs when a player enters the game; both on start of the level, and when un-spectating. ACS_ST_LAP = 5, // LAP: Runs when a player's lap increases from crossing the finish line. - ACS_ST_POSITION = 6, // POSITION: Runs when the POSITION period ends. - ACS_ST_OVERTIME = 7, // OVERTIME: Runs when Overtime starts in timed game modes. - ACS_ST_UFO = 8, // UFO: Runs when the UFO Catcher is destroyed in a Special Stage. - ACS_ST_EMERALD = 9, // EMERALD: Runs when the Chaos Emerald is collected in a Special Stage. - ACS_ST_GAMEOVER = 10, // GAMEOVER: Runs when the level ends due to a losing condition and no player has an extra life. - ACS_ST_FINISH = 11, // FINISH: Runs when a player finishes + ACS_ST_RACESTART = 6, // RACESTART: Runs when the RACE starts. + ACS_ST_OVERTIME = 8, // OVERTIME: Runs when Overtime starts in timed game modes. + ACS_ST_GAMEOVER = 9, // GAMEOVER: Runs when the level ends due to a losing condition and no player has an extra life. + ACS_ST_FINISH = 10, // FINISH: Runs when a player finishes }; // diff --git a/src/p_tick.c b/src/p_tick.c index d4c705658..66912d0db 100644 --- a/src/p_tick.c +++ b/src/p_tick.c @@ -820,7 +820,7 @@ void P_Ticker(boolean run) if (starttime > introtime && leveltime == starttime) { - ACS_RunPositionScript(); + ACS_RunRaceStartScript(); } if (timelimitintics > 0 && leveltime == (timelimitintics + starttime + 1))