diff --git a/pkg/base/gen_classic.lua b/pkg/base/gen_classic.lua index b288f2f..9ea6ff5 100644 --- a/pkg/base/gen_classic.lua +++ b/pkg/base/gen_classic.lua @@ -18,7 +18,7 @@ do local loose, user_toggles, user_settings loose, user_toggles, user_settings = ... - local mw,mh,mt + local mw,mh,mt,mwater mw = user_settings["mw"] or 512 -- width mh = user_settings["mh"] or 512 -- height mt = user_settings["mt"] or 1.0 -- turbulence diff --git a/pkg/base/gen_flat.lua b/pkg/base/gen_flat.lua index 3cdd4d8..c7c5ee1 100644 --- a/pkg/base/gen_flat.lua +++ b/pkg/base/gen_flat.lua @@ -31,7 +31,7 @@ do common.map_set(ret) for x=0,mx-1 do for z=0,mz-1 do - l = {0, my - depth, my - depth, 0, b, g, r, 1} + local l = {0, my - depth, my - depth, 0, b, g, r, 1} common.map_pillar_set(x, z, l) end end diff --git a/pkg/base/main_server.lua b/pkg/base/main_server.lua index a8e1ba9..266d940 100644 --- a/pkg/base/main_server.lua +++ b/pkg/base/main_server.lua @@ -98,6 +98,7 @@ function slot_add(neth, tidx, wpn, name) -- TODO: actually balance this properly! tidx = (i-1) % 2 end + local _wpn if MODE_TEAM_GUNS then _wpn = tidx + 1 else diff --git a/pkg/base/obj_player.lua b/pkg/base/obj_player.lua index e883504..753a20c 100644 --- a/pkg/base/obj_player.lua +++ b/pkg/base/obj_player.lua @@ -353,12 +353,12 @@ function new_player(settings) end function this.tool_switch_next() - new_tool = (this.tool + 1) % #this.tools + local new_tool = (this.tool + 1) % #this.tools this.tool_switch(new_tool) end function this.tool_switch_prev() - new_tool = (this.tool - 1) % #this.tools + local new_tool = (this.tool - 1) % #this.tools this.tool_switch(new_tool) end @@ -559,7 +559,7 @@ function new_player(settings) function this.fall_damage(amt) --print("damage",this.name,part,amt) local l = teams[this.team].color_chat - r,g,b = l[1],l[2],l[3] + local r,g,b = l[1],l[2],l[3] local c = argb_split_to_merged(r,g,b) @@ -873,6 +873,7 @@ function new_player(settings) end end + local tx1,ty1,tz1 if this.alive then tx1,ty1,tz1 = trace_map_box( ox, oy, oz,