From fc486cb0ab9b5a2e821236af5da24b59d92af7fa Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 00:28:14 +0200 Subject: [PATCH 1/6] added fix for compiling problems if cl and gcc are installed by Sworddragon. Closes #114 --- configure.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.lua b/configure.lua index 3b36d484a..b96c629d5 100644 --- a/configure.lua +++ b/configure.lua @@ -360,10 +360,10 @@ function OptCCompiler(name, default_driver, default_c, default_cxx, desc) -- no need todo anything if we have a driver -- TODO: test if we can find the compiler else - if ExecuteSilent("g++ -v") == 0 then - option.driver = "gcc" - elseif ExecuteSilent("cl") == 0 then + if ExecuteSilent("cl") == 0 then option.driver = "cl" + elseif ExecuteSilent("g++ -v") == 0 then + option.driver = "gcc" else error("no c/c++ compiler found") end From 55434a2a571304f7b6bc8e3933cad610a2b1ef6a Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 00:30:08 +0200 Subject: [PATCH 2/6] added fix by Sworddragon for stopped loading bar at the beginning --- src/game/client/gameclient.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index 1c0633b98..09eef1b88 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -253,7 +253,7 @@ void CGameClient::OnInit() // load textures for(int i = 0; i < g_pData->m_NumImages; i++) { - g_GameClient.m_pMenus->RenderLoading(gs_LoadCurrent/gs_LoadTotal); + g_GameClient.m_pMenus->RenderLoading(gs_LoadCurrent/(float)gs_LoadTotal); g_pData->m_aImages[i].m_Id = Graphics()->LoadTexture(g_pData->m_aImages[i].m_pFilename, CImageInfo::FORMAT_AUTO, 0); gs_LoadCurrent++; } From 27e6fa3ad7a72f96f75608a6c95680ccd916e27b Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 00:40:35 +0200 Subject: [PATCH 3/6] fixed problems with key handling on osx. Closes #45 --- src/engine/client/input.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/client/input.cpp b/src/engine/client/input.cpp index 195b78aac..bf3e703cf 100644 --- a/src/engine/client/input.cpp +++ b/src/engine/client/input.cpp @@ -150,7 +150,8 @@ void CInput::Update() { // handle keys case SDL_KEYDOWN: - AddEvent(Event.key.keysym.unicode, 0, 0); // ignore_convention + if(Event.key.keysym.unicode < 255) // ignore_convention + AddEvent(Event.key.keysym.unicode, 0, 0); // ignore_convention Key = Event.key.keysym.sym; // ignore_convention break; case SDL_KEYUP: From 5156579d1df8b3ee29c6017f1a6a72f446583266 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 00:51:32 +0200 Subject: [PATCH 4/6] fixed sound bug when using in the editor. Closes #136 --- src/game/client/components/sounds.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/client/components/sounds.cpp b/src/game/client/components/sounds.cpp index 84e45efa4..c20a699d4 100644 --- a/src/game/client/components/sounds.cpp +++ b/src/game/client/components/sounds.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -52,7 +53,7 @@ void CSounds::ClearQueue() void CSounds::Enqueue(int SetId) { // add sound to the queue - if(m_QueuePos < QUEUE_SIZE) + if(!g_Config.m_ClEditor && m_QueuePos < QUEUE_SIZE) m_aQueue[m_QueuePos++] = SetId; } From 68ed9154aea6b56c17db58cdbda806b7b428f885 Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 01:00:33 +0200 Subject: [PATCH 5/6] don't add player that aren't ingame to the snapshot and don't let them autospawn. Closes #125 --- src/game/server/player.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index b2e9c0c28..8b3c623a9 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -25,6 +25,9 @@ CPlayer::~CPlayer() void CPlayer::Tick() { + if(!Server()->ClientIngame(m_ClientID)) + return; + Server()->SetClientScore(m_ClientID, m_Score); // do latency stuff @@ -69,6 +72,9 @@ void CPlayer::Tick() void CPlayer::Snap(int SnappingClient) { + if(!Server()->ClientIngame(m_ClientID)) + return; + CNetObj_ClientInfo *ClientInfo = static_cast(Server()->SnapNewItem(NETOBJTYPE_CLIENTINFO, m_ClientID, sizeof(CNetObj_ClientInfo))); StrToInts(&ClientInfo->m_Name0, 6, Server()->ClientName(m_ClientID)); StrToInts(&ClientInfo->m_Skin0, 6, m_TeeInfos.m_SkinName); From 12233ecdaf16236ee6b3a4d836d37560fe33297d Mon Sep 17 00:00:00 2001 From: oy Date: Wed, 22 Sep 2010 01:07:11 +0200 Subject: [PATCH 6/6] fixed that ctf gametype doesn't work if the map has more than 1 flag per team. Closes #124 --- src/game/server/gamemodes/ctf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 0bbc9e851..2c348df2f 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -23,7 +23,7 @@ bool CGameControllerCTF::OnEntity(int Index, vec2 Pos) int Team = -1; if(Index == ENTITY_FLAGSTAND_RED) Team = 0; if(Index == ENTITY_FLAGSTAND_BLUE) Team = 1; - if(Team == -1) + if(Team == -1 || m_apFlags[Team]) return false; CFlag *F = new CFlag(&GameServer()->m_World, Team);