mirror of
https://github.com/sfall-team/sfall.git
synced 2026-07-27 16:52:34 -07:00
Fixed map lighting from Night Vision perk
* Before the perk effect only kicked in when map update proc ran after game load. Now the delay is much shorter.
This commit is contained in:
@@ -2019,6 +2019,7 @@ FUNC(light_get_tile_true_, 0x47A9C4)
|
|||||||
FUNC(light_increase_ambient_, 0x47A900)
|
FUNC(light_increase_ambient_, 0x47A900)
|
||||||
FUNC(light_init_, 0x47A8F0)
|
FUNC(light_init_, 0x47A8F0)
|
||||||
FUNC(light_reset_tiles_, 0x47AA84)
|
FUNC(light_reset_tiles_, 0x47AA84)
|
||||||
|
FUNC(light_set_ambient_, 0x47A908)
|
||||||
FUNC(light_set_tile_, 0x47A9EC)
|
FUNC(light_set_tile_, 0x47A9EC)
|
||||||
FUNC(light_subtract_from_tile_, 0x47AA48)
|
FUNC(light_subtract_from_tile_, 0x47AA48)
|
||||||
FUNC(lighten_buf_, 0x4D3A48)
|
FUNC(lighten_buf_, 0x4D3A48)
|
||||||
|
|||||||
@@ -178,6 +178,7 @@ WRAP_WATCOM_FUNC1(long, item_w_secondary_mp_cost, fo::GameObject*, item)
|
|||||||
WRAP_WATCOM_FUNC2(long, item_w_subtype, fo::GameObject*, item, long, hitMode)
|
WRAP_WATCOM_FUNC2(long, item_w_subtype, fo::GameObject*, item, long, hitMode)
|
||||||
WRAP_WATCOM_FUNC1(long, item_weight, fo::GameObject*, item)
|
WRAP_WATCOM_FUNC1(long, item_weight, fo::GameObject*, item)
|
||||||
WRAP_WATCOM_FUNC2(long, light_get_tile, long, elevation, long, tileNum) // Returns light level at given tile
|
WRAP_WATCOM_FUNC2(long, light_get_tile, long, elevation, long, tileNum) // Returns light level at given tile
|
||||||
|
WRAP_WATCOM_FUNC2(void, light_set_ambient, long, intensity, long, isRefresh)
|
||||||
WRAP_WATCOM_FUNC2(long, load_frame, const char*, fileName, fo::FrmFile**, frmPtr)
|
WRAP_WATCOM_FUNC2(long, load_frame, const char*, fileName, fo::FrmFile**, frmPtr)
|
||||||
WRAP_WATCOM_FUNC4(BYTE*, loadPCX, const char*, fileName, long*, width, long*, height, BYTE*, palette)
|
WRAP_WATCOM_FUNC4(BYTE*, loadPCX, const char*, fileName, long*, width, long*, height, BYTE*, palette)
|
||||||
WRAP_WATCOM_FUNC1(fo::Program*, loadProgram, const char*, fileName)
|
WRAP_WATCOM_FUNC1(fo::Program*, loadProgram, const char*, fileName)
|
||||||
|
|||||||
@@ -530,6 +530,8 @@ static void InitGlobalScripts() {
|
|||||||
|
|
||||||
HookScripts::InitHookScripts();
|
HookScripts::InitHookScripts();
|
||||||
LoadGlobalScriptsList();
|
LoadGlobalScriptsList();
|
||||||
|
// Fix map lighting from Night Vision perk when loading a saved game
|
||||||
|
fo::func::light_set_ambient(fo::var::ambient_light, 1); // refresh map lighting
|
||||||
|
|
||||||
isGlobalScriptLoading = 0;
|
isGlobalScriptLoading = 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user