Skip to content

Commit 3854788

Browse files
authored
Fix refactor bug (#5001)
1 parent 922be2f commit 3854788

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

freespace2/freespace.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5569,8 +5569,10 @@ void game_enter_state( int old_state, int new_state )
55695569
scripting::hook_param("NewState", 'o', l_GameState.Set(gamestate_h(new_state))));
55705570

55715571
if(scripting::hooks::OnStateStart->isActive()) {
5572-
if(scripting::hooks::OnStateStart->isOverride(script_param_list))
5572+
if (scripting::hooks::OnStateStart->isOverride(script_param_list)) {
5573+
scripting::hooks::OnStateStart->run(script_param_list);
55735574
return;
5575+
}
55745576
}
55755577

55765578
switch (new_state) {
@@ -6097,8 +6099,7 @@ void mouse_force_pos(int x, int y);
60976099

60986100
//WMC - now do user scripting stuff
60996101
if (scripting::hooks::OnStateStart->isActive()) {
6100-
if (scripting::hooks::OnStateStart->run(script_param_list))
6101-
return;
6102+
scripting::hooks::OnStateStart->run(script_param_list);
61026103
}
61036104
}
61046105

0 commit comments

Comments
 (0)