diff --git a/reaction/game/g_active.c b/reaction/game/g_active.c index 5fc28333..a671f61f 100644 --- a/reaction/game/g_active.c +++ b/reaction/game/g_active.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.52 2002/02/10 21:21:22 slicer +// Saving persistant and other data on some events.. +// // Revision 1.51 2002/02/10 18:38:42 jbravo // Added new SPECTATOR_ZCAM spec mode. // @@ -1533,7 +1536,8 @@ SpectatorClientEndFrame */ void SpectatorClientEndFrame( gentity_t *ent ) { gclient_t *cl; - int savedPing, savedScore,savedFlags; + int savedPing, savedFlags,i; + int savedPers[MAX_PERSISTANT]; // if we are doing a chase cam or a remote view, grab the latest info if ( ent->client->sess.spectatorState == SPECTATOR_FOLLOW ) { @@ -1553,18 +1557,21 @@ void SpectatorClientEndFrame( gentity_t *ent ) { flags = (cl->ps.eFlags & ~(EF_VOTED | EF_TEAMVOTED)) | (ent->client->ps.eFlags & (EF_VOTED | EF_TEAMVOTED)); // JBravo: saving score and ping to fix the scoreboard savedPing = ent->client->ps.ping; - savedScore = ent->client->ps.persistant[PERS_SCORE]; - //Slicer saving pm_flags + //Slicer saving pm_flags & pers savedFlags = ent->client->ps.pm_flags; + for (i = 0 ; i < MAX_PERSISTANT ; i++) + savedPers[i] = ent->client->ps.persistant[i]; + //This will make the spectator get the client's stuff ent->client->ps = cl->ps; //Reposting score and ping.. if(g_gametype.integer == GT_TEAMPLAY) { + for (i = 0 ; i < MAX_PERSISTANT ; i++) + ent->client->ps.persistant[i] = savedPers[i]; + ent->client->ps.ping = savedPing; - ent->client->ps.persistant[PERS_SCORE] = savedScore; //Slicer reposting pmflags ent->client->ps.pm_flags = savedFlags; } -// ent->client->ps.persistant[PERS_SCORE] = ent->client->savedpersistant[PERS_SCORE]; ent->client->ps.pm_flags |= PMF_FOLLOW; ent->client->ps.eFlags = flags; return; diff --git a/reaction/game/g_client.c b/reaction/game/g_client.c index ecb30653..b3ab8d71 100644 --- a/reaction/game/g_client.c +++ b/reaction/game/g_client.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.37 2002/02/10 21:21:22 slicer +// Saving persistant and other data on some events.. +// // Revision 1.36 2002/02/10 16:26:55 jbravo // Attempting to intergrate zcam better into rq3 and a fix for lights.wav // @@ -1132,7 +1135,8 @@ void ClientBegin( int clientNum ) { gentity_t *ent; gclient_t *client; int flags; - int savedPing,savedScore; + int savedPing,i; + int savedPers[MAX_PERSISTANT]; ent = g_entities + clientNum; @@ -1153,11 +1157,11 @@ void ClientBegin( int clientNum ) { client->pers.sub = TEAM_FREE; } - //Slicer: Saving score and ping + //Slicer: Saving persistant and ping savedPing = client->ps.ping; - savedScore = client->ps.persistant[PERS_SCORE]; + for ( i = 0 ; i < MAX_PERSISTANT ; i++ ) + savedPers[i] = client->ps.persistant[i]; - client->pers.connected = CON_CONNECTED; client->pers.enterTime = level.time; @@ -1175,7 +1179,8 @@ void ClientBegin( int clientNum ) { //Slicer: Repost score and ping if(g_gametype.integer == GT_TEAMPLAY) { client->ps.ping = savedPing; - client->ps.persistant[PERS_SCORE] = savedScore; + for ( i = 0 ; i < MAX_PERSISTANT ; i++ ) + client->ps.persistant[i] = savedPers[i]; } // locate ent at a spawn point ClientSpawn( ent ); @@ -1336,7 +1341,7 @@ void ClientSpawn(gentity_t *ent) { for ( i = 0 ; i < MAX_PERSISTANT ; i++ ) { persistant[i] = client->ps.persistant[i]; - savedpers[i] = client->savedpersistant[i]; + // savedpers[i] = client->savedpersistant[i]; } eventSequence = client->ps.eventSequence; @@ -1360,7 +1365,7 @@ void ClientSpawn(gentity_t *ent) { for ( i = 0 ; i < MAX_PERSISTANT ; i++ ) { client->ps.persistant[i] = persistant[i]; - client->savedpersistant[i] = savedpers[i]; +// client->savedpersistant[i] = savedpers[i]; } client->ps.eventSequence = eventSequence; // increment the spawncount so the client will detect the respawn diff --git a/reaction/game/g_combat.c b/reaction/game/g_combat.c index d2b963a3..e7901b4b 100644 --- a/reaction/game/g_combat.c +++ b/reaction/game/g_combat.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.42 2002/02/10 21:21:23 slicer +// Saving persistant and other data on some events.. +// // Revision 1.41 2002/02/07 23:31:22 niceass // fixed a bug in G_Combat that assumed pointers waren't NULL (only in DLLs was it a problem) // @@ -614,11 +617,11 @@ void player_die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int } // JBravo: save client->ps so spectating wont zap it. - if (g_gametype.integer == GT_TEAMPLAY) { +/* if (g_gametype.integer == GT_TEAMPLAY) { for (i = 0 ; i < MAX_PERSISTANT ; i++) { self->client->savedpersistant[i] = self->client->ps.persistant[i]; } - } + }*/ #ifdef MISSIONPACK if ((self->client->ps.eFlags & EF_TICKING) && self->activator) { diff --git a/reaction/game/g_local.h b/reaction/game/g_local.h index 7af25a8e..33ab5835 100644 --- a/reaction/game/g_local.h +++ b/reaction/game/g_local.h @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.47 2002/02/10 21:21:23 slicer +// Saving persistant and other data on some events.. +// // Revision 1.46 2002/02/10 18:38:42 jbravo // Added new SPECTATOR_ZCAM spec mode. // @@ -529,7 +532,7 @@ struct gclient_s { // JBravo adding TP stuff int teamplayWeapon; int teamplayItem; - int savedpersistant[MAX_PERSISTANT]; +// int savedpersistant[MAX_PERSISTANT]; }; diff --git a/reaction/game/game.bat b/reaction/game/game.bat index af59053e..f7b0ad77 100755 --- a/reaction/game/game.bat +++ b/reaction/game/game.bat @@ -85,6 +85,10 @@ set cc=call ..\compile.bat @if errorlevel 1 goto quit %cc% ../rxn_game.c @if errorlevel 1 goto quit +%cc% ../zcam.c +@if errorlevel 1 goto quit +%cc% ../zcam_target.c +@if errorlevel 1 goto quit q3asm -f ../game diff --git a/reaction/game/game.q3asm b/reaction/game/game.q3asm index ab516bc5..caa5f27f 100644 --- a/reaction/game/game.q3asm +++ b/reaction/game/game.q3asm @@ -36,4 +36,6 @@ g_trigger g_utils g_weapon g_fileio -rxn_game \ No newline at end of file +rxn_game +zcam +zcam_target \ No newline at end of file