mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-11 07:42:15 +00:00
Added a scaling ctb respawn system. Fixed a bug that allowed players to
spawn before their team respawn with the team command.
This commit is contained in:
parent
b50b7315b9
commit
e3f819b8ba
4 changed files with 43 additions and 37 deletions
|
@ -1,11 +1,12 @@
|
|||
# List fixes here for the 2.3 release
|
||||
|
||||
|
||||
* Problem fixed in the bullet fireing code that affected the otherwise good hitboxes.
|
||||
* Sky portal code tweaked for better performance. Now it's also possible to have sky portals with animated textures
|
||||
* Fixed "unselectable grenade shown in the inventory if you switch weapons after pulling the pin" bug
|
||||
* Fixed a bug that prevented headless player models from being rendered
|
||||
* Fixed the bug that was causing the in-game server info menu to spam an invalid shader error to the console
|
||||
* Added a scaling CTB respawn delay which is active when g_RQ3_ctb_respawndelay is 0
|
||||
* Fixed a bug where players could get past the teamspawns in CTB by using the team command.
|
||||
|
||||
|
||||
# List fixes here for the 2.2 release
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.167 2002/09/07 22:40:01 jbravo
|
||||
// Added a scaling ctb respawn system. Fixed a bug that allowed players to
|
||||
// spawn before their team respawn with the team command.
|
||||
//
|
||||
// Revision 1.166 2002/09/04 00:16:17 makro
|
||||
// Fixed 'unselectable grenade shown in the inventory if you switch weapons
|
||||
// after pulling the pin' bug
|
||||
|
@ -1020,7 +1024,7 @@ void SetTeam(gentity_t * ent, char *s)
|
|||
// decide if we will allow the change
|
||||
//
|
||||
// JBravo: we use the savedTeam var because the player meight be dead.
|
||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||
if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_CTF) {
|
||||
oldTeam = client->sess.savedTeam;
|
||||
} else {
|
||||
oldTeam = client->sess.sessionTeam;
|
||||
|
@ -1090,42 +1094,18 @@ void SetTeam(gentity_t * ent, char *s)
|
|||
}
|
||||
|
||||
client->sess.teamLeader = qfalse;
|
||||
|
||||
// JBravo: no teamleader crap in teamplay mode.
|
||||
// NiceAss: I see no reason for this in CTB or any other gametype.
|
||||
/*
|
||||
if ((team == TEAM_RED || team == TEAM_BLUE) && g_gametype.integer != GT_TEAMPLAY) {
|
||||
teamLeader = TeamLeader(team);
|
||||
// if there is no team leader or the team leader is a bot and this client is not a bot
|
||||
if (teamLeader == -1
|
||||
|| (!(g_entities[clientNum].r.svFlags & SVF_BOT) && (g_entities[teamLeader].r.svFlags & SVF_BOT))) {
|
||||
SetLeader(team, clientNum);
|
||||
}
|
||||
}
|
||||
*/
|
||||
// make sure there is a team leader on the team the player came from
|
||||
|
||||
// JBravo: no teamleader crap in teamplay mode.
|
||||
// NiceAss: I see no reason for this in CTB or any other gametype.
|
||||
/*
|
||||
if ((oldTeam == TEAM_RED || oldTeam == TEAM_BLUE) && g_gametype.integer != GT_TEAMPLAY) {
|
||||
CheckTeamLeader(oldTeam);
|
||||
}
|
||||
*/
|
||||
BroadcastTeamChange(client, oldTeam);
|
||||
|
||||
// get and distribute relevent paramters
|
||||
|
||||
// JBravo: save sessionTeam and then set it correctly for the call to ClientUserinfoChanged
|
||||
// so the scoreboard will be correct. Also check for uneven teams.
|
||||
if (g_gametype.integer == GT_TEAMPLAY) {
|
||||
if (g_gametype.integer == GT_TEAMPLAY || g_gametype.integer == GT_CTF) {
|
||||
if (g_RQ3_matchmode.integer && g_RQ3_maxplayers.integer > 0) {
|
||||
if (RQ3TeamCount(-1, client->sess.savedTeam) > g_RQ3_maxplayers.integer) // If it overflows max players
|
||||
//Make him a sub immeadiatly.
|
||||
ent->client->sess.sub = client->sess.savedTeam;
|
||||
}
|
||||
//Slicer: this was called to update the teamXcount cvars, no longer needed
|
||||
//x = RQ3TeamCount(-1, oldTeam);
|
||||
CheckForUnevenTeams(ent);
|
||||
teamsave = client->sess.sessionTeam;
|
||||
client->sess.sessionTeam = client->sess.savedTeam;
|
||||
|
@ -1139,14 +1119,16 @@ void SetTeam(gentity_t * ent, char *s)
|
|||
client->radioGender = level.team1gender;
|
||||
else if (client->sess.savedTeam == TEAM_BLUE)
|
||||
client->radioGender = level.team2gender;
|
||||
|
||||
} else {
|
||||
if (g_gametype.integer == GT_CTF) {
|
||||
CheckForUnevenTeams(ent);
|
||||
CalculateRanks();
|
||||
ResetKills(ent);
|
||||
client->last_damaged_players[0] = '\0';
|
||||
if (client->sess.savedTeam == TEAM_RED) {
|
||||
if (level.team1respawn == 0)
|
||||
ClientBegin(clientNum);
|
||||
} else if (client->sess.savedTeam == TEAM_BLUE) {
|
||||
if (level.team2respawn == 0)
|
||||
ClientBegin(clientNum);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ClientUserinfoChanged(clientNum);
|
||||
ClientBegin(clientNum);
|
||||
}
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.123 2002/09/07 22:40:01 jbravo
|
||||
// Added a scaling ctb respawn system. Fixed a bug that allowed players to
|
||||
// spawn before their team respawn with the team command.
|
||||
//
|
||||
// Revision 1.122 2002/09/02 02:21:41 niceass
|
||||
// removed spherical head detection
|
||||
//
|
||||
|
@ -847,6 +851,7 @@ typedef struct {
|
|||
// JBravo: for CTB
|
||||
int team1respawn;
|
||||
int team2respawn;
|
||||
int ctb_respawndelay;
|
||||
//Slicer:
|
||||
int team1gender;
|
||||
int team2gender;
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// $Log$
|
||||
// Revision 1.135 2002/09/07 22:40:01 jbravo
|
||||
// Added a scaling ctb respawn system. Fixed a bug that allowed players to
|
||||
// spawn before their team respawn with the team command.
|
||||
//
|
||||
// Revision 1.134 2002/08/30 15:27:10 jbravo
|
||||
// One more extra body fix
|
||||
//
|
||||
|
@ -1354,15 +1358,29 @@ void MakeSpectator(gentity_t * ent)
|
|||
client->ps.pm_flags &= ~PMF_FOLLOW;
|
||||
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
|
||||
client->ps.pm_type = PM_FREEZE;
|
||||
if (g_RQ3_ctb_respawndelay.integer == 0) {
|
||||
if (level.numPlayingClients <= 4)
|
||||
level.ctb_respawndelay = 5;
|
||||
else if (level.numPlayingClients <= 6)
|
||||
level.ctb_respawndelay = 8;
|
||||
else if (level.numPlayingClients <= 8)
|
||||
level.ctb_respawndelay = 12;
|
||||
else if (level.numPlayingClients <= 10)
|
||||
level.ctb_respawndelay = 15;
|
||||
else
|
||||
level.ctb_respawndelay = 20;
|
||||
} else {
|
||||
level.ctb_respawndelay = g_RQ3_ctb_respawndelay.integer;
|
||||
}
|
||||
if (client->sess.savedTeam == TEAM_RED) {
|
||||
if (level.team1respawn == 0) {
|
||||
level.team1respawn = level.time + (g_RQ3_ctb_respawndelay.integer * 1000);
|
||||
RQ3_StartTimer(TEAM_RED, g_RQ3_ctb_respawndelay.integer);
|
||||
level.team1respawn = level.time + (level.ctb_respawndelay * 1000);
|
||||
RQ3_StartTimer(TEAM_RED, level.ctb_respawndelay);
|
||||
}
|
||||
} else if (client->sess.savedTeam == TEAM_BLUE) {
|
||||
if (level.team2respawn == 0) {
|
||||
level.team2respawn = level.time + (g_RQ3_ctb_respawndelay.integer * 1000);
|
||||
RQ3_StartTimer(TEAM_BLUE, g_RQ3_ctb_respawndelay.integer);
|
||||
level.team2respawn = level.time + (level.ctb_respawndelay * 1000);
|
||||
RQ3_StartTimer(TEAM_BLUE, level.ctb_respawndelay);
|
||||
}
|
||||
}
|
||||
ClientSpawn(ent);
|
||||
|
|
Loading…
Reference in a new issue