This commit is contained in:
GreYFoXGTi 2010-11-16 22:11:24 +02:00
commit b6a4b2b7ba
6 changed files with 30 additions and 14 deletions

View file

@ -55,8 +55,13 @@ DuplicateDirectoryStructure("src", "src", "objs")
function ResCompile(scriptfile)
scriptfile = Path(scriptfile)
output = PathBase(scriptfile) .. ".res"
AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile)
if config.compiler.driver == "cl" then
output = PathBase(scriptfile) .. ".res"
AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile)
elseif config.compiler.driver == "gcc" then
output = PathBase(scriptfile) .. ".coff"
AddJob(output, "windres " .. scriptfile, "windres -i " .. scriptfile .. " -o " .. output)
end
AddDependency(output, scriptfile)
return output
end
@ -68,7 +73,7 @@ function Dat2c(datafile, sourcefile, arrayname)
AddJob(
sourcefile,
"dat2c " .. PathFilename(sourcefile) .. " = " .. PathFilename(datafile),
Script("scripts/safewrapper.py") .. " \"" .. Script("scripts/dat2c.py").. "\" " .. sourcefile .. " " .. datafile .. " " .. arrayname
Script("scripts/dat2c.py").. "\" " .. sourcefile .. " " .. datafile .. " " .. arrayname
)
AddDependency(sourcefile, datafile)
return sourcefile
@ -79,7 +84,7 @@ function ContentCompile(action, output)
AddJob(
output,
action .. " > " .. output,
--Script("scripts/safewrapper.py") .. " \"" .. Script("datasrc/compile.py") .. "\" ".. Path(output) .. " " .. action
--Script("datasrc/compile.py") .. "\" ".. Path(output) .. " " .. action
Script("datasrc/compile.py") .. " " .. action .. " > " .. Path(output)
)
AddDependency(output, Path("datasrc/content.py")) -- do this more proper
@ -111,8 +116,11 @@ if family == "windows" then
end
if config.compiler.driver == "cl" then
client_link_other = {ResCompile("other/icons/teeworlds.rc")}
if config.compiler.driver == "cl" then
client_link_other = {ResCompile("other/icons/teeworlds_cl.rc")}
elseif config.compiler.driver == "gcc" then
client_link_other = {ResCompile("other/icons/teeworlds_gcc.rc")}
end
end
function Intermediate_Output(settings, input)

20
bam.lua
View file

@ -55,8 +55,13 @@ DuplicateDirectoryStructure("src", "src", "objs")
function ResCompile(scriptfile)
scriptfile = Path(scriptfile)
output = PathBase(scriptfile) .. ".res"
AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile)
if config.compiler.driver == "cl" then
output = PathBase(scriptfile) .. ".res"
AddJob(output, "rc " .. scriptfile, "rc /fo " .. output .. " " .. scriptfile)
elseif config.compiler.driver == "gcc" then
output = PathBase(scriptfile) .. ".coff"
AddJob(output, "windres " .. scriptfile, "windres -i " .. scriptfile .. " -o " .. output)
end
AddDependency(output, scriptfile)
return output
end
@ -68,7 +73,7 @@ function Dat2c(datafile, sourcefile, arrayname)
AddJob(
sourcefile,
"dat2c " .. PathFilename(sourcefile) .. " = " .. PathFilename(datafile),
Script("scripts/safewrapper.py") .. " \"" .. Script("scripts/dat2c.py").. "\" " .. sourcefile .. " " .. datafile .. " " .. arrayname
Script("scripts/dat2c.py").. "\" " .. sourcefile .. " " .. datafile .. " " .. arrayname
)
AddDependency(sourcefile, datafile)
return sourcefile
@ -79,7 +84,7 @@ function ContentCompile(action, output)
AddJob(
output,
action .. " > " .. output,
--Script("scripts/safewrapper.py") .. " \"" .. Script("datasrc/compile.py") .. "\" ".. Path(output) .. " " .. action
--Script("datasrc/compile.py") .. "\" ".. Path(output) .. " " .. action
Script("datasrc/compile.py") .. " " .. action .. " > " .. Path(output)
)
AddDependency(output, Path("datasrc/content.py")) -- do this more proper
@ -114,8 +119,11 @@ if family == "windows" then
end
if config.compiler.driver == "cl" then
client_link_other = {ResCompile("other/icons/teeworlds.rc")}
if config.compiler.driver == "cl" then
client_link_other = {ResCompile("other/icons/teeworlds_cl.rc")}
elseif config.compiler.driver == "gcc" then
client_link_other = {ResCompile("other/icons/teeworlds_gcc.rc")}
end
end
function Intermediate_Output(settings, input)

View file

@ -0,0 +1 @@
ID ICON "teeworlds.ico"

View file

@ -37,7 +37,6 @@
#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#include <wspiapi.h>
#include <fcntl.h>
#include <direct.h>
#include <errno.h>

View file

@ -660,7 +660,7 @@ void IGameController::Tick()
{
for(int i = 0; i < MAX_CLIENTS; ++i)
{
if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetTeam() != -1)
if(GameServer()->m_apPlayers[i] && GameServer()->m_apPlayers[i]->GetTeam() != -1 && !Server()->IsAuthed(i))
{
if(Server()->Tick() > GameServer()->m_apPlayers[i]->m_LastActionTick+g_Config.m_SvInactiveKickTime*Server()->TickSpeed()*60)
{