Skip to content
This repository has been archived by the owner on Nov 16, 2017. It is now read-only.

Warning fix #230

Open
wants to merge 1 commit into
base: DDRace
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/game/server/ddracechat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#endif

bool CheckClientID(int ClientID);
char* TimerType(int TimerType);
const char* TimerType(int TimerType);

void CGameContext::ConCredits(IConsole::IResult *pResult, void *pUserData)
{
Expand Down Expand Up @@ -740,11 +740,12 @@ bool CheckClientID(int ClientID)
return true;
}

char* TimerType(int TimerType)
const char* TimerType(int TimerType)
{
char msg[3][128] = {"game/round timer.", "broadcast.", "both game/round timer and broadcast."};
const char* msg[3] = {"game/round timer.", "broadcast.", "both game/round timer and broadcast."};
return msg[TimerType];
}

void CGameContext::ConSayTime(IConsole::IResult *pResult, void *pUserData)
{
CGameContext *pSelf = (CGameContext *) pUserData;
Expand Down
10 changes: 4 additions & 6 deletions src/game/server/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,17 @@ CPlayer::CPlayer(CGameContext *pGameServer, int ClientID, int Team)

//New Year
if (g_Config.m_SvEvents)
{
{
time_t rawtime;
struct tm* timeinfo;
char d[16], m[16], y[16];
int dd, mm, yy;
char d[16], m[16];
int dd, mm;
time ( &rawtime );
timeinfo = localtime ( &rawtime );
strftime (d,sizeof(y),"%d",timeinfo);
strftime (d,sizeof(d),"%d",timeinfo);
strftime (m,sizeof(m),"%m",timeinfo);
strftime (y,sizeof(y),"%Y",timeinfo);
dd = atoi(d);
mm = atoi(m);
yy = atoi(y);
m_DefEmote = ((mm == 12 && dd == 31) || (mm == 1 && dd == 1)) ? EMOTE_HAPPY : EMOTE_NORMAL;
}
m_DefEmoteReset = -1;
Expand Down