mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-16 21:33:46 +03:00
29 lines
656 B
Lua
29 lines
656 B
Lua
|
|
--[[
|
||
|
|
| This file was obtained through the combined efforts
|
||
|
|
| of Madbluntz & Plymouth Antiquarian Society.
|
||
|
|
|
|
||
|
|
| Credits: lifestorm, Gregory Wayne Rossel JR.,
|
||
|
|
| Maloy, DrPepper10 @ RIP, Atle!
|
||
|
|
|
|
||
|
|
| Visit for more: https://plymouth.thetwilightzone.ru/
|
||
|
|
--]]
|
||
|
|
|
||
|
|
local meta = FindMetaTable( "Entity" )
|
||
|
|
|
||
|
|
if not meta then return end
|
||
|
|
|
||
|
|
function meta:SetDamageOwner(ply)
|
||
|
|
self.dmg_owner = {ply = ply, t = CurTime()}
|
||
|
|
end
|
||
|
|
|
||
|
|
function meta:GetDamageOwner()
|
||
|
|
if self.dmg_owner then
|
||
|
|
return self.dmg_owner.ply, self.dmg_owner.t
|
||
|
|
end
|
||
|
|
end
|
||
|
|
|
||
|
|
function meta:IsExplosive()
|
||
|
|
local kv = self:GetKeyValues()["ExplodeDamage"]
|
||
|
|
return self:Health() > 0 and kv and kv > 0
|
||
|
|
end
|