Grenade functionality
This commit is contained in:
parent
6dee1a3db0
commit
1103cef3a9
|
@ -2,13 +2,14 @@ AddCSLuaFile()
|
||||||
|
|
||||||
ENT.Type = "anim"
|
ENT.Type = "anim"
|
||||||
|
|
||||||
|
ENT.Model = "models/weapons/w_eq_fraggrenade_thrown.mdl"
|
||||||
ENT.Fuse = 0
|
ENT.Fuse = 0
|
||||||
|
|
||||||
local size = Vector( 4, 4, 4 )
|
local size = Vector( 4, 4, 4 )
|
||||||
local sizem = -size
|
local sizem = -size
|
||||||
|
|
||||||
function ENT:Initialize()
|
function ENT:Initialize()
|
||||||
self:SetModel( "models/weapons/w_eq_fraggrenade_thrown.mdl" )
|
self:SetModel( self.Model )
|
||||||
if SERVER then
|
if SERVER then
|
||||||
self:PhysicsInitBox( sizem, size, SOLID_VPHYSICS )
|
self:PhysicsInitBox( sizem, size, SOLID_VPHYSICS )
|
||||||
self:SetMoveType( MOVETYPE_VPHYSICS )
|
self:SetMoveType( MOVETYPE_VPHYSICS )
|
||||||
|
@ -27,25 +28,14 @@ end
|
||||||
function ENT:Think()
|
function ENT:Think()
|
||||||
if SERVER and self.Fuse <= CurTime() then
|
if SERVER and self.Fuse <= CurTime() then
|
||||||
self:Explode()
|
self:Explode()
|
||||||
self:Remove()
|
|
||||||
end
|
end
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local explosionflags = 0x2 + 0x4 + 0x80
|
local explosionflags = 0x2 + 0x4 + 0x80
|
||||||
function ENT:Explode()
|
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 )
|
|
||||||
return
|
|
||||||
end
|
end
|
||||||
|
|
||||||
function ENT:PhysicsCollide( data, phys )
|
function ENT:PhysicsCollide( data, phys )
|
||||||
if ( data.Speed > 100 ) then phys:SetVelocity( data.OurNewVelocity/2 ) end
|
if ( data.Speed > 100 ) then phys:SetVelocity( (-data.HitNormal * data.OurNewVelocity:Length()) * 0.25 + (data.OurNewVelocity*0.5) ) phys:SetAngleVelocity( phys:GetAngleVelocity()*0.5 ) end
|
||||||
end
|
end
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,17 @@
|
||||||
|
AddCSLuaFile()
|
||||||
|
|
||||||
|
ENT.Type = "anim"
|
||||||
|
ENT.Base = "benny_grenade"
|
||||||
|
|
||||||
|
ENT.Model = "models/weapons/w_eq_flashbang_thrown.mdl"
|
||||||
|
|
||||||
|
local explosionflags = 0x2 + 0x4 + 0x80
|
||||||
|
function ENT:Explode()
|
||||||
|
local effectdata = EffectData()
|
||||||
|
effectdata:SetOrigin( self:GetPos() )
|
||||||
|
effectdata:SetFlags( explosionflags )
|
||||||
|
util.Effect( "Explosion", effectdata )
|
||||||
|
|
||||||
|
self:Remove()
|
||||||
|
return
|
||||||
|
end
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,17 @@
|
||||||
|
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 )
|
||||||
|
|
||||||
|
self:Remove()
|
||||||
|
return
|
||||||
|
end
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,17 @@
|
||||||
|
AddCSLuaFile()
|
||||||
|
|
||||||
|
ENT.Type = "anim"
|
||||||
|
ENT.Base = "benny_grenade"
|
||||||
|
|
||||||
|
ENT.Model = "models/weapons/w_eq_smokegrenade_thrown.mdl"
|
||||||
|
|
||||||
|
local explosionflags = 0x2 + 0x4 + 0x80
|
||||||
|
function ENT:Explode()
|
||||||
|
local effectdata = EffectData()
|
||||||
|
effectdata:SetOrigin( self:GetPos() )
|
||||||
|
effectdata:SetFlags( explosionflags )
|
||||||
|
util.Effect( "Explosion", effectdata )
|
||||||
|
|
||||||
|
self:Remove()
|
||||||
|
return
|
||||||
|
end
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -0,0 +1,22 @@
|
||||||
|
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
|
|
@ -1,4 +0,0 @@
|
||||||
AddCSLuaFile()
|
|
||||||
|
|
||||||
ENT.Type = "anim"
|
|
||||||
ENT.Base = "bgrenade"
|
|
|
@ -42,7 +42,7 @@ function SWEP:PrimaryAttack()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
if self:BClass().Fire then
|
if self:BClass().Fire then
|
||||||
if self:BClass( false ).Fire( self, false ) then return end
|
if self:BClass( false ).Fire( self, self:BClass( false ), self:BTable( false ) ) then return end
|
||||||
end
|
end
|
||||||
if self:GetDelay1() > CurTime() then
|
if self:GetDelay1() > CurTime() then
|
||||||
return
|
return
|
||||||
|
@ -114,7 +114,7 @@ end
|
||||||
function SWEP:Reload()
|
function SWEP:Reload()
|
||||||
if self:BTable( false ) and self:GetOwner():KeyPressed( IN_RELOAD ) then
|
if self:BTable( false ) and self:GetOwner():KeyPressed( IN_RELOAD ) then
|
||||||
if self:BClass().Reload then
|
if self:BClass().Reload then
|
||||||
if self:BClass( false ).Reload( self, false ) then return end
|
if self:BClass( false ).Reload( self, self:BClass( false ), self:BTable( false ) ) then return end
|
||||||
end
|
end
|
||||||
if self:GetDelay1() > CurTime() then
|
if self:GetDelay1() > CurTime() then
|
||||||
return false
|
return false
|
||||||
|
@ -171,6 +171,12 @@ function SWEP:Think()
|
||||||
elseif ht != "normal" and self:GetHoldType() == "normal" then
|
elseif ht != "normal" and self:GetHoldType() == "normal" then
|
||||||
self:TPDraw()
|
self:TPDraw()
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if self:BClass( false ) then
|
||||||
|
if self:BClass( false ).Think then
|
||||||
|
self:BClass( false ).Think( self, self:BClass( false ), self:BTable( false ) )
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
self:SetWeaponHoldType(ht)
|
self:SetWeaponHoldType(ht)
|
||||||
self:SetHoldType(ht)
|
self:SetHoldType(ht)
|
||||||
|
|
|
@ -150,14 +150,14 @@ do -- Toolgun
|
||||||
local ToolGunTools = {
|
local ToolGunTools = {
|
||||||
["ammocrate"] = function( self, p, tr )
|
["ammocrate"] = function( self, p, tr )
|
||||||
if SERVER then
|
if SERVER then
|
||||||
local summon = ents.Create( "bitem_ammo" )
|
local summon = ents.Create( "benny_equipment_ammo" )
|
||||||
summon:SetPos( tr.HitPos + tr.HitNormal )
|
summon:SetPos( tr.HitPos + tr.HitNormal )
|
||||||
summon:Spawn()
|
summon:Spawn()
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
["summon_human"] = function( self, p, tr )
|
["summon_human"] = function( self, p, tr )
|
||||||
if SERVER then
|
if SERVER then
|
||||||
local summon = ents.Create( "bnpc_human" )
|
local summon = ents.Create( "benny_npc_human" )
|
||||||
summon:SetPos( tr.HitPos + tr.HitNormal )
|
summon:SetPos( tr.HitPos + tr.HitNormal )
|
||||||
summon:Spawn()
|
summon:Spawn()
|
||||||
end
|
end
|
||||||
|
@ -882,7 +882,7 @@ end
|
||||||
|
|
||||||
do -- Grenades, nothing here is guaranteed.
|
do -- Grenades, nothing here is guaranteed.
|
||||||
|
|
||||||
local function GrenadeFire( self )
|
local function GrenadeFire( self, class, table )
|
||||||
local p = self:GetOwner()
|
local p = self:GetOwner()
|
||||||
if self:GetDelay1() > CurTime() then
|
if self:GetDelay1() > CurTime() then
|
||||||
return true
|
return true
|
||||||
|
@ -893,15 +893,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
|
|
||||||
-- PROTO: See to getting this done better. Maybe it's spawned while priming the nade for low CL-SV/phys delay?
|
-- PROTO: See to getting this done better. Maybe it's spawned while priming the nade for low CL-SV/phys delay?
|
||||||
if SERVER then
|
if SERVER then
|
||||||
local GENT = ents.Create( "bgrenade_frag" )
|
local GENT = ents.Create( class.GrenadeEnt )
|
||||||
GENT:SetOwner( p )
|
GENT:SetOwner( p )
|
||||||
GENT:SetPos( p:EyePos() + (p:EyeAngles():Forward()*16) )
|
local ang = p:EyeAngles()
|
||||||
GENT:SetAngles( p:EyeAngles() + Angle( 0, 0, -90 ) )
|
ang.p = ang.p - 5
|
||||||
GENT.Fuse = CurTime() + 4
|
GENT:SetPos( p:EyePos() + (ang:Forward()*16) )
|
||||||
|
GENT:SetAngles( ang + Angle( 0, 0, -90 ) )
|
||||||
|
GENT.Fuse = CurTime() + class.GrenadeFuse
|
||||||
GENT:Spawn()
|
GENT:Spawn()
|
||||||
|
|
||||||
local velocity = p:EyeAngles():Forward() * 1500
|
local velocity = ang:Forward() * 1500
|
||||||
velocity:Mul( Lerp( math.TimeFraction( 90, 0, p:EyeAngles().p ), 0, 1 ) )
|
velocity:Mul( Lerp( math.TimeFraction( 90, 0, ang.p ), 0, 1 ) )
|
||||||
-- velocity:Add( p:EyeAngles():Up() * 500 * Lerp( math.TimeFraction( 0, -90, p:EyeAngles().p ), 0, 1 ) )
|
-- velocity:Add( p:EyeAngles():Up() * 500 * Lerp( math.TimeFraction( 0, -90, p:EyeAngles().p ), 0, 1 ) )
|
||||||
|
|
||||||
GENT:GetPhysicsObject():SetVelocity( velocity )
|
GENT:GetPhysicsObject():SetVelocity( velocity )
|
||||||
|
@ -910,8 +912,11 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
local function GrenadeThink()
|
local function GrenadeReload( self, class )
|
||||||
-- print("yay")
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function GrenadeThink( self, class )
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -921,8 +926,13 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
Fire = GrenadeFire,
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_frag",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_fraggrenade.mdl",
|
||||||
HoldType = "grenade",
|
HoldType = "grenade",
|
||||||
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
|
@ -933,8 +943,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "SEMTEX GRENADE",
|
Name = "SEMTEX GRENADE",
|
||||||
Description = "Long, audible fuse, but sticks to whatever it touches.",
|
Description = "Long, audible fuse, but sticks to whatever it touches.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_semtex",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -943,8 +962,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "MOLOTOV COCKTAIL",
|
Name = "MOLOTOV COCKTAIL",
|
||||||
Description = "Alcoholic bottle of flame!",
|
Description = "Alcoholic bottle of flame!",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_molotov",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -953,8 +981,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "THROWING KNIFE",
|
Name = "THROWING KNIFE",
|
||||||
Description = "Lightweight knife to throw and pick back up.",
|
Description = "Lightweight knife to throw and pick back up.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_tknife",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -963,8 +1000,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "SMOKE GRENADE",
|
Name = "SMOKE GRENADE",
|
||||||
Description = "Smoke bomb used to conceal a position, and makes enemies cough.",
|
Description = "Smoke bomb used to conceal a position, and makes enemies cough.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_smoke",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -973,8 +1019,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "FLASHBANG",
|
Name = "FLASHBANG",
|
||||||
Description = "Stun grenade that gives off a bright flash and a loud 'bang'.",
|
Description = "Stun grenade that gives off a bright flash and a loud 'bang'.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_flashbang",
|
||||||
|
GrenadeFuse = 2,
|
||||||
|
GrenadeCharge = false,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -983,8 +1038,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "GAS GRENADE",
|
Name = "GAS GRENADE",
|
||||||
Description = "Short burst of gas that slows and disorient targets.",
|
Description = "Short burst of gas that slows and disorient targets.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_gas",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -993,8 +1057,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "PROXIMITY MINE",
|
Name = "PROXIMITY MINE",
|
||||||
Description = "Mine that bounces into the air.",
|
Description = "Mine that bounces into the air.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_prox",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -1003,8 +1076,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "CLAYMORE",
|
Name = "CLAYMORE",
|
||||||
Description = "Mine that shoots shrapnel in a cone.",
|
Description = "Mine that shoots shrapnel in a cone.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_claymore",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -1013,8 +1095,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "SCRAMBLER",
|
Name = "SCRAMBLER",
|
||||||
Description = "Disrupts enemy radar based on proximity.",
|
Description = "Disrupts enemy radar based on proximity.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_scrambler",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -1023,8 +1114,17 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "EMP NADE",
|
Name = "EMP NADE",
|
||||||
Description = "Disrupts enemy equipment based on proximity.",
|
Description = "Disrupts enemy equipment based on proximity.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_emp",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
@ -1033,8 +1133,36 @@ do -- Grenades, nothing here is guaranteed.
|
||||||
Name = "SHOCK CHARGE",
|
Name = "SHOCK CHARGE",
|
||||||
Description = "Charge that stuns and forces enemies to fire their weapons.",
|
Description = "Charge that stuns and forces enemies to fire their weapons.",
|
||||||
Type = "grenade",
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_shockcharge",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
WModel = "models/weapons/w_eq_flashbang.mdl",
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
|
Features = "grenade",
|
||||||
|
}
|
||||||
|
|
||||||
|
WEAPONS["g_thermobaric"] = {
|
||||||
|
Name = "THERMOBARIC GRENADE",
|
||||||
|
Description = "Burns through armor.",
|
||||||
|
Type = "grenade",
|
||||||
|
|
||||||
|
Fire = GrenadeFire,
|
||||||
|
Reload = GrenadeReload,
|
||||||
|
Think = GrenadeThink,
|
||||||
|
GrenadeEnt = "benny_grenade_thermobaric",
|
||||||
|
GrenadeFuse = 4,
|
||||||
|
GrenadeCharge = true,
|
||||||
|
|
||||||
|
WModel = "models/weapons/w_eq_flashbang.mdl",
|
||||||
|
HoldType = "grenade",
|
||||||
|
GestureFire = { ACT_HL2MP_GESTURE_RANGE_ATTACK_GRENADE, 0 },
|
||||||
|
|
||||||
Features = "grenade",
|
Features = "grenade",
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue