diff --git a/SRP v1.1.4 - Readme.txt b/SRP v1.1.4 - Readme.txt index d758269b..993cd86e 100644 --- a/SRP v1.1.4 - Readme.txt +++ b/SRP v1.1.4 - Readme.txt @@ -203,6 +203,7 @@ Gameplay fixes: + Fixed the issue where squad info tooltips would fail to update properly and would, consequently, sometimes display the wrong target location. + Fixed several bugs pertaining to the displaying of squad map spots, including the issue where its color would react sluggishly to relationship changes to the player. + Mitigated the issue where the weather would sometimes inexplicably change after loading. ++ Fixed the start time for NPCs' heavily wounded state being saved incorrectly. + Fixed PSI emission hit and effector intensity doubling on save/reload. + Fixed the issue where crows could get stuck floating in the air upon being shot. + Fixed the "Life support system" upgrade for the Freedom Exoskeleton making the player bleed out faster rather than slower as intended. diff --git a/SRP v1.1.4 - Version History.txt b/SRP v1.1.4 - Version History.txt index 47737594..0a721845 100644 --- a/SRP v1.1.4 - Version History.txt +++ b/SRP v1.1.4 - Version History.txt @@ -11,6 +11,7 @@ v1.1.4 + Fixed the game crashing if a stalker squad at a smart terrain has it as a scripted target and is joined by another squad that doesn't and the general job capacity of that smart terrain is saturated by the two squads. - Decane + Fixed a rare crash caused by too many stalkers trying to enter the 'Small old wagon' at the Dark Valley: smart_terrain.script:483: Insufficient smart_terrain jobs val_smart_terrain_9_6. - Decane + Fixed a rare crash caused by too many stalkers trying to enter the 'Camp amidst rocks' at the Army Warehouses: smart_terrain.script:483: Insufficient smart_terrain jobs mil_smart_terrain_2_1 (new game required for effect). - Decane ++ Fixed the start time for NPCs' heavily wounded state being saved incorrectly. - Decane + Mitigated the issue where the weather would sometimes inexplicably change after loading. - Decane + Mitigated the issue where the player's character model would revert back to the default rookie jacket model upon picking up another suit of armor. - Artos, Shoker + Fixed the issue where the player would be rejected from playing the shooting minigame if their money precisely matches the entry fee instead of exceeding it. - Decane diff --git a/gamedata/scripts/xr_logic.script b/gamedata/scripts/xr_logic.script index 485feae8..c1930db5 100644 --- a/gamedata/scripts/xr_logic.script +++ b/gamedata/scripts/xr_logic.script @@ -996,6 +996,13 @@ function pstor_retrieve(obj, varname, defval) return defval end +function pstor_clear(obj, varname) + local npc_st = db_storage[obj:id()] + if npc_st.pstor ~= nil then + npc_st.pstor[varname] = nil + end +end + function pstor_save_all(obj, packet) local obj_st = db_storage[obj:id()] diff --git a/gamedata/scripts/xr_wounded.script b/gamedata/scripts/xr_wounded.script index 5874cde2..cb22a8f8 100644 --- a/gamedata/scripts/xr_wounded.script +++ b/gamedata/scripts/xr_wounded.script @@ -76,10 +76,10 @@ function action_wounded:execute() if self.a.autoheal and not wound_manager.can_use_medkit then local begin_wounded = xr_logic.pstor_retrieve(self.object, "begin_wounded") - local current_time = time_global() + local current_time = game.time() if begin_wounded == nil then xr_logic.pstor_store(self.object, "begin_wounded", current_time) - elseif current_time - begin_wounded > 60000 then + elseif current_time - begin_wounded > 60000 * level.get_time_factor() then -- 60 real seconds in-game local npc = self.object _G.sim:create("medkit", npc:position(), npc:level_vertex_id(), npc:game_vertex_id(), npc:id()) wound_manager:unlock_medkit() @@ -164,6 +164,7 @@ function action_wounded:finalize() --' xr_sound.set_sound(self.object, nil) self.object:wounded(false) self.object:movement_enabled(true) + xr_logic.pstor_clear(self.object, "begin_wounded") end --------------------------------------------------------------------------------