mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Added "combat ends normally" event to HOOK_COMBATTURN
Fixed a crash in COMBATTURN hook when loading in combat mode while controlling critters. Fixed critter control algorithm in PartyControl.cpp and set_dude_obj not accepting a null argument.
This commit is contained in:
@@ -462,9 +462,9 @@ HOOK_COMBATTURN (hs_combatturn.int)
|
||||
|
||||
Runs before and after each turn in combat (for both PC and NPC).
|
||||
|
||||
int arg1 - event type: 1 - start of turn, 0 - normal end of turn, -1 - combat ended abruptly (by script or by pressing Enter during PC turn)
|
||||
int arg1 - event type: 1 - start of turn, 0 - normal end of turn, -1 - combat ends abruptly (by script or by pressing Enter during PC turn), -2 - combat ends normally (hook always runs at the end of combat)
|
||||
int arg2 - critter doing the turn
|
||||
bool arg3 - set to 1 at the start of the player's turn after the game has been loaded, 0 otherwise
|
||||
bool arg3 - 1 at the start/end of the player's turn after loading a game saved in combat mode, 0 otherwise
|
||||
|
||||
int ret1 - pass 1 at the start of turn to skip the turn, pass -1 at the end of turn to force end of combat
|
||||
|
||||
|
||||
Reference in New Issue
Block a user