Conflicts:
	src/game/server/player.cpp
This commit is contained in:
GreYFoXGTi 2010-09-22 11:46:18 +03:00
commit e56b75090c
6 changed files with 15 additions and 7 deletions

View file

@ -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

View file

@ -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:

View file

@ -1,4 +1,5 @@
#include <engine/sound.h>
#include <engine/shared/config.h>
#include <game/generated/client_data.h>
#include <game/client/gameclient.h>
#include <game/client/components/camera.h>
@ -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;
}

View file

@ -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++;
}

View file

@ -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);

View file

@ -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<CNetObj_ClientInfo *>(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);