diff options
author | Tim Angus <tim@ngus.net> | 2004-01-11 00:20:04 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2004-01-11 00:20:04 +0000 |
commit | 5b4909a3e494eb8c677e3ae65818469fa9c22e3c (patch) | |
tree | fe72405533331b4995a3a41c8f582b73998dacf5 /src/cgame | |
parent | bddd5e171dabad555ac767013de9114678a82ee7 (diff) |
* Sorted out hydra gas screwups
* Synced MOD_ and EV_ lists
* Removed "devmap" command from map rotation system
* Increased soldier bite damage to 50
* Reduced price of light armour to 70
* Added visibility tests to the hive and acid tube
* Some other stuff
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_event.c | 10 | ||||
-rw-r--r-- | src/cgame/cg_local.h | 2 | ||||
-rw-r--r-- | src/cgame/cg_servercmds.c | 11 | ||||
-rw-r--r-- | src/cgame/cg_view.c | 13 |
4 files changed, 25 insertions, 11 deletions
diff --git a/src/cgame/cg_event.c b/src/cgame/cg_event.c index 0df4ea5c..b9f4f714 100644 --- a/src/cgame/cg_event.c +++ b/src/cgame/cg_event.c @@ -852,16 +852,6 @@ void CG_EntityEvent( centity_t *cent, vec3_t position ) } break; - case EV_POISONCLOUD: - DEBUGNAME( "EV_POISONCLOUD" ); - cg.poisonedTime = cg.time; - { - particleSystem_t *ps = CG_SpawnNewParticleSystem( cgs.media.poisonCloudPS ); - CG_SetParticleSystemCent( ps, &cg.predictedPlayerEntity ); - CG_AttachParticleSystemToCent( ps ); - } - break; - case EV_ALIEN_EVOLVE: DEBUGNAME( "EV_ALIEN_EVOLVE" ); trap_S_StartSound( NULL, es->number, CHAN_BODY, cgs.media.alienEvolveSound ); diff --git a/src/cgame/cg_local.h b/src/cgame/cg_local.h index 8a660c4a..14527607 100644 --- a/src/cgame/cg_local.h +++ b/src/cgame/cg_local.h @@ -1013,6 +1013,8 @@ typedef struct consoleLine_t consoleLines[ MAX_CONSOLE_LINES ]; int numConsoleLines; qboolean consoleValid; + + particleSystem_t *poisonCloudPS; } cg_t; diff --git a/src/cgame/cg_servercmds.c b/src/cgame/cg_servercmds.c index fdd11783..a385fea6 100644 --- a/src/cgame/cg_servercmds.c +++ b/src/cgame/cg_servercmds.c @@ -847,6 +847,17 @@ static void CG_ServerCommand( void ) trap_SendConsoleCommand( "closemenus\n" ); return; } + + //poison cloud effect needs to be reliable + if( !strcmp( cmd, "poisoncloud" ) ) + { + cg.poisonedTime = cg.time; + cg.poisonCloudPS = CG_SpawnNewParticleSystem( cgs.media.poisonCloudPS ); + CG_SetParticleSystemCent( cg.poisonCloudPS, &cg.predictedPlayerEntity ); + CG_AttachParticleSystemToCent( cg.poisonCloudPS ); + + return; + } CG_Printf( "Unknown client game command: %s\n", cmd ); } diff --git a/src/cgame/cg_view.c b/src/cgame/cg_view.c index 863dc776..4256e494 100644 --- a/src/cgame/cg_view.c +++ b/src/cgame/cg_view.c @@ -382,6 +382,7 @@ static void CG_OffsetFirstPersonView( void ) float bob2; vec3_t normal, baseOrigin; playerState_t *ps = &cg.predictedPlayerState; + centity_t *cent = &cg.predictedPlayerEntity; if( ps->stats[ STAT_STATE ] & SS_WALLCLIMBING ) { @@ -584,7 +585,7 @@ static void CG_OffsetFirstPersonView( void ) angles[ YAW ] += fraction * PCLOUD_ROLL_AMPLITUDE; angles[ PITCH ] += pitchFraction * PCLOUD_ROLL_AMPLITUDE / 2.0f; } - + //TA: this *feels* more realisitic for humans if( cg.predictedPlayerState.stats[ STAT_PTEAM ] == PTE_HUMANS ) { @@ -1127,6 +1128,16 @@ static int CG_CalcViewValues( void ) cg.predictedErrorTime = 0; } + //shut off the poison cloud effect if it's still on the go + if( cg.snap->ps.stats[ STAT_HEALTH ] <= 0 ) + { + if( cg.poisonCloudPS != NULL ) + { + CG_DestroyParticleSystem( cg.poisonCloudPS ); + cg.poisonCloudPS = NULL; + } + } + if( cg.renderingThirdPerson ) { // back away from character |