From 50d0af18a4d6adb3e04d11da6c33f00205e41dba Mon Sep 17 00:00:00 2001 From: Daniel Simoes Date: Sat, 23 Feb 2002 18:07:46 +0000 Subject: [PATCH] Changed Sniper code and Cam code --- reaction/cgame/cg_draw.c | 10 +++++++--- reaction/cgame/cg_view.c | 7 ++++++- reaction/cgame/cg_weapons.c | 12 +++++++++++- reaction/game/g_cmds.c | 5 +++++ 4 files changed, 29 insertions(+), 5 deletions(-) diff --git a/reaction/cgame/cg_draw.c b/reaction/cgame/cg_draw.c index f61c2a5e..c3d2e589 100644 --- a/reaction/cgame/cg_draw.c +++ b/reaction/cgame/cg_draw.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.20 2002/02/23 18:07:46 slicer +// Changed Sniper code and Cam code +// // Revision 1.19 2002/01/11 20:20:57 jbravo // Adding TP to main branch // @@ -2083,8 +2086,8 @@ static void CG_DrawCrosshair(void) { if ( !cg_drawCrosshair.integer ) { return; } - - if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR) { + //Slicer: Adding Crosshair to FOLLOW SPECS + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR && !(cg.snap->ps.pm_flags & PMF_FOLLOW)) { return; } @@ -2747,7 +2750,8 @@ static void CG_Draw2D( void ) { return; } */ - if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR ) { + //Slicer: Adding HUD for follow spectating + if ( cg.snap->ps.persistant[PERS_TEAM] == TEAM_SPECTATOR && !(cg.snap->ps.pm_flags & PMF_FOLLOW) ) { CG_DrawSpectator(); CG_DrawCrosshair(); CG_DrawCrosshairNames(); diff --git a/reaction/cgame/cg_view.c b/reaction/cgame/cg_view.c index 9c47fd87..e1259a13 100644 --- a/reaction/cgame/cg_view.c +++ b/reaction/cgame/cg_view.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.18 2002/02/23 18:07:46 slicer +// Changed Sniper code and Cam code +// // Revision 1.17 2002/01/12 20:00:49 hal9000 // Fixed a few more instances of strcmp(blah,NULL) // @@ -587,7 +590,8 @@ static int CG_CalcFov( void ) { // account for zooms // zoomFov = cg_zoomFov.value; */ - if (cg_RQ3_ssgZoomAssist.integer == 0) + //Slicer - Let's always do a SyncZoom +// if (cg_RQ3_ssgZoomAssist.integer == 0) CG_RQ3_SyncZoom(); //SSG3000 zoom handling @@ -721,6 +725,7 @@ static int CG_CalcFov( void ) { } } */ + if ( cg.snap->ps.weapon == WP_SSG3000) { //switching zoom diff --git a/reaction/cgame/cg_weapons.c b/reaction/cgame/cg_weapons.c index a1692b97..59798207 100644 --- a/reaction/cgame/cg_weapons.c +++ b/reaction/cgame/cg_weapons.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.49 2002/02/23 18:07:46 slicer +// Changed Sniper code and Cam code +// // Revision 1.48 2002/02/08 18:00:34 jbravo // Fixing "No newline at end of file" Warnings Linux keeps giving me // @@ -2358,9 +2361,16 @@ void CG_Weapon_f( void ) { } if (cg.snap->ps.weapon == WP_SSG3000) { - trap_S_StartLocalSound( cgs.media.lensSound, CHAN_ITEM); + //Slicer- Changing Sniper stuff- some to game. + + /* trap_S_StartLocalSound( cgs.media.lensSound, CHAN_ITEM); if (cg_RQ3_ssgZoomAssist.integer) CG_RQ3_Zoom(); + */ + //Let's sound it.. + trap_S_StartLocalSound( cgs.media.lensSound, CHAN_ITEM); + //Save the time.. + cg.zoomTime = cg.time; } else if (cg.snap->ps.weapon == WP_GRENADE) { diff --git a/reaction/game/g_cmds.c b/reaction/game/g_cmds.c index d92a7204..caba50c6 100644 --- a/reaction/game/g_cmds.c +++ b/reaction/game/g_cmds.c @@ -5,6 +5,9 @@ //----------------------------------------------------------------------------- // // $Log$ +// Revision 1.53 2002/02/23 18:07:18 slicer +// Changed Sniper code and Cam code +// // Revision 1.52 2002/02/22 02:13:13 jbravo // Fixed a few bugs and did some cleanups // @@ -799,6 +802,8 @@ void StopFollowing( gentity_t *ent ) { ent->client->ps.persistant[ PERS_TEAM ] = TEAM_SPECTATOR; ent->client->sess.sessionTeam = TEAM_SPECTATOR; ent->client->sess.spectatorState = SPECTATOR_FREE; + //Slicer - Removing any zoom bits he might have gainned + Cmd_Unzoom(ent); ent->client->ps.pm_flags &= ~PMF_FOLLOW; ent->r.svFlags &= ~SVF_BOT; ent->client->ps.clientNum = ent - g_entities;