aboutsummaryrefslogtreecommitdiff
path: root/gamemode/core/mapstich
diff options
context:
space:
mode:
authorAlexander Pickering <alexandermpickering@gmail.com>2017-11-04 22:42:24 -0400
committerAlexander Pickering <alexandermpickering@gmail.com>2017-11-04 22:42:24 -0400
commit5d77d8475af7aff27eb026a4b56065387c024165 (patch)
treeccdd061e5654288ab53134be52e8b1ef194d5ebc /gamemode/core/mapstich
parent40080dcfde028c64c4f6f51792b928ee91677bc6 (diff)
downloadartery-5d77d8475af7aff27eb026a4b56065387c024165.tar.gz
artery-5d77d8475af7aff27eb026a4b56065387c024165.tar.bz2
artery-5d77d8475af7aff27eb026a4b56065387c024165.zip
Massive changes
* New error messages for missing dependencies * Removed useless art_serverchanger entity * Added a sweet ascii logo * Added Skills * Minor fixes to cl_inventory tracker * Changed a few prints to use logging module
Diffstat (limited to 'gamemode/core/mapstich')
-rw-r--r--gamemode/core/mapstich/cl_mapstich.lua9
-rw-r--r--gamemode/core/mapstich/sv_mapstich.lua2
2 files changed, 8 insertions, 3 deletions
diff --git a/gamemode/core/mapstich/cl_mapstich.lua b/gamemode/core/mapstich/cl_mapstich.lua
index 62cad3f..6f85eeb 100644
--- a/gamemode/core/mapstich/cl_mapstich.lua
+++ b/gamemode/core/mapstich/cl_mapstich.lua
@@ -1,9 +1,14 @@
--[[
The client constantly cheks to see if we're in a serverchnage zone
]]
-nrequire("sh_zones.lua")
+if not nrequire("sh_zones.lua") then return end
hook.Add("Think","artery_checklevelchange",function()
- local z = LocalPlayer():GetCurrentZone()
+ local z
+ pcall(function()
+ z = LocalPlayer():GetCurrentZone()
+ end,function()
+ --This happens ocasionally when the player has loaded, and is running lua, but the LocalPlayer() entity isn't valid yet.
+ end)
--print("looks like i'm in zone",z)
if z then
net.Start("art_zonechange")
diff --git a/gamemode/core/mapstich/sv_mapstich.lua b/gamemode/core/mapstich/sv_mapstich.lua
index 0a20828..91b4ec2 100644
--- a/gamemode/core/mapstich/sv_mapstich.lua
+++ b/gamemode/core/mapstich/sv_mapstich.lua
@@ -1,6 +1,6 @@
--Make sure zones are loaded already
nrequire("sv_mysqlite.lua")
-nrequire("sh_zones.lua")
+if not nrequire("sh_zones.lua") then return end
local q = nrequire("core/database/sv_queries.lua")
--if not zones then error("This thing needs zones to function!") end