diff options
author | Michael Levin <risujin@fastmail.fm> | 2009-10-03 11:30:33 +0000 |
---|---|---|
committer | Tim Angus <tim@ngus.net> | 2013-01-03 00:15:03 +0000 |
commit | ca3ade0361afe2b5d87c7a46543e6937b04b89bf (patch) | |
tree | 1bd831b9fe1d0ffbc8f57f6b5029aafff79aa386 /src/cgame | |
parent | 4249be79aaab686a2df532ab6e18ead135aff5c6 (diff) |
* Buildable health accuracy increased to 8 bits, flags moved to eFlags (EF_B_*)
* Fixed Tesla Generator not firing over turrets or missing small aliens entirely -- it now shoots from the top of its bounding box to the top of its target's bounding box
* Dying, evolving, or changing teams properly resets the weapon
Flame thrower changes:
* Reverted flame thrower missile radius to 15
* Muzzle is offset for flame thrower to shoot from the hand
Diffstat (limited to 'src/cgame')
-rw-r--r-- | src/cgame/cg_buildable.c | 17 | ||||
-rw-r--r-- | src/cgame/cg_tutorial.c | 6 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 054068f4..3fba12e4 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -548,7 +548,7 @@ static void CG_BuildableAnimation( centity_t *cent, int *old, int *now, float *b cent->buildableAnim = es->torsoAnim; //display the first frame of the construction anim if not yet spawned - if( !( es->generic1 & B_SPAWNED_TOGGLEBIT ) ) + if( !( es->eFlags & EF_B_SPAWNED ) ) { animation_t *anim = &cg_buildables[ es->modelindex ].animations[ BANIM_CONSTRUCT1 ]; @@ -701,7 +701,7 @@ static void CG_BuildableParticleEffects( centity_t *cent ) int health = es->generic1 & B_HEALTH_MASK; float healthFrac = (float)health / B_HEALTH_MASK; - if( !( es->generic1 & B_SPAWNED_TOGGLEBIT ) ) + if( !( es->eFlags & EF_B_SPAWNED ) ) return; if( team == BIT_HUMANS ) @@ -926,7 +926,7 @@ static void CG_BuildableStatusDisplay( centity_t *cent ) // hack for shrunken barricades anim = es->torsoAnim & ~( ANIM_FORCEBIT | ANIM_TOGGLEBIT ); if( es->modelindex == BA_A_BARRICADE && - ( anim == BANIM_DESTROYED || !( es->generic1 & B_SPAWNED_TOGGLEBIT ) ) ) + ( anim == BANIM_DESTROYED || !( es->eFlags & EF_B_SPAWNED ) ) ) maxs[ 2 ] = (int)( maxs[ 2 ] * BARRICADE_SHRINKPROP ); VectorCopy( cent->lerpOrigin, origin ); @@ -972,7 +972,7 @@ static void CG_BuildableStatusDisplay( centity_t *cent ) hit = &cg_entities[ tr.entityNum ].currentState; if( tr.entityNum < MAX_CLIENTS || ( hit->eType == ET_BUILDABLE && - ( !( es->generic1 & B_SPAWNED_TOGGLEBIT ) || + ( !( es->eFlags & EF_B_SPAWNED ) || BG_FindTransparentTestForBuildable( hit->modelindex ) ) ) ) { entNum = tr.entityNum; @@ -1041,8 +1041,8 @@ static void CG_BuildableStatusDisplay( centity_t *cent ) // this is fudged to get the width/height in the cfg to be more realistic scale = ( picH / d ) * 3; - powered = es->generic1 & B_POWERED_TOGGLEBIT; - marked = es->generic1 & B_MARKED_TOGGLEBIT; + powered = es->eFlags & EF_B_POWERED; + marked = es->eFlags & EF_B_MARKED; picH *= scale; picW *= scale; @@ -1297,7 +1297,7 @@ void CG_Buildable( centity_t *cent ) ent.hModel = cg_buildables[ es->modelindex ].models[ 0 ]; - if( !( es->generic1 & B_SPAWNED_TOGGLEBIT ) ) + if( !( es->eFlags & EF_B_SPAWNED ) ) { sfxHandle_t prebuildSound = cgs.media.humanBuildablePrebuild; @@ -1455,7 +1455,8 @@ void CG_Buildable( centity_t *cent ) health = es->generic1 & B_HEALTH_MASK; healthScale = (float)health / B_HEALTH_MASK; - if( healthScale < cent->lastBuildableHealthScale && ( es->generic1 & B_SPAWNED_TOGGLEBIT ) ) + if( healthScale < cent->lastBuildableHealthScale && + ( es->eFlags & EF_B_SPAWNED ) ) { if( cent->lastBuildableDamageSoundTime + BUILDABLE_SOUND_PERIOD < cg.time ) { diff --git a/src/cgame/cg_tutorial.c b/src/cgame/cg_tutorial.c index 9bd258fb..0375b3e0 100644 --- a/src/cgame/cg_tutorial.c +++ b/src/cgame/cg_tutorial.c @@ -201,7 +201,7 @@ static void CG_AlienBuilderText( char *text, playerState_t *ps ) { if( cgs.markDeconstruct ) { - if( es->generic1 & B_MARKED_TOGGLEBIT ) + if( es->eFlags & EF_B_MARKED ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to unmark this structure\n", @@ -388,7 +388,7 @@ static void CG_HumanCkitText( char *text, playerState_t *ps ) { if( cgs.markDeconstruct ) { - if( es->generic1 & B_MARKED_TOGGLEBIT ) + if( es->eFlags & EF_B_MARKED ) { Q_strcat( text, MAX_TUTORIAL_TEXT, va( "Press %s to unmark this structure\n", @@ -670,7 +670,7 @@ const char *CG_TutorialText( void ) CG_KeyNameForCommand( "+button7" ) ) ); } else if( es && es->modelindex == BA_A_HOVEL && - es->generic1 & B_SPAWNED_TOGGLEBIT && + ( es->eFlags & EF_B_SPAWNED ) && ( ps->stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0 || ps->stats[ STAT_PCLASS ] == PCL_ALIEN_BUILDER0_UPG ) ) { |