This commit is contained in:
lifestorm
2024-08-04 22:55:00 +03:00
parent 0e770b2b49
commit 94063e4369
7342 changed files with 1718932 additions and 14 deletions

View File

@@ -0,0 +1,49 @@
--[[
| 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/
--]]
AddCSLuaFile()
ENT.Base = "arccw_ammo"
ENT.PrintName = "Rifle Grenade"
ENT.Category = "ArcCW - Ammo"
ENT.Spawnable = true
ENT.Model = "models/Items/AR2_Grenade.mdl"
ENT.Health = 15
ENT.AmmoType = "smg1_grenade"
ENT.AmmoCount = 1
ENT.DetonationDamage = 50 -- Per-round damage
ENT.DetonationRadius = 300
function ENT:DetonateRound(attacker)
local nade = ents.Create("arccw_gl_ammodet")
nade:SetPos(self:GetPos())
nade:SetAngles(self:GetAngles() + AngleRand(-10, 10))
nade:Spawn()
nade:GetPhysicsObject():AddVelocity(self:GetVelocity() + self:GetForward() * math.random(500, 2000))
nade:SetOwner(attacker or self.Burner)
self:Remove()
end
function ENT:Detonate(wet, attacker)
if wet then
self:DetonateRound(attacker)
else
local e = EffectData()
e:SetOrigin(self:GetPos())
util.Effect("Explosion", e)
util.BlastDamage(self, attacker, self:GetPos(), self.DetonationRadius, self.DetonationDamage)
self:Remove()
end
end