Fix helicopter workaroud

This commit is contained in:
Haodong Mo 2023-12-26 22:00:40 +10:00
parent d9cd2254ae
commit ceab44da01

View File

@ -269,6 +269,8 @@ if SERVER then
self.LastHitNormal = colData.HitNormal
local tgt
if self.ExplodeOnImpact then
if CurTime() - self.SpawnTime < self.FuseTime then
if IsValid(colData.HitEntity) then
@ -302,7 +304,7 @@ if SERVER then
effectdata:SetOrigin( self:GetPos() )
-- simulate AP damage on vehicles, mainly simfphys
local tgt = colData.HitEntity
tgt = colData.HitEntity
while IsValid(tgt) do
if tgt.GetParent and IsValid(tgt:GetParent()) then
tgt = tgt:GetParent()