diff --git a/lua/fedhoria.lua b/lua/fedhoria.lua index 30849e7..b1e42bc 100644 --- a/lua/fedhoria.lua +++ b/lua/fedhoria.lua @@ -85,7 +85,7 @@ hook.Add("Think", "zcnpci", function() ((ent.organism.lleg >= 1) and (ent.organism.rleg >= 1)) or ent.organism.llegamputated or ent.organism.rlegamputated or - (ent.organism.consciousness <= 0.3) or + (ent.organism.consciousness <= 0.5) or (ent.organism.pain > 90) ) then local damage_info = DamageInfo() diff --git a/lua/zcnpci/modules/falling_legs.lua b/lua/zcnpci/modules/falling_legs.lua index 4ed8661..2a21bb3 100644 --- a/lua/zcnpci/modules/falling_legs.lua +++ b/lua/zcnpci/modules/falling_legs.lua @@ -69,7 +69,7 @@ local cv_anim_roll_impact_threshold = CreateConVar("zcnpci_falling_anim_roll_imp local cv_anim_roll_playback_rate = CreateConVar("zcnpci_falling_anim_roll_playback_rate", "3.0", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Скорость воспроизведения анимации") -- Down time -local minimum_down_time = CreateConVar("zcnpci_down_time", "5", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Down time!!!!!!!!!") +local minimum_down_time = CreateConVar("zcnpci_down_time", "8", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Down time!!!!!!!!!") --[[------------------------------------------------------------------------- Tug function @@ -254,7 +254,7 @@ function MODULE:PhysicsSimulate(phys, dt) -- If the NPC is dead, they probably aren't coming back; don't bother bringing them back to life self:Remove() return false -- Cut the bullshit - elseif (target.organism.consciousness <= 0.3) or ((target.organism.lleg >= 1) and (target.organism.rleg >= 1)) then + elseif (target.organism.consciousness <= 0.3) or ((target.organism.lleg >= 0.85) and (target.organism.rleg >= 0.85)) then self.StartDie = cur_time return false end @@ -282,13 +282,22 @@ function MODULE:PhysicsSimulate(phys, dt) ent:Spawn() - ent.organism = table.Copy(target.organism) - ent.organism.owner = ent + timer.Simple(0, function() + hg.organism.Add(ent) + table.Merge(ent.organism, target.organism) + + ent.organism.alive = true + ent.organism.owner = ent + + ent:CallOnRemove("organism", hg.organism.Remove, ent) + hg.send_bareinfo(ent.organism) + + target:Remove() + end) self.StopProcessing = true self:Remove() - target:Remove() return false end diff --git a/lua/zcnpci/modules/falling_torso.lua b/lua/zcnpci/modules/falling_torso.lua index 4e944c4..9c8bd3e 100644 --- a/lua/zcnpci/modules/falling_torso.lua +++ b/lua/zcnpci/modules/falling_torso.lua @@ -35,9 +35,6 @@ local cv_anim_roll_duration = CreateConVar("zcnpci_falling_anim_roll_duration", local cv_anim_roll_impact_threshold = CreateConVar("zcnpci_falling_anim_roll_impact_threshold", "300", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Мин. скорость удара для запуска анимации") local cv_anim_roll_playback_rate = CreateConVar("zcnpci_falling_anim_roll_playback_rate", "3.0", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Скорость воспроизведения анимации") --- Down time -local minimum_down_time = CreateConVar("zcnpci_down_time", "5", {FCVAR_ARCHIVE, FCVAR_REPLICATED}, "Down time!!!!!!!!!") - -- Do it! function MODULE:DoTwitch()