summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--content/data/map_static/gms_costal_outlands/barrows5
-rw-r--r--content/data/map_static/gms_costal_outlands/trees35
-rw-r--r--content/data/map_static/gms_minisurvival_v2/barrows2
-rw-r--r--content/data/map_static/gms_nowhere2/barrows2
-rw-r--r--content/data/map_static/gms_rollinghills/trees0
-rw-r--r--content/data/map_static/gms_rollinghills_daynight/barrows2
-rw-r--r--content/data/map_static/gms_rollinghills_daynight/trees0
-rw-r--r--content/data/map_static/gms_rollinghills_daynight_b1/barrows2
-rw-r--r--content/data/map_static/gms_rollinghills_daynight_b1/trees0
-rw-r--r--gamemode/init.lua69
-rw-r--r--gamemode/init_static.lua16
11 files changed, 58 insertions, 75 deletions
diff --git a/content/data/map_static/gms_costal_outlands/barrows b/content/data/map_static/gms_costal_outlands/barrows
new file mode 100644
index 0000000..2479fb2
--- /dev/null
+++ b/content/data/map_static/gms_costal_outlands/barrows
@@ -0,0 +1,5 @@
+5682.056152 -504.173035 181.781555
+5960.534180 10054.454102 83.857697
+2401.916504 431.268372 -11125.555664
+3803.869141 7341.371094 -11190.447266
+2804.810303 12146.677734 -9125.259766
diff --git a/content/data/map_static/gms_costal_outlands/trees b/content/data/map_static/gms_costal_outlands/trees
new file mode 100644
index 0000000..1e16fe3
--- /dev/null
+++ b/content/data/map_static/gms_costal_outlands/trees
@@ -0,0 +1,35 @@
+1462.160522 -3664.370361 -10941.564453
+3718.633545 -1710.644409 -11269.974609
+3159.402588 145.593597 -11045.797852
+2519.847168 -547.534180 -11161.646484
+4932.186035 4456.111328 -11258.104492
+4781.265137 6047.670410 -11249.711914
+3673.399170 5922.402832 -11243.965820
+3063.780273 6409.881348 -11238.132813
+5274.083496 8890.347656 -10530.000000
+5899.765137 6888.799316 -10543.629883
+6781.679199 6864.066895 -10404.078125
+7762.570313 8027.228516 -9794.528320
+3582.199219 8849.200195 -10587.720703
+2345.549072 9190.130859 -9654.171875
+-184.908630 9758.339844 -9654.647461
+-1548.173218 10890.804688 -9306.844727
+-791.436951 11616.236328 -9311.025391
+-1412.835571 12691.185547 -9611.835938
+504.700775 13039.500977 -9156.863281
+1297.606201 12465.360352 -9147.304688
+2329.148193 11747.046875 -9157.968750
+3458.504883 9959.944336 -9299.968750
+5360.672363 4706.935547 344.907623
+4492.113281 4696.718750 319.830444
+4619.547852 5449.032715 407.463806
+5092.520508 5595.101563 535.216309
+5451.174805 4665.181152 354.842255
+4171.684570 2509.103271 370.570892
+5031.233398 1786.687256 311.406921
+4515.268555 136.138535 327.624390
+2986.565674 -3083.914551 866.749268
+3086.577148 -7007.732910 1510.264038
+3577.333252 -9913.345703 1559.749146
+2075.320313 9463.977539 152.691238
+7145.083008 8708.809570 -9852.012695
diff --git a/content/data/map_static/gms_minisurvival_v2/barrows b/content/data/map_static/gms_minisurvival_v2/barrows
new file mode 100644
index 0000000..1ae4318
--- /dev/null
+++ b/content/data/map_static/gms_minisurvival_v2/barrows
@@ -0,0 +1,2 @@
+-2818.7075 3132.7507 -529.3529
+-1423.5445 -1801.8461 -521.4026
diff --git a/content/data/map_static/gms_nowhere2/barrows b/content/data/map_static/gms_nowhere2/barrows
new file mode 100644
index 0000000..be2a1e8
--- /dev/null
+++ b/content/data/map_static/gms_nowhere2/barrows
@@ -0,0 +1,2 @@
+3918.7753 5111.8149 7.5218
+-2061.3061 4842.8325 7.6148
diff --git a/content/data/map_static/gms_rollinghills/trees b/content/data/map_static/gms_rollinghills/trees
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/content/data/map_static/gms_rollinghills/trees
diff --git a/content/data/map_static/gms_rollinghills_daynight/barrows b/content/data/map_static/gms_rollinghills_daynight/barrows
new file mode 100644
index 0000000..fc421d0
--- /dev/null
+++ b/content/data/map_static/gms_rollinghills_daynight/barrows
@@ -0,0 +1,2 @@
+3131.2876 -980.5972 519.5605
+-4225.0200 6009.3516 513.1411
diff --git a/content/data/map_static/gms_rollinghills_daynight/trees b/content/data/map_static/gms_rollinghills_daynight/trees
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/content/data/map_static/gms_rollinghills_daynight/trees
diff --git a/content/data/map_static/gms_rollinghills_daynight_b1/barrows b/content/data/map_static/gms_rollinghills_daynight_b1/barrows
new file mode 100644
index 0000000..fc421d0
--- /dev/null
+++ b/content/data/map_static/gms_rollinghills_daynight_b1/barrows
@@ -0,0 +1,2 @@
+3131.2876 -980.5972 519.5605
+-4225.0200 6009.3516 513.1411
diff --git a/content/data/map_static/gms_rollinghills_daynight_b1/trees b/content/data/map_static/gms_rollinghills_daynight_b1/trees
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/content/data/map_static/gms_rollinghills_daynight_b1/trees
diff --git a/gamemode/init.lua b/gamemode/init.lua
index cc06bf4..57c2832 100644
--- a/gamemode/init.lua
+++ b/gamemode/init.lua
@@ -42,70 +42,11 @@ GM.NextLoaded = 0
GM.AntlionBarrowSpawns = {}
--GM.AntlionBarrowSpawns[ "gm_construct" ] = { Vector( -4321.8149, -2551.3449, 257.5130 ) }
-print("Loading spawns for gm_construct")
-GM.AntlionBarrowSpawns["gm_construct"] = loadBarrows("gm_construct")
---GM.AntlionBarrowSpawns[ "gms_rollinghills" ] = { Vector( 3131.2876, -980.5972, 519.5605 ), Vector( -4225.0200, 6009.3516, 513.1411 ) }
-GM.AntlionBarrowSpawns["gms_rollinghills"] = loadBarrows("gms_rollinghills")
-GM.AntlionBarrowSpawns[ "gms_rollinghills_daynight" ] = GM.AntlionBarrowSpawns[ "gms_rollinghills" ]
-GM.AntlionBarrowSpawns[ "gms_rollinghills_daynight_b1" ] = GM.AntlionBarrowSpawns[ "gms_rollinghills" ]
-
-GM.AntlionBarrowSpawns[ "gms_nowhere2" ] = { Vector( 3918.7753, 5111.8149, 7.5218 ), Vector( -2061.3061, 4842.8325, 7.6148 ) }
-GM.AntlionBarrowSpawns[ "gms_minisurvival_v2" ] = { Vector( -2818.7075, 3132.7507, -529.3529 ), Vector( -1423.5445, -1801.8461, -521.4026 ) }
-
-GM.AntlionBarrowSpawns[ "gms_coastal_outlands" ] = {
-
-Vector( 5682.056152, -504.173035, 181.781555 ),
-Vector( 5960.534180, 10054.454102, 83.857697 ),
-Vector( 2401.916504, 431.268372, -11125.555664 ),
-Vector( 3803.869141, 7341.371094, -11190.447266 ),
-Vector( 2804.810303, 12146.677734, -9125.259766 ),
-
-}
-
-GM.TreeSpawns = {}
-
-GM.TreeSpawns[ "gms_coastal_outlands" ] = {
-
-// The third coordinate is the height coordinate
-// Always subtract 70 to the height coord if it is positive so that the tree will be touching the floor
-
-Vector( 1462.160522, -3664.370361, -10941.564453 ),
-Vector( 3718.633545, -1710.644409, -11269.974609 ),
-Vector( 3159.402588, 145.593597, -11045.797852 ),
-Vector( 2519.847168, -547.534180, -11161.646484 ),
-Vector( 4932.186035, 4456.111328, -11258.104492 ),
-Vector( 4781.265137, 6047.670410, -11249.711914 ),
-Vector( 3673.399170, 5922.402832, -11243.965820 ),
-Vector( 3063.780273, 6409.881348, -11238.132813 ),
-Vector( 5274.083496, 8890.347656, -10530.000000 ),
-Vector( 5899.765137, 6888.799316, -10543.629883 ),
-Vector( 6781.679199, 6864.066895, -10404.078125 ),
-Vector( 7762.570313, 8027.228516, -9794.528320 ),
-Vector( 3582.199219, 8849.200195, -10587.720703 ),
-Vector( 2345.549072, 9190.130859, -9654.171875 ),
-Vector( -184.908630, 9758.339844, -9654.647461 ),
-Vector( -1548.173218, 10890.804688, -9306.844727 ),
-Vector( -791.436951, 11616.236328, -9311.025391 ),
-Vector( -1412.835571, 12691.185547, -9611.835938 ),
-Vector( 504.700775, 13039.500977, -9156.863281 ),
-Vector( 1297.606201, 12465.360352, -9147.304688 ),
-Vector( 2329.148193, 11747.046875, -9157.968750 ),
-Vector( 3458.504883, 9959.944336, -9299.968750 ),
-Vector( 5360.672363, 4706.935547, 344.907623 ),
-Vector( 4492.113281, 4696.718750, 319.830444 ),
-Vector( 4619.547852, 5449.032715, 407.463806 ),
-Vector( 5092.520508, 5595.101563, 535.216309 ),
-Vector( 5451.174805, 4665.181152, 354.842255 ),
-Vector( 4171.684570, 2509.103271, 370.570892 ),
-Vector( 5031.233398, 1786.687256, 311.406921 ),
-Vector( 4515.268555, 136.138535, 327.624390 ),
-Vector( 2986.565674, -3083.914551, 866.749268 ),
-Vector( 3086.577148, -7007.732910, 1510.264038 ),
-Vector( 3577.333252, -9913.345703, 1559.749146 ),
-Vector( 2075.320313, 9463.977539, 152.691238 ),
-Vector( 7145.083008, 8708.809570, -9852.012695 )
-
-}
+local loadmaps = {"gm_construct","gms_rollinghills","gms_rollinghills_daynight","ggms_rollinghills_daynight_b1","gms_nowhere2","gms_minisurvival_v2","gms_coastal_outlands"}
+for k,v in pairs(loadmaps) do
+ GM.AntlionBarrowSpawns[v] = loadBarrows(v)
+ GM.TreeSpawns[v] = loadTrees(v)
+end
util.AddNetworkString('givePlayerWeapon')
util.AddNetworkString('givePlayerResource')
diff --git a/gamemode/init_static.lua b/gamemode/init_static.lua
index 467e614..c4b4c9a 100644
--- a/gamemode/init_static.lua
+++ b/gamemode/init_static.lua
@@ -2,22 +2,16 @@ print("Hello from init_static.lua")
function loaddata(mapname, filename)
local data = {}
- local filepath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. "content/data/" .. mapname .. "/" .. filename
- local testpath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. "content/*"
- local files, dirs = file.Find(testpath, "MOD")
- print("files:")
- PrintTable(files)
- print("dirs:")
- PrintTable(dirs)
+ local filepath = "gamemodes/" .. GM.GAMEMODE_FOLDER_NAME .. "/content/data/map_static/" .. mapname .. "/" .. filename
local strings = file.Read(filepath, "MOD")
if(strings == nil) then return end
- for k,v in pairs(strings) do
+ local strtab = string.Split(strings,"\n", false)
+ for k,v in pairs(strtab) do
parts = string.Explode(" ",v,false)
vec = Vector(tonumber(parts[1]),tonumber(parts[2]),tonumber(parts[3]))
- table.insert(data,nil,vec)
+ if(vec == Vector(0,0,0)) then continue end
+ table.insert(data,1,vec)
end
- print("Loaded data for " .. mapname)
- PrintTable(data)
return data
end