diff --git a/Tactical/Interface Items.cpp b/Tactical/Interface Items.cpp index 5edc715b..aaf8c9ed 100644 --- a/Tactical/Interface Items.cpp +++ b/Tactical/Interface Items.cpp @@ -9542,7 +9542,6 @@ BOOLEAN HandleItemPointerClick( INT32 usMapPos ) } } - // CHANGE DIRECTION AT LEAST ubDirection = (UINT8)GetDirectionFromGridNo( sGridNo, gpItemPointerSoldier ); gpItemPointerSoldier->EVENT_SetSoldierDesiredDirection( ubDirection ); @@ -9554,8 +9553,8 @@ BOOLEAN HandleItemPointerClick( INT32 usMapPos ) DebugAttackBusy( "Incrementing ABC: Throw item\n" ); - // Given our gridno, throw grenate! - CalculateLaunchItemParamsForThrow( gpItemPointerSoldier, sGridNo, gpItemPointerSoldier->pathing.bLevel, (INT16)( ( gsInterfaceLevel * 256 ) + sEndZ ), gpItemPointer, 100, ubThrowActionCode, uiThrowActionData, gpItemPointer->usItem ); + // Given our gridno, throw grenade! + CalculateLaunchItemParamsForThrow(gpItemPointerSoldier, sGridNo, gsInterfaceLevel, (INT16)(gsInterfaceLevel * 256 + sEndZ), gpItemPointer, 100, ubThrowActionCode, uiThrowActionData, gpItemPointer->usItem); // OK, goto throw animation HandleSoldierThrowItem( gpItemPointerSoldier, usMapPos ); @@ -9565,7 +9564,6 @@ BOOLEAN HandleItemPointerClick( INT32 usMapPos ) gfDontChargeAPsToPickup = FALSE; EndItemPointer( ); - return( TRUE ); } diff --git a/Tactical/LOS.cpp b/Tactical/LOS.cpp index 6a2ebedd..42c88ded 100644 --- a/Tactical/LOS.cpp +++ b/Tactical/LOS.cpp @@ -9800,9 +9800,6 @@ void CalcPreRecoilOffset( SOLDIERTYPE *pShooter, OBJECTTYPE *pWeapon, FLOAT *dMu // Calculate the Distance Ratio for later use. FLOAT dDistanceRatio = (FLOAT)uiRange / (FLOAT)gGameCTHConstants.NORMAL_RECOIL_DISTANCE; - // Calculate the various counter-force related values for our shooter. - FLOAT dCounterForceMax = CalcCounterForceMax(pShooter, pWeapon); - UINT8 stance = gAnimControl[ pShooter->usAnimState ].ubEndHeight; // Flugente: new feature: if the next tile in our sight direction has a height so that we could rest our weapon on it, we do that, thereby gaining the prone boni instead. This includes bipods @@ -9811,7 +9808,7 @@ void CalcPreRecoilOffset( SOLDIERTYPE *pShooter, OBJECTTYPE *pWeapon, FLOAT *dMu FLOAT moda = CalcCounterForceMax(pShooter, pWeapon, stance); FLOAT modb = CalcCounterForceMax(pShooter, pWeapon, gAnimControl[ pShooter->usAnimState ].ubEndHeight); - FLOAT iCounterForceMax = ((gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb)/100); + FLOAT dCounterForceMax = (gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb) / 100; UINT32 uiCounterForceAccuracy = CalcCounterForceAccuracy(pShooter, pWeapon, uiRange, FALSE, true); @@ -10079,8 +10076,6 @@ void CalcRecoilOffset( SOLDIERTYPE *pShooter, FLOAT *dMuzzleOffsetX, FLOAT *dMuz // maximum counter-force that can be applied. By default, it is based primarily on the strength of the shooter, // although agility is also helpful. - FLOAT dCounterForceMax = CalcCounterForceMax(pShooter, pWeapon); - UINT8 stance = gAnimControl[ pShooter->usAnimState ].ubEndHeight; // Flugente: new feature: if the next tile in our sight direction has a height so that we could rest our weapon on it, we do that, thereby gaining the prone boni instead. This includes bipods @@ -10089,7 +10084,7 @@ void CalcRecoilOffset( SOLDIERTYPE *pShooter, FLOAT *dMuzzleOffsetX, FLOAT *dMuz FLOAT moda = CalcCounterForceMax(pShooter, pWeapon, stance); FLOAT modb = CalcCounterForceMax(pShooter, pWeapon, gAnimControl[ pShooter->usAnimState ].ubEndHeight); - FLOAT iCounterForceMax = ((gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb)/100); + FLOAT dCounterForceMax = (gGameExternalOptions.ubProneModifierPercentage * moda + (100 - gGameExternalOptions.ubProneModifierPercentage) * modb) / 100; // iCounterForceMax is now the absolute limit. diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index eaa94e42..f034c7f7 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -17361,7 +17361,7 @@ INT16 SOLDIERTYPE::GetAPBonus( ) bonus += this->GetBackgroundValue( BG_ASSAULT ); UINT8 ubSector = (UINT8)SECTOR( this->sSectorX, this->sSectorY ); - UINT8 ubTraverseType = SectorInfo[ubSector].ubTraversability[ubDirection]; + UINT8 ubTraverseType = SectorInfo[ubSector].ubTraversability[THROUGH_STRATEGIC_MOVE]; switch ( ubTraverseType ) {