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_ONLY_DEAD = 2
|
||||||
balancer.BALANCE_NOT_OBJECTIVE = 4
|
balancer.BALANCE_NOT_OBJECTIVE = 4
|
||||||
|
|
||||||
local balancerTimer = nil
|
local balancerTimer
|
||||||
|
|
||||||
local lastJoined = {[constants.TEAM_AXIS] = {}, [constants.TEAM_ALLIES] = {}, [constants.TEAM_SPECTATORS] = {}}
|
local lastJoined = {[constants.TEAM_AXIS] = {}, [constants.TEAM_ALLIES] = {}, [constants.TEAM_SPECTATORS] = {}}
|
||||||
local evenerCount = 0
|
local evenerCount = 0
|
||||||
|
|
|
@ -201,7 +201,7 @@ function commands.onClientCommand(clientId, command)
|
||||||
|
|
||||||
-- client cmds
|
-- client cmds
|
||||||
-- syntax: say or say_*
|
-- 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
|
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), " ")
|
args = util.split(et.trap_Argv(1), " ")
|
||||||
|
@ -233,7 +233,7 @@ function commands.onClientCommand(clientId, command)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- shrub cmds
|
-- shrub cmds
|
||||||
local shrubCmd = nil
|
local shrubCmd
|
||||||
|
|
||||||
-- syntax: say or say_*
|
-- syntax: say or say_*
|
||||||
if (wolfCmd == "say" or wolfCmd == "say_team" or wolfCmd == "say_buddy") and string.find(et.trap_Argv(1), "!") == 1 then
|
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 mysql = {}
|
||||||
|
|
||||||
local env = assert(luasql.mysql())
|
local env = assert(luasql.mysql())
|
||||||
local con = nil
|
local con
|
||||||
local cur = nil
|
local cur
|
||||||
|
|
||||||
-- players
|
-- players
|
||||||
function mysql.addplayer(guid, ip)
|
function mysql.addplayer(guid, ip)
|
||||||
|
|
|
@ -27,8 +27,8 @@ local luasql = require "luasql.sqlite3"
|
||||||
local sqlite3 = {}
|
local sqlite3 = {}
|
||||||
|
|
||||||
local env = assert(luasql.sqlite3())
|
local env = assert(luasql.sqlite3())
|
||||||
local con = nil
|
local con
|
||||||
local cur = nil
|
local cur
|
||||||
|
|
||||||
-- players
|
-- players
|
||||||
function sqlite3.addplayer(guid, ip)
|
function sqlite3.addplayer(guid, ip)
|
||||||
|
|
|
@ -24,10 +24,11 @@ local players = require (wolfa_getLuaPath()..".players.players")
|
||||||
local game = {}
|
local game = {}
|
||||||
|
|
||||||
local killCount = 0
|
local killCount = 0
|
||||||
local lastKillerId = nil
|
local lastKillerId
|
||||||
|
|
||||||
local currentState = nil
|
local currentState
|
||||||
local currentMaps, currentMap, nextMap = {}, nil, nil
|
local currentMaps = {}
|
||||||
|
local currentMap, nextMap
|
||||||
|
|
||||||
function game.getState()
|
function game.getState()
|
||||||
return currentState
|
return currentState
|
||||||
|
|
|
@ -53,9 +53,9 @@ local util
|
||||||
local version = "1.2.0-dev"
|
local version = "1.2.0-dev"
|
||||||
local release = "TBD"
|
local release = "TBD"
|
||||||
|
|
||||||
local basepath = nil
|
local basepath
|
||||||
local homepath = nil
|
local homepath
|
||||||
local luapath = nil
|
local luapath
|
||||||
|
|
||||||
-- need to do this somewhere else
|
-- need to do this somewhere else
|
||||||
function wolfa_getVersion()
|
function wolfa_getVersion()
|
||||||
|
|
|
@ -87,7 +87,7 @@ function events.trigger(name, ...)
|
||||||
error("event not added: "..name)
|
error("event not added: "..name)
|
||||||
end
|
end
|
||||||
|
|
||||||
local returnValue = nil
|
local returnValue
|
||||||
|
|
||||||
for _, handler in pairs(handlers) do
|
for _, handler in pairs(handlers) do
|
||||||
local handlerReturn = handler(...)
|
local handlerReturn = handler(...)
|
||||||
|
|
Loading…
Reference in a new issue