mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
Fix: endless clock as vehicle tries to cower
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7875 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -9583,13 +9583,19 @@ void SOLDIERTYPE::BeginSoldierGetup( void )
|
||||
pStructureFileRef = GetAnimationStructureRef( this->ubID, DetermineSoldierAnimationSurface( this, ANIM_CROUCH ), ANIM_CROUCH );
|
||||
break;
|
||||
}
|
||||
fEnoughPlace = OkayToAddStructureToWorld( this->sGridNo, this->pathing.bLevel, &(pStructureFileRef->pDBStructureRef[gOneCDirection[this->ubDirection]]), this->ubID, FALSE, NOBODY );
|
||||
|
||||
if ( pStructureFileRef )
|
||||
fEnoughPlace = OkayToAddStructureToWorld( this->sGridNo, this->pathing.bLevel, &(pStructureFileRef->pDBStructureRef[gOneCDirection[this->ubDirection]]), this->ubID, FALSE, NOBODY );
|
||||
}
|
||||
else
|
||||
// vehicles can't cower...
|
||||
else if ( !(this->flags.uiStatusFlags & SOLDIER_VEHICLE) )
|
||||
{
|
||||
pStructureFileRef = GetAnimationStructureRef( this->ubID, DetermineSoldierAnimationSurface( this, END_COWER ), END_COWER );
|
||||
fEnoughPlace = OkayToAddStructureToWorld( this->sGridNo, this->pathing.bLevel, &(pStructureFileRef->pDBStructureRef[gOneCDirection[this->ubDirection]]), this->ubID, FALSE, NOBODY );
|
||||
|
||||
if ( pStructureFileRef )
|
||||
fEnoughPlace = OkayToAddStructureToWorld( this->sGridNo, this->pathing.bLevel, &(pStructureFileRef->pDBStructureRef[gOneCDirection[this->ubDirection]]), this->ubID, FALSE, NOBODY );
|
||||
}
|
||||
|
||||
if ( this->stats.bLife >= OKLIFE && this->bBreath >= OKBREATH && (this->bSleepDrugCounter == 0) && fEnoughPlace )
|
||||
{
|
||||
// get up you hoser!
|
||||
@@ -9624,7 +9630,8 @@ void SOLDIERTYPE::BeginSoldierGetup( void )
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
// vehicles can't cower...
|
||||
else if ( !(this->flags.uiStatusFlags & SOLDIER_VEHICLE) )
|
||||
{
|
||||
this->EVENT_InitNewSoldierAnim( END_COWER, 0, FALSE );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user