mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-17 21:53:46 +03:00
Upload
This commit is contained in:
28
gamemodes/terrortown/gamemode/entity.lua
Normal file
28
gamemodes/terrortown/gamemode/entity.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
--[[
|
||||
| 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
|
||||
Reference in New Issue
Block a user