summaryrefslogtreecommitdiff
path: root/entities
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2016-06-25 18:18:21 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2016-06-25 18:18:21 -0400
commitbc4b0dbf3c305c42a6c0fa5bda492b8a786353a8 (patch)
treee1670a476a1ecc356f26fed065f2b30982ba8493 /entities
parent8d5d033446327e32a845e02d58e3d05103d5d867 (diff)
downloadredead-bc4b0dbf3c305c42a6c0fa5bda492b8a786353a8.tar.gz
redead-bc4b0dbf3c305c42a6c0fa5bda492b8a786353a8.tar.bz2
redead-bc4b0dbf3c305c42a6c0fa5bda492b8a786353a8.zip
Fixed client-side error on scientist npc's
Diffstat (limited to 'entities')
-rw-r--r--entities/entities/npc_nb_base/shared.lua42
-rw-r--r--entities/entities/npc_scientist/shared.lua2
-rw-r--r--entities/weapons/rad_itemplacer/shared.lua20
3 files changed, 59 insertions, 5 deletions
diff --git a/entities/entities/npc_nb_base/shared.lua b/entities/entities/npc_nb_base/shared.lua
index 5be63a5..2e5aeeb 100644
--- a/entities/entities/npc_nb_base/shared.lua
+++ b/entities/entities/npc_nb_base/shared.lua
@@ -35,7 +35,7 @@ Sound( "npc/zombie/claw_miss2.wav" ) }
ENT.VoiceSounds = {}
ENT.NextBot = true
-ENT.ShouldDrawPath = false
+ENT.ShouldDrawPath = true
ENT.Obstructed = false
ENT.FireDamageTime = 0
ENT.FireTime = 0
@@ -64,12 +64,19 @@ function ENT:Initialize()
self.loco:SetDeathDropHeight( 1000 )
self.loco:SetAcceleration( 500 )
self.loco:SetJumpHeight( self.JumpHeight )
+ print(self.loco)
+ --[[
+ self.loco.Jump = function()
+ print("I want to jump!")
+ end
+ ]]
end
self.DmgTable = {}
self.LastPos = self.Entity:GetPos()
self.Stuck = CurTime() + 1
+
end
function ENT:Think()
@@ -899,9 +906,36 @@ function ENT:EnemyRoutine()
end
end
+--[[
+function ENT:BehaveUpdate(interval)
+ if(self.timerThink == nil) then
+ self.timerThink = 0
+ self.path = Path("Chase")
+ print("Path is ")
+ print(self.path)
+ end
+ if(self.timerThink < CurTime()) then
+ self.timerThink = CurTime(1)+1
+ self.path:Compute(self,Entity(1):GetPos())
-function ENT:RunBehaviour()
+ end
+ local segment = self.path:GetCurrentGoal()
+ if(segment.type == 2) then
+ local tp = self:GetPos()
+ local fp = self:GetForward()*20
+ --If we can climb over this obstical, do that
+ self:SetPos(tp+Vector(0,0,50)+(fp/19))
+ self:PlaySequenceAndWait("pickup")
+ self:SetPos(tp+fp+Vector(0,0,50))
+ end
+ self.path:Update(self)
+ self.path:Draw()
+ --print("BehaveUpdate:" .. interval)
+end
+]]
+function ENT:RunBehaviour()
+ print("RunBehaviour fired")
while true do
self.Entity:StartActivity( self.MoveAnim )
@@ -955,6 +989,10 @@ function ENT:RunBehaviour()
end
+ if(self.path) then
+ print("Got a path!")
+ end
+
coroutine.yield()
end
diff --git a/entities/entities/npc_scientist/shared.lua b/entities/entities/npc_scientist/shared.lua
index d9d76dd..44f20b2 100644
--- a/entities/entities/npc_scientist/shared.lua
+++ b/entities/entities/npc_scientist/shared.lua
@@ -159,7 +159,7 @@ function ENT:StuckThink()
end
function ENT:Respawn()
-
+ if GAMEMODE.NPCSpawns == nil then return end
for k,v in pairs( GAMEMODE.NPCSpawns ) do
if IsValid( v ) then
diff --git a/entities/weapons/rad_itemplacer/shared.lua b/entities/weapons/rad_itemplacer/shared.lua
index 6ae189d..801092a 100644
--- a/entities/weapons/rad_itemplacer/shared.lua
+++ b/entities/weapons/rad_itemplacer/shared.lua
@@ -57,14 +57,30 @@ SWEP.ItemTypes = { "info_player_zombie",
"info_lootspawn",
"info_npcspawn",
"info_evac",
-"point_radiation" }
+"point_radiation",
+"rad_incendiarygrenade",
+"rad_grenade",
+"rad_revolver",
+"sent_c4",
+"sent_fuel_diesel",
+"sent_fuel_gas",
+"sent_propane_canister",
+"sent_propane_tank", }
SWEP.ServersideItems = { "info_player_zombie",
"info_player_army",
"info_lootspawn",
"info_npcspawn",
"info_evac",
-"point_radiation" }
+"point_radiation",
+"rad_incendiarygrenade",
+"rad_grenade",
+"rad_revolver",
+"sent_c4",
+"sent_fuel_diesel",
+"sent_fuel_gas",
+"sent_propane_canister",
+"sent_propane_tank", }
SWEP.SharedItems = {}