Various fixings
This commit is contained in:
parent
5af8fdc14a
commit
72c4515402
3 changed files with 30 additions and 10 deletions
14
README.md
14
README.md
|
|
@ -32,6 +32,20 @@ It is, however, not compatbile with:
|
||||||
|
|
||||||
## Todo list
|
## Todo list
|
||||||
|
|
||||||
|
Urgent shit:
|
||||||
|
|
||||||
|
- Large amounts of damage (such as shotguns) fling NPC ragdolls to ridiculous lengths, sometimes severely injuring the player. While this is absolutely fucking hilarious, it also isn't the best experience.
|
||||||
|
|
||||||
|
Stuff to do:
|
||||||
|
|
||||||
|
- Facial expressions
|
||||||
|
- Actual specific reactions to being on fire / falling / lots of pain
|
||||||
|
- Wound holding
|
||||||
|
- NPCs should not stumble when dead
|
||||||
|
- Generally improve stumbling
|
||||||
|
|
||||||
|
Stuff to fix possibly:
|
||||||
|
|
||||||
- NPC targeting works, but works really weirdly (sometimes it just. keeps targeting corpses when it shouldn't.) Why? Who knows!!!!
|
- NPC targeting works, but works really weirdly (sometimes it just. keeps targeting corpses when it shouldn't.) Why? Who knows!!!!
|
||||||
- Look into improving the unfake animation? Really scared to try and touch it again but it would be worthwhile
|
- Look into improving the unfake animation? Really scared to try and touch it again but it would be worthwhile
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -121,6 +121,11 @@ hook.Add("CreateEntityRagdoll", "zcnpci", function(ent, ragdoll)
|
||||||
ragdoll:GetPhysicsObject():SetVelocity(ent.npcfakeknockback)
|
ragdoll:GetPhysicsObject():SetVelocity(ent.npcfakeknockback)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local velocity = ragdoll:GetPhysicsObject():GetVelocity()
|
||||||
|
|
||||||
|
print(velocity)
|
||||||
|
print(max_clamp)
|
||||||
|
|
||||||
-- For some reason, citizen types such as rebels, medics, refugees, etc. use a keyvalue.
|
-- For some reason, citizen types such as rebels, medics, refugees, etc. use a keyvalue.
|
||||||
-- That keyvalue does not transfer over to the ragdoll, despite it looking like the NPC,
|
-- That keyvalue does not transfer over to the ragdoll, despite it looking like the NPC,
|
||||||
-- and you have to manually save it to the ragdoll to be able to make it work.
|
-- and you have to manually save it to the ragdoll to be able to make it work.
|
||||||
|
|
@ -160,6 +165,12 @@ hook.Add("HomigradDamage", "zcnpci", function(ent, dmginfo)
|
||||||
if dmginfo:IsDamageType(DMG_BULLET + DMG_BUCKSHOT + DMG_BLAST) then
|
if dmginfo:IsDamageType(DMG_BULLET + DMG_BUCKSHOT + DMG_BLAST) then
|
||||||
if dmginfo:GetDamage() > 3 then
|
if dmginfo:GetDamage() > 3 then
|
||||||
table.insert(npcs_to_fake, ent)
|
table.insert(npcs_to_fake, ent)
|
||||||
|
|
||||||
|
local attacker_angle = dmginfo:GetAttacker():EyeAngles()
|
||||||
|
|
||||||
|
local normal = attacker_angle:Forward(normal)
|
||||||
|
|
||||||
|
ent.npcfakeknockback = normal * dmginfo:GetDamage() * 0
|
||||||
end
|
end
|
||||||
elseif dmginfo:IsDamageType(DMG_CLUB + DMG_SLASH) then
|
elseif dmginfo:IsDamageType(DMG_CLUB + DMG_SLASH) then
|
||||||
local attacker = dmginfo:GetAttacker()
|
local attacker = dmginfo:GetAttacker()
|
||||||
|
|
|
||||||
|
|
@ -293,6 +293,11 @@ function MODULE:PhysicsSimulate(phys, dt)
|
||||||
|
|
||||||
local st = stumble_time:GetFloat()
|
local st = stumble_time:GetFloat()
|
||||||
|
|
||||||
|
-- End stumbling if player is dead
|
||||||
|
if !target.organism or !target.organism.alive then
|
||||||
|
st = 0
|
||||||
|
end
|
||||||
|
|
||||||
if (st <= 0) then
|
if (st <= 0) then
|
||||||
self:Remove()
|
self:Remove()
|
||||||
return false
|
return false
|
||||||
|
|
@ -300,16 +305,6 @@ function MODULE:PhysicsSimulate(phys, dt)
|
||||||
|
|
||||||
local f = 1 - (CurTime() - self.Created) / st
|
local f = 1 - (CurTime() - self.Created) / st
|
||||||
|
|
||||||
--RagMod Reworked support
|
|
||||||
if ragmod and ragmod:IsRagmodRagdoll(target) then
|
|
||||||
local owner = target:GetOwningPlayer()
|
|
||||||
if !IsValid(owner) or !owner:Alive() then
|
|
||||||
f = 0
|
|
||||||
else
|
|
||||||
f = 1
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
if (f <= 0) then
|
if (f <= 0) then
|
||||||
self:Remove()
|
self:Remove()
|
||||||
return false
|
return false
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue