1
0
Fork 0
forked from fte/fteqw

fix gameclock on certain servers.

fix kill not working on ktx (ktx is weird).
fix missing scoreboard.
fix possible crash on /cmd kill.
fix missing disconnect messages.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4930 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2015-07-04 02:04:46 +00:00
parent c1b23f843b
commit 761049b00a
4 changed files with 11 additions and 7 deletions

View file

@ -576,7 +576,7 @@ static qintptr_t VARGS Plug_GetServerInfo(void *offset, quintptr_t mask, const q
Q_strncatz(outptr, va("\\demotime\\%f", demtime-cls.demostarttime), outlen);
if (cl.playerview[0].statsf[STAT_MATCHSTARTTIME])
Q_strncatz(outptr, va("\\matchstart\\%f", cl.playerview[0].statsf[STAT_MATCHSTARTTIME]), outlen);
Q_strncatz(outptr, va("\\matchstart\\%f", cl.playerview[0].statsf[STAT_MATCHSTARTTIME]/1000), outlen);
else
Q_strncatz(outptr, va("\\matchstart\\%f", cl.matchgametimestart), outlen);

View file

@ -1539,7 +1539,7 @@ void SCR_DrawGameClock(void)
if (cl.matchstate == MATCH_STANDBY)
showtime = cl.servertime;
else if (cl.playerview[0].statsf[STAT_MATCHSTARTTIME])
showtime = timelimit - (cl.servertime - cl.playerview[0].statsf[STAT_MATCHSTARTTIME]);
showtime = timelimit - (cl.servertime - cl.playerview[0].statsf[STAT_MATCHSTARTTIME]/1000);
else
showtime = timelimit - (cl.servertime - cl.matchgametimestart);
@ -2517,6 +2517,8 @@ void SCR_DrawTwoDimensional(int uimenu, qboolean nohud)
qboolean consolefocused = !!Key_Dest_Has(kdm_console|kdm_cwindows);
RSpeedMark();
r_refdef.playerview = &cl.playerview[0];
R2D_ImageColours(1, 1, 1, 1);
//

View file

@ -122,7 +122,9 @@ void VARGS Stats_Message(char *msg, ...);
qboolean Stats_TrackerImageLoaded(char *in)
{
int error;
return Font_TrackerValid(unicode_decode(&error, in, &in, true));
if (in)
return Font_TrackerValid(unicode_decode(&error, in, &in, true));
return false;
}
static char *Stats_GenTrackerImageString(char *in)
{ //images are of the form "foo \sg\ bar \q\"
@ -250,7 +252,7 @@ void Stats_FragMessage(int p1, int wid, int p2, qboolean teamkill)
}
}
Q_snprintfz(message, sizeof(message), "%s%s ^7%s %s%s\n", p1c, p1n, Stats_TrackerImageLoaded(w->image)?w->image:w->abrev, p2c, p2n);
Q_snprintfz(message, sizeof(message), "%s%s ^7%s %s%s\n", p2c, p2n, Stats_TrackerImageLoaded(w->image)?w->image:w->abrev, p1c, p1n);
tracker = Con_FindConsole("tracker");
if (!tracker)
@ -732,13 +734,13 @@ qboolean Stats_ParsePrintLine(char *line)
for (ms = fragstats.message; ms; ms = ms->next)
{
if (!qm_stricmp(ms->msgpart1, line))
if (!Q_strcmp(ms->msgpart1, line))
{
if (ms->type >= ff_frags)
{ //two players
m2 = line + strlen(ms->msgpart1);
p2 = Stats_ExtractName(&m2);
if ((!ms->msgpart2 && *m2=='\n') || (ms->msgpart2 && !qm_stricmp(ms->msgpart2, m2)))
if ((!ms->msgpart2 && *m2=='\n') || (ms->msgpart2 && !Q_strcmp(ms->msgpart2, m2)))
{
Stats_Evaluate(ms->type, ms->wid, p1, p2);
return true; //done.

View file

@ -2163,7 +2163,7 @@ void Cmd_ExecuteString (char *text, int level)
return;
#endif
if (Cmd_AliasExist(cmd_argv[0], level))
return; //server stuffed an alias for a command that it would already have received. use that instead.
break; //server stuffed an alias for a command that it would already have received. use that instead.
#if defined(CSQC_DAT) && !defined(SERVERONLY)
if (CSQC_ConsoleCommand(text))
return; //let the csqc handle it if it wants.