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 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: 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; } diff --git a/src/game/client/gameclient.cpp b/src/game/client/gameclient.cpp index cc9af605e..b5725db0d 100644 --- a/src/game/client/gameclient.cpp +++ b/src/game/client/gameclient.cpp @@ -279,7 +279,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++; } diff --git a/src/game/server/gamemodes/ctf.cpp b/src/game/server/gamemodes/ctf.cpp index 4fc0eb6ef..0439ede3c 100644 --- a/src/game/server/gamemodes/ctf.cpp +++ b/src/game/server/gamemodes/ctf.cpp @@ -28,7 +28,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); diff --git a/src/game/server/player.cpp b/src/game/server/player.cpp index 3539b2733..f0d2ca676 100644 --- a/src/game/server/player.cpp +++ b/src/game/server/player.cpp @@ -51,6 +51,9 @@ CPlayer::~CPlayer() void CPlayer::Tick() { Server()->SetClientAuthed(m_ClientID, m_Authed); + if(!Server()->ClientIngame(m_ClientID)) + return; + Server()->SetClientScore(m_ClientID, m_Score); if(m_Muted > 0) m_Muted--; @@ -114,6 +117,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);