mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2025-02-17 01:22:32 +00:00
Fixed a few bugs and did some cleanups
This commit is contained in:
parent
5197b4401d
commit
a38c90e2d8
4 changed files with 62 additions and 46 deletions
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.53 2002/02/22 02:13:13 jbravo
|
||||||
|
// Fixed a few bugs and did some cleanups
|
||||||
|
//
|
||||||
// Revision 1.52 2002/02/10 21:21:22 slicer
|
// Revision 1.52 2002/02/10 21:21:22 slicer
|
||||||
// Saving persistant and other data on some events..
|
// Saving persistant and other data on some events..
|
||||||
//
|
//
|
||||||
|
@ -791,6 +794,10 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) {
|
||||||
if ( g_dmflags.integer & DF_NO_FALLING ) {
|
if ( g_dmflags.integer & DF_NO_FALLING ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// JBravo: fix falling pain during lca
|
||||||
|
if (g_gametype.integer == GT_TEAMPLAY && level.lights_camera_action) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
damage = ent->client->ps.stats[STAT_FALLDAMAGE];
|
damage = ent->client->ps.stats[STAT_FALLDAMAGE];
|
||||||
VectorSet (dir, 0, 0, 1);
|
VectorSet (dir, 0, 0, 1);
|
||||||
|
@ -817,6 +824,10 @@ void ClientEvents( gentity_t *ent, int oldEventSequence ) {
|
||||||
if ( g_dmflags.integer & DF_NO_FALLING ) {
|
if ( g_dmflags.integer & DF_NO_FALLING ) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
// JBravo: fix falling pain during lca again
|
||||||
|
if (g_gametype.integer == GT_TEAMPLAY && level.lights_camera_action) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
damage = ent->client->ps.stats[STAT_FALLDAMAGE];
|
damage = ent->client->ps.stats[STAT_FALLDAMAGE];
|
||||||
VectorSet (dir, 0, 0, 1);
|
VectorSet (dir, 0, 0, 1);
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.52 2002/02/22 02:13:13 jbravo
|
||||||
|
// Fixed a few bugs and did some cleanups
|
||||||
|
//
|
||||||
// Revision 1.51 2002/02/10 22:02:06 niceass
|
// Revision 1.51 2002/02/10 22:02:06 niceass
|
||||||
// took some debug info out
|
// took some debug info out
|
||||||
//
|
//
|
||||||
|
@ -589,22 +592,24 @@ void BroadcastTeamChange( gclient_t *client, int oldTeam )
|
||||||
SetTeam
|
SetTeam
|
||||||
=================
|
=================
|
||||||
*/
|
*/
|
||||||
void SetTeam( gentity_t *ent, char *s ) {
|
void SetTeam( gentity_t *ent, char *s )
|
||||||
int team, oldTeam;
|
{
|
||||||
|
int team, oldTeam, clientNum;
|
||||||
gclient_t *client;
|
gclient_t *client;
|
||||||
int clientNum;
|
|
||||||
spectatorState_t specState;
|
spectatorState_t specState;
|
||||||
int specClient;
|
int specClient, teamLeader, teamsave;
|
||||||
int teamLeader, teamsave;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// see what change is requested
|
// see what change is requested
|
||||||
//
|
//
|
||||||
client = ent->client;
|
client = ent->client;
|
||||||
|
|
||||||
clientNum = client - level.clients;
|
clientNum = client - level.clients;
|
||||||
|
|
||||||
|
if (g_gametype.integer != GT_TEAMPLAY) {
|
||||||
specClient = 0;
|
specClient = 0;
|
||||||
specState = SPECTATOR_NOT;
|
specState = SPECTATOR_NOT;
|
||||||
|
}
|
||||||
|
|
||||||
if ( !Q_stricmp( s, "scoreboard" ) || !Q_stricmp( s, "score" ) ) {
|
if ( !Q_stricmp( s, "scoreboard" ) || !Q_stricmp( s, "score" ) ) {
|
||||||
team = TEAM_SPECTATOR;
|
team = TEAM_SPECTATOR;
|
||||||
specState = SPECTATOR_SCOREBOARD;
|
specState = SPECTATOR_SCOREBOARD;
|
||||||
|
@ -776,9 +781,10 @@ void SetTeam( gentity_t *ent, char *s ) {
|
||||||
client->sess.sessionTeam = teamsave;
|
client->sess.sessionTeam = teamsave;
|
||||||
} else {
|
} else {
|
||||||
ClientUserinfoChanged( clientNum );
|
ClientUserinfoChanged( clientNum );
|
||||||
|
ClientBegin( clientNum );
|
||||||
}
|
}
|
||||||
|
|
||||||
ClientBegin( clientNum );
|
// ClientBegin( clientNum );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.43 2002/02/22 02:13:13 jbravo
|
||||||
|
// Fixed a few bugs and did some cleanups
|
||||||
|
//
|
||||||
// Revision 1.42 2002/02/10 21:21:23 slicer
|
// Revision 1.42 2002/02/10 21:21:23 slicer
|
||||||
// Saving persistant and other data on some events..
|
// Saving persistant and other data on some events..
|
||||||
//
|
//
|
||||||
|
@ -599,6 +602,12 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||||
|
|
||||||
//Elder: stop reload attempts
|
//Elder: stop reload attempts
|
||||||
self->client->reloadAttempts = 0;
|
self->client->reloadAttempts = 0;
|
||||||
|
|
||||||
|
//JBravo: switch off the lasersight
|
||||||
|
if (self->client->lasersight) {
|
||||||
|
G_FreeEntity(self->client->lasersight);
|
||||||
|
self->client->lasersight = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (self->client->ps.pm_type == PM_DEAD) {
|
if (self->client->ps.pm_type == PM_DEAD) {
|
||||||
return;
|
return;
|
||||||
|
@ -616,13 +625,6 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int
|
||||||
CheckAlmostScored( self, attacker );
|
CheckAlmostScored( self, attacker );
|
||||||
}
|
}
|
||||||
|
|
||||||
// JBravo: save client->ps so spectating wont zap it.
|
|
||||||
/* if (g_gametype.integer == GT_TEAMPLAY) {
|
|
||||||
for (i = 0 ; i < MAX_PERSISTANT ; i++) {
|
|
||||||
self->client->savedpersistant[i] = self->client->ps.persistant[i];
|
|
||||||
}
|
|
||||||
}*/
|
|
||||||
|
|
||||||
#ifdef MISSIONPACK
|
#ifdef MISSIONPACK
|
||||||
if ((self->client->ps.eFlags & EF_TICKING) && self->activator) {
|
if ((self->client->ps.eFlags & EF_TICKING) && self->activator) {
|
||||||
self->client->ps.eFlags &= ~EF_TICKING;
|
self->client->ps.eFlags &= ~EF_TICKING;
|
||||||
|
|
|
@ -5,6 +5,9 @@
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// $Log$
|
// $Log$
|
||||||
|
// Revision 1.16 2002/02/22 02:13:13 jbravo
|
||||||
|
// Fixed a few bugs and did some cleanups
|
||||||
|
//
|
||||||
// Revision 1.15 2002/02/11 00:30:23 niceass
|
// Revision 1.15 2002/02/11 00:30:23 niceass
|
||||||
// LCA fix
|
// LCA fix
|
||||||
//
|
//
|
||||||
|
@ -237,7 +240,7 @@ void MakeAllLivePlayersObservers()
|
||||||
continue;
|
continue;
|
||||||
level.clients[i].sess.savedTeam = level.clients[i].sess.sessionTeam;
|
level.clients[i].sess.savedTeam = level.clients[i].sess.sessionTeam;
|
||||||
level.clients[i].sess.sessionTeam = TEAM_SPECTATOR;
|
level.clients[i].sess.sessionTeam = TEAM_SPECTATOR;
|
||||||
level.clients[i].sess.spectatorState = SPECTATOR_FOLLOW;
|
level.clients[i].sess.spectatorState = SPECTATOR_FREE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -471,10 +474,6 @@ void SpawnPlayers()
|
||||||
client = player->client;
|
client = player->client;
|
||||||
clientNum = client - level.clients;
|
clientNum = client - level.clients;
|
||||||
|
|
||||||
// for (x = 0 ; x < MAX_PERSISTANT ; x++) {
|
|
||||||
// client->ps.persistant[x] = client->savedpersistant[x];
|
|
||||||
// }
|
|
||||||
|
|
||||||
client->sess.teamSpawn = qtrue;
|
client->sess.teamSpawn = qtrue;
|
||||||
if (client->sess.savedTeam == TEAM_RED) {
|
if (client->sess.savedTeam == TEAM_RED) {
|
||||||
client->sess.sessionTeam = TEAM_RED;
|
client->sess.sessionTeam = TEAM_RED;
|
||||||
|
@ -501,8 +500,6 @@ void RQ3_Cmd_Choose_f( gentity_t *ent )
|
||||||
return; // not fully in game yet
|
return; // not fully in game yet
|
||||||
}
|
}
|
||||||
|
|
||||||
// trap_Argv( 1, cmd, sizeof( cmd ) );
|
|
||||||
|
|
||||||
cmd = ConcatArgs( 1 );
|
cmd = ConcatArgs( 1 );
|
||||||
|
|
||||||
if (Q_stricmp (cmd, RQ3_MP5_NAME) == 0 || Q_stricmp (cmd, "mp5") == 0) {
|
if (Q_stricmp (cmd, RQ3_MP5_NAME) == 0 || Q_stricmp (cmd, "mp5") == 0) {
|
||||||
|
|
Loading…
Reference in a new issue