aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/npc/sv_common.lua
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2018-11-03 18:23:45 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2018-11-03 18:23:45 -0400
commit28affa22541b9ef251707793f6b1c1a26d663592 (patch)
tree622754894d75c74dc5e8516ccf184ad4bf328fef /gamemode/core/npc/sv_common.lua
parentc639e7c7c6ab1595fdce39f56312e3d6a886bbe8 (diff)
downloadartery-28affa22541b9ef251707793f6b1c1a26d663592.tar.gz
artery-28affa22541b9ef251707793f6b1c1a26d663592.tar.bz2
artery-28affa22541b9ef251707793f6b1c1a26d663592.zip
Started on new npc system
Started work on the new npc system
Diffstat (limited to 'gamemode/core/npc/sv_common.lua')
-rw-r--r--gamemode/core/npc/sv_common.lua38
1 files changed, 0 insertions, 38 deletions
diff --git a/gamemode/core/npc/sv_common.lua b/gamemode/core/npc/sv_common.lua
deleted file mode 100644
index e37a5f8..0000000
--- a/gamemode/core/npc/sv_common.lua
+++ /dev/null
@@ -1,38 +0,0 @@
---[[
- Some common functions that a lot of npcs use, take out here to make fixing bugs easier.
-]]
-
-local com = {}
-
-com.pausefor10sec = function(npc)
- npc.StartActionTime = CurTime() + 10
- npc:SetSequence(npc:LookupSequence("idle"))
- npc.loco:FaceTowards(Vector(-343, 148, 565))
- local oyaw,oacc = npc.loco:GetMaxYawRate(), npc.loco:GetAcceleration()
- timer.Simple(0,function()
- npc.loco:SetMaxYawRate(0)
- npc.loco:SetAcceleration(0)
- npc.loco:SetVelocity(Vector(0,0,0))
- end)
- timer.Simple(10, function()
- npc.loco:SetMaxYawRate(oyaw)
- npc.loco:SetAcceleration(oacc)
- end)
-end
-
-com.is10secdone = function(npc)
- return npc.StartActionTime < CurTime()
-end
-
-com.Rumors = {
- "This is a rumor!",
- "Here is another!",
- "And yet another!",
-}
-
-com.GetRumor = function()
- local rng = math.random(#com.Rumors)
- return com.Rumors[rng]
-end
-
-return com