mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-24 21:21:56 +00:00
Removed redundant initialization (fixes #75)
This commit is contained in:
parent
6c95703678
commit
a72f15b058
7 changed files with 17 additions and 16 deletions
|
@ -32,7 +32,7 @@ balancer.BALANCE_LAST_JOINED = 1
|
|||
balancer.BALANCE_ONLY_DEAD = 2
|
||||
balancer.BALANCE_NOT_OBJECTIVE = 4
|
||||
|
||||
local balancerTimer = nil
|
||||
local balancerTimer
|
||||
|
||||
local lastJoined = {[constants.TEAM_AXIS] = {}, [constants.TEAM_ALLIES] = {}, [constants.TEAM_SPECTATORS] = {}}
|
||||
local evenerCount = 0
|
||||
|
|
|
@ -201,7 +201,7 @@ function commands.onClientCommand(clientId, command)
|
|||
|
||||
-- client cmds
|
||||
-- syntax: say or say_*
|
||||
local clientCmd = nil
|
||||
local clientCmd
|
||||
|
||||
if (wolfCmd == "say" or wolfCmd == "say_team" or wolfCmd == "say_buddy") and string.find(et.trap_Argv(1), "/") == 1 then
|
||||
args = util.split(et.trap_Argv(1), " ")
|
||||
|
@ -233,7 +233,7 @@ function commands.onClientCommand(clientId, command)
|
|||
end
|
||||
|
||||
-- shrub cmds
|
||||
local shrubCmd = nil
|
||||
local shrubCmd
|
||||
|
||||
-- syntax: say or say_*
|
||||
if (wolfCmd == "say" or wolfCmd == "say_team" or wolfCmd == "say_buddy") and string.find(et.trap_Argv(1), "!") == 1 then
|
||||
|
|
|
@ -26,8 +26,8 @@ local luasql = require "luasql.mysql"
|
|||
local mysql = {}
|
||||
|
||||
local env = assert(luasql.mysql())
|
||||
local con = nil
|
||||
local cur = nil
|
||||
local con
|
||||
local cur
|
||||
|
||||
-- players
|
||||
function mysql.addplayer(guid, ip)
|
||||
|
|
|
@ -27,8 +27,8 @@ local luasql = require "luasql.sqlite3"
|
|||
local sqlite3 = {}
|
||||
|
||||
local env = assert(luasql.sqlite3())
|
||||
local con = nil
|
||||
local cur = nil
|
||||
local con
|
||||
local cur
|
||||
|
||||
-- players
|
||||
function sqlite3.addplayer(guid, ip)
|
||||
|
|
|
@ -24,10 +24,11 @@ local players = require (wolfa_getLuaPath()..".players.players")
|
|||
local game = {}
|
||||
|
||||
local killCount = 0
|
||||
local lastKillerId = nil
|
||||
local lastKillerId
|
||||
|
||||
local currentState = nil
|
||||
local currentMaps, currentMap, nextMap = {}, nil, nil
|
||||
local currentState
|
||||
local currentMaps = {}
|
||||
local currentMap, nextMap
|
||||
|
||||
function game.getState()
|
||||
return currentState
|
||||
|
|
|
@ -53,9 +53,9 @@ local util
|
|||
local version = "1.2.0-dev"
|
||||
local release = "TBD"
|
||||
|
||||
local basepath = nil
|
||||
local homepath = nil
|
||||
local luapath = nil
|
||||
local basepath
|
||||
local homepath
|
||||
local luapath
|
||||
|
||||
-- need to do this somewhere else
|
||||
function wolfa_getVersion()
|
||||
|
|
|
@ -87,7 +87,7 @@ function events.trigger(name, ...)
|
|||
error("event not added: "..name)
|
||||
end
|
||||
|
||||
local returnValue = nil
|
||||
local returnValue
|
||||
|
||||
for _, handler in pairs(handlers) do
|
||||
local handlerReturn = handler(...)
|
||||
|
|
Loading…
Reference in a new issue