mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-02-01 13:10:47 +00:00
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:
parent
c1b23f843b
commit
761049b00a
4 changed files with 11 additions and 7 deletions
|
@ -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);
|
Q_strncatz(outptr, va("\\demotime\\%f", demtime-cls.demostarttime), outlen);
|
||||||
|
|
||||||
if (cl.playerview[0].statsf[STAT_MATCHSTARTTIME])
|
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
|
else
|
||||||
Q_strncatz(outptr, va("\\matchstart\\%f", cl.matchgametimestart), outlen);
|
Q_strncatz(outptr, va("\\matchstart\\%f", cl.matchgametimestart), outlen);
|
||||||
|
|
||||||
|
|
|
@ -1539,7 +1539,7 @@ void SCR_DrawGameClock(void)
|
||||||
if (cl.matchstate == MATCH_STANDBY)
|
if (cl.matchstate == MATCH_STANDBY)
|
||||||
showtime = cl.servertime;
|
showtime = cl.servertime;
|
||||||
else if (cl.playerview[0].statsf[STAT_MATCHSTARTTIME])
|
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
|
else
|
||||||
showtime = timelimit - (cl.servertime - cl.matchgametimestart);
|
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);
|
qboolean consolefocused = !!Key_Dest_Has(kdm_console|kdm_cwindows);
|
||||||
RSpeedMark();
|
RSpeedMark();
|
||||||
|
|
||||||
|
r_refdef.playerview = &cl.playerview[0];
|
||||||
|
|
||||||
R2D_ImageColours(1, 1, 1, 1);
|
R2D_ImageColours(1, 1, 1, 1);
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -122,7 +122,9 @@ void VARGS Stats_Message(char *msg, ...);
|
||||||
qboolean Stats_TrackerImageLoaded(char *in)
|
qboolean Stats_TrackerImageLoaded(char *in)
|
||||||
{
|
{
|
||||||
int error;
|
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)
|
static char *Stats_GenTrackerImageString(char *in)
|
||||||
{ //images are of the form "foo \sg\ bar \q\"
|
{ //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");
|
tracker = Con_FindConsole("tracker");
|
||||||
if (!tracker)
|
if (!tracker)
|
||||||
|
@ -732,13 +734,13 @@ qboolean Stats_ParsePrintLine(char *line)
|
||||||
|
|
||||||
for (ms = fragstats.message; ms; ms = ms->next)
|
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)
|
if (ms->type >= ff_frags)
|
||||||
{ //two players
|
{ //two players
|
||||||
m2 = line + strlen(ms->msgpart1);
|
m2 = line + strlen(ms->msgpart1);
|
||||||
p2 = Stats_ExtractName(&m2);
|
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);
|
Stats_Evaluate(ms->type, ms->wid, p1, p2);
|
||||||
return true; //done.
|
return true; //done.
|
||||||
|
|
|
@ -2163,7 +2163,7 @@ void Cmd_ExecuteString (char *text, int level)
|
||||||
return;
|
return;
|
||||||
#endif
|
#endif
|
||||||
if (Cmd_AliasExist(cmd_argv[0], level))
|
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 defined(CSQC_DAT) && !defined(SERVERONLY)
|
||||||
if (CSQC_ConsoleCommand(text))
|
if (CSQC_ConsoleCommand(text))
|
||||||
return; //let the csqc handle it if it wants.
|
return; //let the csqc handle it if it wants.
|
||||||
|
|
Loading…
Reference in a new issue