From 761049b00a21a9ccfceee75713d9a143a3cdeb4d Mon Sep 17 00:00:00 2001 From: Spoike Date: Sat, 4 Jul 2015 02:04:46 +0000 Subject: [PATCH] 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 --- engine/client/cl_plugin.inc | 2 +- engine/client/cl_screen.c | 4 +++- engine/client/fragstats.c | 10 ++++++---- engine/common/cmd.c | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/engine/client/cl_plugin.inc b/engine/client/cl_plugin.inc index f9b0b3dc4..3e358cc87 100644 --- a/engine/client/cl_plugin.inc +++ b/engine/client/cl_plugin.inc @@ -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); diff --git a/engine/client/cl_screen.c b/engine/client/cl_screen.c index f0ffe11c7..074f936d0 100644 --- a/engine/client/cl_screen.c +++ b/engine/client/cl_screen.c @@ -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); // diff --git a/engine/client/fragstats.c b/engine/client/fragstats.c index cffb8bc1d..524c0b4ea 100644 --- a/engine/client/fragstats.c +++ b/engine/client/fragstats.c @@ -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. diff --git a/engine/common/cmd.c b/engine/common/cmd.c index 6c3701434..af8ae1812 100644 --- a/engine/common/cmd.c +++ b/engine/common/cmd.c @@ -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.