diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 48f9e8d0..23ce0d6c 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -1,5 +1,5 @@ ;sfall configuration settings -;v4.0.7 +;v4.1 [Main] ;Change to 1 if you want to use command line args to tell sfall to use another ini file. diff --git a/artifacts/example_mods/ExplosionTimer/hs_explosivetimer.ssl b/artifacts/example_mods/ExplosiveTimer/hs_explosivetimer.ssl similarity index 73% rename from artifacts/example_mods/ExplosionTimer/hs_explosivetimer.ssl rename to artifacts/example_mods/ExplosiveTimer/hs_explosivetimer.ssl index 41689f50..3b31fc6b 100644 --- a/artifacts/example_mods/ExplosionTimer/hs_explosivetimer.ssl +++ b/artifacts/example_mods/ExplosiveTimer/hs_explosivetimer.ssl @@ -1,9 +1,16 @@ /* - Example implementation of the algorithm of the game engine setting the timer of explosives. + Example implementation of the algorithm of how the game engine sets the explosive timer. */ +#include "..\..\scripting_docs\headers\sfall.h" #include "..\..\scripting_docs\headers\define_lite.h" +// from CONDTION.H +#define ROLL_CRITICAL_FAILURE (0) +#define ROLL_FAILURE (1) +#define ROLL_SUCCESS (2) +#define ROLL_CRITICAL_SUCCESS (3) + procedure start; procedure start begin diff --git a/artifacts/scripting/hookscripts.txt b/artifacts/scripting/hookscripts.txt index 8a0676e6..8873ea74 100644 --- a/artifacts/scripting/hookscripts.txt +++ b/artifacts/scripting/hookscripts.txt @@ -518,3 +518,16 @@ Obj arg2 - the object being used int arg3 - the animation code being used (see ANIM_* in Animcomd.h) int ret1 - overrides the animation code (pass -1 if you want to skip the animation) + +------------------------------------------- + +HOOK_EXPLOSIVETIMER (hs_explosivetimer) + +Runs after setting the explosive timer. You can override the result. + +int arg1 - the time in ticks set in the timer +Obj arg2 - the explosive object +int arg3 - the result of engine calculation of whether the timer was set successfully: 1 - failure, 2 - success (similar to ROLL_* in Condtion.h) + +int ret1 - overrides the time of the timer (maximum 18000 ticks) +int ret2 - overrides the result of engine calculation: 1 - failure, 2 - success, any other value - use engine handler diff --git a/sfall/version.h b/sfall/version.h index 5b0be16e..445e81b9 100644 --- a/sfall/version.h +++ b/sfall/version.h @@ -23,11 +23,11 @@ #define LEGAL_COPYRIGHT "Copyright (C) 2006-2018, sfall team" #define VERSION_MAJOR 4 -#define VERSION_MINOR 0 -#define VERSION_BUILD 7 +#define VERSION_MINOR 1 +#define VERSION_BUILD 0 #define VERSION_REV 0 -#define VERSION_STRING "4.0.7" +#define VERSION_STRING "4.1.0" #define CHECK_VAL (4)