mirror of
https://github.com/lifestorm/wnsrc.git
synced 2025-12-18 06:03:47 +03:00
Upload
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
include("shared.lua");
|
||||
|
||||
function ENT:Think()
|
||||
local dlight = DynamicLight( self:EntIndex() );
|
||||
|
||||
cam.Start3D( EyePos(), EyeAngles() );
|
||||
for k, v in ipairs( player.GetAll() ) do
|
||||
if (v:Alive()) then
|
||||
if ( dlight and v == self.Owner ) then
|
||||
local lightVector = self:GetPos();
|
||||
lightVector:Add(Vector(0,2,0));
|
||||
|
||||
dlight.Pos = lightVector;
|
||||
dlight.r = 30;
|
||||
dlight.g = 255;
|
||||
dlight.b = 30;
|
||||
dlight.Brightness = 0;
|
||||
dlight.Size = 700;
|
||||
dlight.Decay = 5;
|
||||
dlight.DieTime = CurTime() + 0.1;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
cam.End3D();
|
||||
end;
|
||||
@@ -0,0 +1,37 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
include("shared.lua");
|
||||
|
||||
AddCSLuaFile("cl_init.lua");
|
||||
AddCSLuaFile("shared.lua");
|
||||
|
||||
function ENT:Initialize()
|
||||
self:SetMoveType( MOVETYPE_NONE );
|
||||
self:SetSolid( SOLID_NONE );
|
||||
self:SetCollisionGroup( COLLISION_GROUP_NONE );
|
||||
ent:SetModel("models/error.mdl");
|
||||
ent:SetColor( Color(0,0,0,0) );
|
||||
ent:DrawShadow(false);
|
||||
end;
|
||||
|
||||
function ENT:SetOwnerVariable(owner)
|
||||
self.Owner = owner;
|
||||
end;
|
||||
|
||||
function ENT:RemoveLight(owner)
|
||||
local worldmodel = ents.FindInSphere(owner:GetPos(), 0.6);
|
||||
|
||||
for k, v in pairs(worldmodel) do
|
||||
if (v:GetClass() == "ix_nvlight" and v:GetOwner() == owner) then
|
||||
v:Remove();
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@@ -0,0 +1,17 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
DEFINE_BASECLASS("base_gmodentity");
|
||||
|
||||
ENT.Type = "anim";
|
||||
ENT.Author = "RJ";
|
||||
ENT.PrintName = "Lumière de vision";
|
||||
ENT.Spawnable = false;
|
||||
ENT.AdminSpawnable = false;
|
||||
@@ -0,0 +1,105 @@
|
||||
--[[
|
||||
| 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/
|
||||
--]]
|
||||
|
||||
ENT.Type = "anim"
|
||||
ENT.PrintName = "Bouclier de Vortigaunt"
|
||||
ENT.Category = "HL2RP"
|
||||
ENT.Spawnable = true
|
||||
ENT.bNoPersist = true
|
||||
ENT.AutomaticFrameAdvance = true
|
||||
|
||||
if (SERVER) then
|
||||
function ENT:Initialize()
|
||||
self:SetModel("models/props_phx/construct/metal_dome360.mdl")
|
||||
self:PhysicsInit(SOLID_VPHYSICS)
|
||||
|
||||
local physObj = self:GetPhysicsObject()
|
||||
if (IsValid(physObj)) then
|
||||
physObj:Wake()
|
||||
end
|
||||
|
||||
self:SetCollisionGroup(COLLISION_GROUP_DEBRIS_TRIGGER)
|
||||
self:SetSolid(SOLID_VPHYSICS)
|
||||
self:AddEffects(EF_NOSHADOW)
|
||||
self:AddEFlags(EFL_DONTBLOCKLOS)
|
||||
self:SetRenderMode(RENDERMODE_WORLDGLOW)
|
||||
|
||||
self:SetMaterial("models/props_combine/stasisshield_sheet")
|
||||
self:SetColor(Color(0, 255, 55, 255))
|
||||
self:SetModelScale(1.2)
|
||||
self:SetHealth(ix.config.Get("VortShieldHealth", 500))
|
||||
|
||||
timer.Simple(0.25, function()
|
||||
ParticleEffectAttach("vort_shield_parent", PATTACH_ABSORIGIN_FOLLOW, self, 0)
|
||||
end)
|
||||
end
|
||||
|
||||
function ENT:OnTakeDamage(dmginfo)
|
||||
self:EmitSound("ambient/energy/ion_cannon_shot"..math.random(1, 3)..".wav")
|
||||
|
||||
ParticleEffect("vortigaunt_glow_beam_cp0", dmginfo:GetDamagePosition(), Angle(0, 0, 0), self)
|
||||
|
||||
self:SetHealth(math.Clamp(self:Health() - dmginfo:GetDamage(), 0, 350))
|
||||
|
||||
if self:Health() <= 0 then
|
||||
self:Die()
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:ImpactTrace(trace, dmgtype, customimpactname)
|
||||
if (trace.HitSky) then
|
||||
return
|
||||
end
|
||||
|
||||
local effectdata = EffectData()
|
||||
effectdata:SetOrigin(trace.HitPos + trace.HitNormal)
|
||||
effectdata:SetNormal(trace.HitNormal)
|
||||
util.Effect("AR2Impact", effectdata)
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
function ENT:Die()
|
||||
ParticleEffect("vortigaunt_charge_token", self:GetPos()*15, Angle(0, 0, 0))
|
||||
|
||||
self:EmitSound("ambient/levels/labs/electric_explosion1.wav", 80, 100, 1, CHAN_WEAPON)
|
||||
|
||||
self:Remove()
|
||||
end
|
||||
|
||||
function ENT:Think()
|
||||
if (!IsValid(self:GetOwner()) or !self:GetOwner():IsVortigaunt()) then
|
||||
self:Remove()
|
||||
end
|
||||
self:NextThink(CurTime() + 0.1)
|
||||
|
||||
return true
|
||||
end
|
||||
else
|
||||
function ENT:Think()
|
||||
if IsValid(self:GetOwner()) and self:GetOwner():Alive() then
|
||||
local lightVector = self:GetPos() + self:GetUp()*15
|
||||
local dlight = DynamicLight(self:EntIndex())
|
||||
dlight.Pos = lightVector
|
||||
dlight.r = 30
|
||||
dlight.g = 255
|
||||
dlight.b = 30
|
||||
dlight.Brightness = 0
|
||||
dlight.Size = 700
|
||||
dlight.Decay = 5
|
||||
dlight.DieTime = CurTime() + 0.1
|
||||
end
|
||||
end
|
||||
|
||||
function ENT:Draw()
|
||||
self:DrawModel()
|
||||
self:RemoveAllDecals()
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user