Залив

This commit is contained in:
Refosel
2026-03-30 10:39:52 +03:00
commit 2b57c019cb
2010 changed files with 185745 additions and 0 deletions

View File

@@ -0,0 +1,3 @@
include("shared.lua")
killicon.Add("mg_arrow_stim", "VGUI/entities/mg_crossbow", Color(255, 0, 0, 255))

View File

@@ -0,0 +1,49 @@
AddCSLuaFile("cl_init.lua")
AddCSLuaFile("shared.lua")
include("shared.lua")
ENT.Model = Model("models/viper/mw/attachments/crossbow/attachment_vm_sn_crossbow_mag_stimbolt.mdl")
ENT.AoeEntity = nil
local BaseClass = baseclass.Get(ENT.Base)
local function isCowerSupportedForNPC(npc)
for _, a in pairs(npc:GetSequenceList()) do
if (npc:GetSequenceActivity(npc:LookupSequence(a)) == ACT_COWER) then
return true
end
end
return false
end
local function determineHealRelationship(ent, owner)
if (ent:IsNPC()) then
return ent:Disposition(owner) == D_LI
end
if (ent:IsPlayer()) then
return ent:Team() == owner:Team()
end
return false
end
function ENT:Impact(tr, phys, bHull)
BaseClass.Impact(self, tr, phys, bHull)
if (tr.HitSky) then
return
end
if (!IsValid(tr.Entity)) then
return
end
if (determineHealRelationship(tr.Entity, self:GetOwner())) then
tr.Entity:SetHealth(math.Clamp(tr.Entity:Health() + self.HealAmount, 0, tr.Entity:GetMaxHealth()))
tr.Entity:EmitSound("MW19_Crossbow.Heal")
ParticleEffect("arrow_heal", tr.HitPos, Angle(), nil, 0)
end
end

View File

@@ -0,0 +1,16 @@
ENT.Base = "mg_arrow"
ENT.Type = "anim"
ENT.HealAmount = 40
game.AddParticles("particles/mw19_attachments.pcf")
PrecacheParticleSystem("arrow_heal")
sound.Add({
name = "MW19_Crossbow.Heal",
channel = CHAN_BODY,
volume = 1,
level = 100,
pitch = {95, 105},
sound = {"@viper/shared/heal.wav"}
})