limchasecam has been redone with new spec system

This commit is contained in:
Richard Allen 2002-04-13 15:37:54 +00:00
parent df00937495
commit fab880a84e
3 changed files with 41 additions and 6 deletions

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.71 2002/04/13 15:37:53 jbravo
// limchasecam has been redone with new spec system
//
// Revision 1.70 2002/04/03 15:29:24 jbravo // Revision 1.70 2002/04/03 15:29:24 jbravo
// Those __ZCAM__ ifdefs keep creaping back in :) // Those __ZCAM__ ifdefs keep creaping back in :)
// //
@ -603,7 +606,16 @@ void SpectatorThink( gentity_t *ent, usercmd_t *ucmd ) {
// Attack Button cycles throught free view, follow or zcam // Attack Button cycles throught free view, follow or zcam
if((ucmd->buttons & BUTTON_ATTACK) && !(client->oldbuttons & BUTTON_ATTACK)) { if((ucmd->buttons & BUTTON_ATTACK) && !(client->oldbuttons & BUTTON_ATTACK)) {
if (client->sess.spectatorState == SPECTATOR_FREE && OKtoFollow(clientNum)) { if (g_gametype.integer == GT_TEAMPLAY && g_RQ3_limchasecam.integer != 0) {
if (!OKtoFollow(clientNum)) return;
if (client->sess.spectatorState != SPECTATOR_FOLLOW) {
client->sess.spectatorState = SPECTATOR_FOLLOW;
client->specMode = SPECTATOR_FOLLOW;
client->ps.pm_flags |= PMF_FOLLOW;
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
}
return;
} else if (client->sess.spectatorState == SPECTATOR_FREE && OKtoFollow(clientNum)) {
client->sess.spectatorState = SPECTATOR_ZCAM; client->sess.spectatorState = SPECTATOR_ZCAM;
client->specMode = SPECTATOR_ZCAM; client->specMode = SPECTATOR_ZCAM;
client->camera->mode = CAMERA_MODE_SWING; client->camera->mode = CAMERA_MODE_SWING;

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.93 2002/04/13 15:37:53 jbravo
// limchasecam has been redone with new spec system
//
// Revision 1.92 2002/04/07 12:57:36 slicer // Revision 1.92 2002/04/07 12:57:36 slicer
// Small fix on Matchmode Captain system // Small fix on Matchmode Captain system
// //
@ -1099,7 +1102,6 @@ Cmd_FollowCycle_f
void Cmd_FollowCycle_f( gentity_t *ent, int dir ) { void Cmd_FollowCycle_f( gentity_t *ent, int dir ) {
int clientnum; int clientnum;
int original; int original;
int chasemode;
// if they are playing a tournement game, count as a loss // if they are playing a tournement game, count as a loss
if ( (g_gametype.integer == GT_TOURNAMENT ) if ( (g_gametype.integer == GT_TOURNAMENT )
@ -1116,7 +1118,6 @@ void Cmd_FollowCycle_f( gentity_t *ent, int dir ) {
G_Error( "Cmd_FollowCycle_f: bad dir %i", dir ); G_Error( "Cmd_FollowCycle_f: bad dir %i", dir );
} }
chasemode = trap_Cvar_VariableIntegerValue( "g_RQ3_limchasecam" );
clientnum = ent->client->sess.spectatorClient; clientnum = ent->client->sess.spectatorClient;
original = clientnum; original = clientnum;
do { do {
@ -1139,7 +1140,8 @@ void Cmd_FollowCycle_f( gentity_t *ent, int dir ) {
} }
// JBravo: limchasecam // JBravo: limchasecam
if ( chasemode > 0 && ent->client->sess.savedTeam != level.clients[ clientnum ].sess.sessionTeam ) { if (g_gametype.integer == GT_TEAMPLAY && g_RQ3_limchasecam.integer != 0 &&
ent->client->sess.savedTeam != level.clients[clientnum].sess.sessionTeam) {
continue; continue;
} }

View file

@ -5,6 +5,9 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// //
// $Log$ // $Log$
// Revision 1.63 2002/04/13 15:37:54 jbravo
// limchasecam has been redone with new spec system
//
// Revision 1.62 2002/04/08 20:14:34 blaze // Revision 1.62 2002/04/08 20:14:34 blaze
// func_breakable explode fix // func_breakable explode fix
// //
@ -935,12 +938,26 @@ void MakeSpectator(gentity_t *ent)
client->ps.persistant[PERS_TEAM] = TEAM_SPECTATOR; client->ps.persistant[PERS_TEAM] = TEAM_SPECTATOR;
if (ent->r.svFlags & SVF_BOT) if (ent->r.svFlags & SVF_BOT)
client->sess.spectatorState = SPECTATOR_FREE; client->sess.spectatorState = SPECTATOR_FREE;
else else if (g_RQ3_limchasecam.integer != 0) {
if (OKtoFollow (ent - g_entities)) {
client->sess.spectatorState = SPECTATOR_FOLLOW;
client->specMode = SPECTATOR_FOLLOW;
client->ps.pm_flags |= PMF_FOLLOW;
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
Cmd_FollowCycle_f(ent, 1);
} else {
client->sess.spectatorState = SPECTATOR_FREE;
client->specMode = SPECTATOR_FREE;
client->ps.pm_flags &= ~PMF_FOLLOW;
client->ps.stats[STAT_RQ3] &= ~RQ3_ZCAM;
}
} else {
client->sess.spectatorState = client->specMode; client->sess.spectatorState = client->specMode;
}
ClientSpawn(ent); ClientSpawn(ent);
} }
qboolean OKtoFollow( int clientnum ) qboolean OKtoFollow(int clientnum)
{ {
int i, x; int i, x;
@ -956,6 +973,10 @@ qboolean OKtoFollow( int clientnum )
if (level.clients[i].sess.sessionTeam == TEAM_SPECTATOR) { if (level.clients[i].sess.sessionTeam == TEAM_SPECTATOR) {
continue; continue;
} }
if (g_gametype.integer == GT_TEAMPLAY && g_RQ3_limchasecam.integer != 0 && i != clientnum &&
level.clients[i].sess.sessionTeam != level.clients[clientnum].sess.savedTeam) {
continue;
}
x++; x++;
}; };
if (x > 0) { if (x > 0) {