Benny/gamemodes/benny/entities/entities/benny_grenade_frag.lua

22 lines
495 B
Lua
Raw Normal View History

2023-11-12 04:56:24 -05:00
AddCSLuaFile()
ENT.Type = "anim"
ENT.Base = "benny_grenade"
ENT.Model = "models/weapons/w_eq_fraggrenade_thrown.mdl"
local explosionflags = 0x2 + 0x4 + 0x80
function ENT:Explode()
local effectdata = EffectData()
effectdata:SetOrigin( self:GetPos() )
effectdata:SetFlags( explosionflags )
util.Effect( "Explosion", effectdata )
local dmg = DamageInfo()
dmg:SetDamage( 125 )
dmg:SetAttacker( self:GetOwner() )
util.BlastDamageInfo( dmg, self:GetPos(), 140 )
self:Remove()
return
end