r4106 - in trunk/data/qcsrc: client common server
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Mon Aug 11 14:58:51 EDT 2008
Author: div0
Date: 2008-08-11 14:58:51 -0400 (Mon, 11 Aug 2008)
New Revision: 4106
Modified:
trunk/data/qcsrc/client/Defs.qc
trunk/data/qcsrc/client/Main.qc
trunk/data/qcsrc/client/sbar.qc
trunk/data/qcsrc/common/constants.qh
trunk/data/qcsrc/server/race.qc
Log:
better scoreboard forcing
Modified: trunk/data/qcsrc/client/Defs.qc
===================================================================
--- trunk/data/qcsrc/client/Defs.qc 2008-08-11 18:39:35 UTC (rev 4105)
+++ trunk/data/qcsrc/client/Defs.qc 2008-08-11 18:58:51 UTC (rev 4106)
@@ -198,3 +198,4 @@
float race_othercheckpointdelta;
float race_othercheckpointlapsdelta;
string race_othercheckpointenemy;
+float sb_showscores_force;
Modified: trunk/data/qcsrc/client/Main.qc
===================================================================
--- trunk/data/qcsrc/client/Main.qc 2008-08-11 18:39:35 UTC (rev 4105)
+++ trunk/data/qcsrc/client/Main.qc 2008-08-11 18:58:51 UTC (rev 4106)
@@ -659,6 +659,10 @@
Net_ReadRace();
bHandled = true;
break;
+ case TE_CSQC_FORCESCOREBOARD:
+ sb_showscores_force = true;
+ bHandled = true;
+ break;
default:
// No special logic for this temporary entity; return 0 so the engine can handle it
bHandled = false;
Modified: trunk/data/qcsrc/client/sbar.qc
===================================================================
--- trunk/data/qcsrc/client/sbar.qc 2008-08-11 18:39:35 UTC (rev 4105)
+++ trunk/data/qcsrc/client/sbar.qc 2008-08-11 18:58:51 UTC (rev 4106)
@@ -1326,7 +1326,7 @@
Sbar_FinaleOverlay();
else
{
- if (sb_showscores || (getstati(STAT_HEALTH) <= 0 && cvar("cl_deathscoreboard")))
+ if (sb_showscores || sb_showscores_force || (getstati(STAT_HEALTH) <= 0 && cvar("cl_deathscoreboard")))
{
sbar_x = (vid_conwidth - 640.0)*0.5;
sbar_y = vid_conheight - 47;
Modified: trunk/data/qcsrc/common/constants.qh
===================================================================
--- trunk/data/qcsrc/common/constants.qh 2008-08-11 18:39:35 UTC (rev 4105)
+++ trunk/data/qcsrc/common/constants.qh 2008-08-11 18:58:51 UTC (rev 4106)
@@ -8,6 +8,7 @@
// Revision 7: packet loss column
// Revision 8: race
// Revision 9: race delta
+// Revision 10: scoreboard force
#define CSQC_REVISION 9
// probably put these in common/
@@ -187,6 +188,7 @@
const float TE_CSQC_CONFIG = 107;
const float TE_CSQC_SCORESINFO = 108;
const float TE_CSQC_RACE = 109;
+const float TE_CSQC_FORCESCOREBOARD = 110;
const float STAT_KH_KEYS = 32;
const float STAT_CTF_STATE = 33;
Modified: trunk/data/qcsrc/server/race.qc
===================================================================
--- trunk/data/qcsrc/server/race.qc 2008-08-11 18:39:35 UTC (rev 4105)
+++ trunk/data/qcsrc/server/race.qc 2008-08-11 18:58:51 UTC (rev 4106)
@@ -98,7 +98,8 @@
if(clienttype(e) == CLIENTTYPE_REAL)
{
msg_entity = e;
- WriteByte(MSG_ONE, SVC_INTERMISSION);
+ WriteByte(MSG_ONE, SVC_TEMPENTITY);
+ WriteByte(MSG_ONE, TE_CSQC_FORCESCOREBOARD);
// he can still move, but will see the scoreboard now
}
}
@@ -370,6 +371,20 @@
return;
if(self.killcount == -666 || g_race_qualifying)
race_PreparePlayer();
+
+ if(race_completing)
+ {
+ self.race_completed = 1;
+ MAKE_INDEPENDENT_PLAYER(self);
+ bprint(self.netname, "^7 has abandoned the race.\n");
+ if(clienttype(self) == CLIENTTYPE_REAL)
+ {
+ msg_entity = self;
+ WriteByte(MSG_ONE, SVC_TEMPENTITY);
+ WriteByte(MSG_ONE, TE_CSQC_FORCESCOREBOARD);
+ // he can still move, but will see the scoreboard now
+ }
+ }
}
void race_PostSpawn(entity spot)
More information about the nexuiz-commits
mailing list