diff --git a/Tactical/Animation Control.cpp b/Tactical/Animation Control.cpp index cb40d8952..0beb23cc3 100644 --- a/Tactical/Animation Control.cpp +++ b/Tactical/Animation Control.cpp @@ -2058,7 +2058,7 @@ void InitAnimationSurfacesPerBodytype( ) gRandomAnimDefs[ BIGMALE ][ 0 ].sAnimID = BIGBUY_FLEX; gRandomAnimDefs[ BIGMALE ][ 0 ].ubStartRoll = 0; gRandomAnimDefs[ BIGMALE ][ 0 ].ubEndRoll = 9; - gRandomAnimDefs[ BIGMALE ][ 0 ].ubFlags = RANDOM_ANIM_CASUAL; + gRandomAnimDefs[ BIGMALE ][ 0 ].ubFlags = RANDOM_ANIM_CASUAL | RANDOM_ANIM_SHOWOFF; gRandomAnimDefs[ BIGMALE ][ 0 ].ubAnimHeight = ANIM_STAND; gRandomAnimDefs[ BIGMALE ][ 1 ].ubHandRestriction = RANDOM_ANIM_NOTHINGINHAND; diff --git a/Tactical/Animation Control.h b/Tactical/Animation Control.h index ef16584df..a9866910e 100644 --- a/Tactical/Animation Control.h +++ b/Tactical/Animation Control.h @@ -24,6 +24,7 @@ #define RANDOM_ANIM_INJURED 0x08 #define RANDOM_ANIM_DRUNK 0x10 #define RANDOM_ANIM_LOOKAROUND 0x20 +#define RANDOM_ANIM_SHOWOFF 0x40 #define INJURED_CHANGE_THREASHOLD 30 diff --git a/Tactical/Handle UI.cpp b/Tactical/Handle UI.cpp index cb50abac2..79341219b 100644 --- a/Tactical/Handle UI.cpp +++ b/Tactical/Handle UI.cpp @@ -6733,12 +6733,7 @@ BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fChec { return( FALSE ); }*/ - - if( !(_KeyDown( SHIFT )) ) - { - return( FALSE ); - } - + // Loop through positions... for (INT8 cnt = 0; cnt < 4; cnt++) { @@ -6803,11 +6798,18 @@ BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fChec return( FALSE ); } - // If there's a guy here, and he's not prone, we can't jump over him (maybe the way we hop over fence? lol) + // If there's a guy here, and he's not prone, we can't jump over him (maybe the way we hop over fence when he's crouched? lol) ubGuyThere = WhoIsThere2( sInBetween, pSoldier->pathing.bLevel ); - if ( ubGuyThere != NOBODY && ubGuyThere != pSoldier->ubID && gAnimControl[ MercPtrs[ ubGuyThere ]->usAnimState ].ubHeight != ANIM_PRONE ) + if ( ubGuyThere != NOBODY && ubGuyThere != pSoldier->ubID ) { - return( FALSE ); + if ( gAnimControl[ MercPtrs[ ubGuyThere ]->usAnimState ].ubHeight != ANIM_PRONE ) + { + return( FALSE ); + } + else if ( gsCurrentActionPoints == 0 || !fCheckForPath ) + { + return( TRUE ); + } } // Get the height of stuff on the tile, we can only jump over low obstacles like this @@ -6848,6 +6850,11 @@ BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fChec { return( FALSE ); } + + if( !(_KeyDown( SHIFT ) && _KeyDown( CTRL )) ) + { + return( FALSE ); + } // If we got here, we are good to go return ( TRUE ); @@ -6975,6 +6982,11 @@ BOOLEAN IsValidJumpLocation( SOLDIERTYPE *pSoldier, INT32 sGridNo, BOOLEAN fChec default: return( FALSE ); break; + } + + if( !(_KeyDown( SHIFT ) && _KeyDown( CTRL )) ) + { + return( FALSE ); } // If we got here, we are good to go diff --git a/Tactical/Soldier Ani.cpp b/Tactical/Soldier Ani.cpp index 46720fdf8..95bb88eb3 100644 --- a/Tactical/Soldier Ani.cpp +++ b/Tactical/Soldier Ani.cpp @@ -1804,6 +1804,26 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier ) continue; } } + + // If it is lookaround animation, don't play it if we see at least one enemy + if ( pAnimDef->ubFlags & RANDOM_ANIM_SHOWOFF ) + { + // enemy on sight, don't pretend we don't see him! + if ( pSoldier->ubProfile != NO_PROFILE ) + { + if ( gMercProfiles[ pSoldier->ubProfile ].bCharacterTrait != CHAR_TRAIT_SHOWOFF && Random( 10 ) < 9 ) + { + continue; + } + } + else + { + if ( Random( 10 ) < 7 ) + { + continue; + } + } + } // If we are an alternate big guy and have been told to use a normal big merc ani... //if ( ( pAnimDef->ubFlags & RANDOM_ANIM_FIRSTBIGMERC ) && ( pSoldier->uiAnimSubFlags & SUB_ANIM_BIGGUYTHREATENSTANCE ) )