diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgame/cg_buildable.c | 22 | ||||
-rw-r--r-- | src/game/g_buildable.c | 8 | ||||
-rw-r--r-- | src/game/g_weapon.c | 3 | ||||
-rw-r--r-- | src/game/tremulous.h | 2 |
4 files changed, 22 insertions, 13 deletions
diff --git a/src/cgame/cg_buildable.c b/src/cgame/cg_buildable.c index 2715529e..f44df8e8 100644 --- a/src/cgame/cg_buildable.c +++ b/src/cgame/cg_buildable.c @@ -277,17 +277,17 @@ static qboolean CG_ParseBuildableAnimationFile( const char *filename, buildable_ // load the file len = trap_FS_FOpenFile( filename, &f, FS_READ ); - if ( len <= 0 ) + if( len <= 0 ) return qfalse; - if ( len >= sizeof( text ) - 1 ) + if( len >= sizeof( text ) - 1 ) { CG_Printf( "File %s too long\n", filename ); return qfalse; } trap_FS_Read( text, len, f ); - text[len] = 0; + text[ len ] = 0; trap_FS_FCloseFile( f ); // parse the text @@ -298,13 +298,13 @@ static qboolean CG_ParseBuildableAnimationFile( const char *filename, buildable_ { token = COM_Parse( &text_p ); - if ( !*token ) + if( !*token ) break; animations[ i ].firstFrame = atoi( token ); token = COM_Parse( &text_p ); - if ( !*token ) + if( !*token ) break; animations[ i ].numFrames = atoi( token ); @@ -312,7 +312,7 @@ static qboolean CG_ParseBuildableAnimationFile( const char *filename, buildable_ animations[ i ].flipflop = qfalse; // if numFrames is negative the animation is reversed - if ( animations[ i ].numFrames < 0 ) + if( animations[ i ].numFrames < 0 ) { animations[ i ].numFrames = -animations[ i ].numFrames; animations[ i ].reversed = qtrue; @@ -325,11 +325,11 @@ static qboolean CG_ParseBuildableAnimationFile( const char *filename, buildable_ animations[i].loopFrames = atoi( token ); token = COM_Parse( &text_p ); - if ( !*token ) + if( !*token ) break; fps = atof( token ); - if ( fps == 0 ) + if( fps == 0 ) fps = 1; animations[ i ].frameLerp = 1000 / fps; @@ -604,8 +604,8 @@ static void CG_RunBuildableLerpFrame( centity_t *cent ) if( anim->reversed ) lf->frame = anim->firstFrame + anim->numFrames - 1 - f; - else if(anim->flipflop && f>=anim->numFrames) - lf->frame = anim->firstFrame + anim->numFrames - 1 - (f%anim->numFrames); + else if( anim->flipflop && f >= anim->numFrames ) + lf->frame = anim->firstFrame + anim->numFrames - 1 - ( f % anim->numFrames ); else lf->frame = anim->firstFrame + f; @@ -647,6 +647,8 @@ static void CG_BuildableAnimation( centity_t *cent, int *old, int *now, float *b { if( cent->buildableAnim == es->torsoAnim || es->legsAnim & ANIM_FORCEBIT ) cent->buildableAnim = cent->oldBuildableAnim = es->legsAnim; + else + cent->buildableAnim = cent->oldBuildableAnim = es->torsoAnim; } CG_RunBuildableLerpFrame( cent ); diff --git a/src/game/g_buildable.c b/src/game/g_buildable.c index 26a9bdbb..75284a09 100644 --- a/src/game/g_buildable.c +++ b/src/game/g_buildable.c @@ -439,6 +439,7 @@ void ASpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int self->die = nullDieFunction; self->think = ASpawn_Blast; self->nextthink = level.time + 5000; //wait .5 seconds before damaging others + self->s.eFlags &= ~EF_FIRING; //prevent any firing effects if( attacker && attacker->client && attacker->client->ps.stats[ STAT_PTEAM ] == PTE_HUMANS ) { @@ -652,6 +653,7 @@ void ABarricade_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, self->die = nullDieFunction; self->think = ABarricade_Blast; + self->s.eFlags &= ~EF_FIRING; //prevent any firing effects self->nextthink = level.time + 5000; } @@ -998,6 +1000,7 @@ void AHovel_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int //pretty events and item cleanup self->s.eFlags |= EF_NODRAW; //don't draw the model once its destroyed G_AddEvent( self, EV_ALIEN_BUILDABLE_EXPLOSION, DirToByte( dir ) ); + self->s.eFlags &= ~EF_FIRING; //prevent any firing effects self->timestamp = level.time; self->think = ASpawn_Melt; self->nextthink = level.time + 500; //wait .5 seconds before damaging others @@ -1839,6 +1842,7 @@ void HSpawn_Die( gentity_t *self, gentity_t *inflictor, gentity_t *attacker, int self->think = HSpawn_Blast; self->nextthink = level.time + HUMAN_DETONATION_DELAY; self->powered = qfalse; //free up power + self->s.eFlags &= ~EF_FIRING; //prevent any firing effects if( attacker && attacker->client && attacker->client->ps.stats[ STAT_PTEAM ] == PTE_ALIENS ) { @@ -2160,8 +2164,6 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin built->splashRadius = BG_FindSplashRadiusForBuildable( buildable ); built->splashMethodOfDeath = BG_FindMODForBuildable( buildable ); - G_setIdleBuildableAnim( built, BG_FindAnimForBuildable( buildable ) ); - built->nextthink = BG_FindNextThinkForBuildable( buildable ); built->takedamage = qfalse; @@ -2320,6 +2322,8 @@ gentity_t *G_buildItem( gentity_t *builder, buildable_t buildable, vec3_t origin G_AddEvent( built, EV_BUILD_CONSTRUCT, 0 ); + G_setIdleBuildableAnim( built, BG_FindAnimForBuildable( buildable ) ); + if( built->builtBy >= 0 ) G_setBuildableAnim( built, BANIM_CONSTRUCT1, qtrue ); diff --git a/src/game/g_weapon.c b/src/game/g_weapon.c index c6a8759e..d036c0f5 100644 --- a/src/game/g_weapon.c +++ b/src/game/g_weapon.c @@ -809,7 +809,10 @@ qboolean CheckPounceAttack( gentity_t *ent ) return qfalse; if( ent->client->ps.groundEntityNum != ENTITYNUM_NONE ) + { + ent->client->allowedToPounce = qfalse; return qfalse; + } // set aiming directions AngleVectors( ent->client->ps.viewangles, forward, right, up ); diff --git a/src/game/tremulous.h b/src/game/tremulous.h index c0be2e3b..42dc922f 100644 --- a/src/game/tremulous.h +++ b/src/game/tremulous.h @@ -464,7 +464,7 @@ #define TESLAGEN_SPLASHRADIUS 100 #define TESLAGEN_REPEAT 500 #define TESLAGEN_RANGE 750 -#define TESLAGEN_DMG HDM(50) +#define TESLAGEN_DMG HDM(20) #define DC_BP 80 #define DC_BT 10000 |