AddCSLuaFile("shared.lua")
include('shared.lua')
/*-----------------------------------------------
	*** Copyright (c) 2012-2022 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.StartHealth = 200
ENT.UsePlayerModelMovement = true
ENT.Model = {"models/player/swat.mdl"}
ENT.IsHuman = true

ENT.BloodColor = "Red"

ENT.VJ_NPC_Class = {"VJ_PLAYER_ALLY"}
ENT.PlayerFriendly = true

ENT.HasMeleeAttack = true
ENT.AnimTbl_MeleeAttack = {"vjseq_seq_meleeattack01"}
ENT.HasCallForHelpAnimation = false
ENT.MeleeAttackDamage = 50

ENT.FootStepTimeRun = 0.3
ENT.FootStepTimeWalk = 0.5
ENT.DropWeaponOnDeath = false

ENT.SightDistance = 3000

ENT.SoundTbl_FootStep = {"npc/footsteps/hardboot_generic1.wav","npc/footsteps/hardboot_generic2.wav","npc/footsteps/hardboot_generic3.wav","npc/footsteps/hardboot_generic4.wav","npc/footsteps/hardboot_generic5.wav","npc/footsteps/hardboot_generic6.wav","npc/footsteps/hardboot_generic8.wav"}

ENT.HasItemDropsOnDeath = false

ENT.DeathCorpseFade = true
ENT.DeathCorpseFadeTime = 120

ENT.InvestigateSoundDistance = 20

ENT.HasItemDropsOnDeath = false
ENT.DropWeaponOnDeath = false
---------------------------------------------------------------------------------------------------------------------------------------------
function ENT:CustomOnPreInitialize()
	local rnd = math.random(1,4)
	if rnd == 1 then
		self.WaitForEnemyToComeOutTime = VJ_Set(10, 30)
	elseif rnd == 2 then
		self.HasGrenadeAttack = true
		self.ThrowGrenadeChance = 5
	elseif rnd == 3 then
		self.IsMedicSNPC = true
	end
end

function ENT:CustomOnInitialize()
	self.SearchTime = 0
	self.SearchWalkTime = 0
	local rnd = math.random(1,3)
	if rnd == 1 then
		self:Give("weapon_vj_m16a1")
	elseif rnd == 2 then
		self:Give("weapon_vj_spas12")
	else
		self:Give("weapon_vj_ssg08")
	end

	self:SetCustomCollisionCheck(true)
end