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,21 @@
--[[
| 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("shared.lua")
include('shared.lua')
/*-----------------------------------------------
*** Copyright (c) 2012-2023 by DrVrej, All rights reserved. ***
No parts of this code or any of its contents may be reproduced, copied, modified or adapted,
without the prior written consent of the author, unless otherwise indicated for stand-alone materials.
-----------------------------------------------*/
ENT.Model = {"models/vj_hlr/hl2/floor_turret.mdl"} -- The game will pick a random model from the table when the SNPC is spawned | Add as many as you want
ENT.VJ_NPC_Class = {"CLASS_PLAYER_ALLY"} -- NPCs with the same class with be allied to each other
ENT.PlayerFriendly = true
ENT.FriendsWithAllPlayerAllies = true

View File

@@ -0,0 +1,45 @@
--[[
| 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.Base = "npc_vj_hlr2_com_sentry"
ENT.Type = "ai"
ENT.PrintName = "Resistance Sentry Gun"
ENT.Author = "DrVrej"
ENT.Contact = "http://steamcommunity.com/groups/vrejgaming"
ENT.Purpose = "Spawn it and fight with it!"
ENT.Instructions = "Click on the spawnicon to spawn it."
ENT.Category = "Half-Life Resurgence"
if CLIENT then
local matLaser = Material("vj_hl/sprites/hl2/turret_laser_fade")
local laserColor = Color(255, 0, 0)
--
function ENT:Initialize()
local attStart = self:LookupAttachment("laser_start")
local attEnd = self:LookupAttachment("laser_end")
local hookName = "VJ_HLR_TurretLaser_" .. self:EntIndex()
hook.Add("PreDrawEffects", hookName, function()
if !IsValid(self) then
hook.Remove("PreDrawEffects", hookName)
return
end
render.SetMaterial(matLaser)
render.DrawBeam(self:GetAttachment(attStart).Pos, self:GetAttachment(attEnd).Pos, 2, 0, 0.98, laserColor)
-- Good, but will take serious performance and is unnecessary for a tiny detail
/*local tr = util.TraceLine({
start = attStart.Pos,
endpos = attEnd.Pos,
filter = self,
})
// render.DrawBeam(tr.StartPos, tr.HitPos, 2, 0, 0.98, laserColor)*/
end)
end
end