diff --git a/JA2.suo b/JA2.suo index 06e993521..32cc1eaa7 100644 Binary files a/JA2.suo and b/JA2.suo differ diff --git a/Tactical/Items.cpp b/Tactical/Items.cpp index 2927e8c3e..8b0fe68fb 100644 --- a/Tactical/Items.cpp +++ b/Tactical/Items.cpp @@ -2234,7 +2234,8 @@ UINT8 CalculateObjectWeight( OBJECTTYPE *pObject ) } else { - double weight = (double)uiMinWeight + (( (double)pObject->ubGunShotsLeft / (double)Weapon[pObject->usItem].ubMagSize) * ( (double)Item[ pObject->usGunAmmoItem].ubWeight - (double)uiMinWeight )) + 0.5; //Pulmu: Account for number of rounds left. + // WANNE: Added Pulmu's weight fix + double weight = (double)uiMinWeight + (( (double)pObject->ubGunShotsLeft / Magazine[Item[pObject->usGunAmmoItem].ubClassIndex].ubMagSize ) * ( (double)Item[ pObject->usGunAmmoItem].ubWeight - (double)uiMinWeight )) + 0.5; //Pulmu: Account for number of rounds left. usWeight += (UINT16)weight; } } diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index 0281d1798..d4ab95324 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -3526,6 +3526,7 @@ UINT32 CalcChanceToHitGun(SOLDIERTYPE *pSoldier, UINT16 sGridNo, UINT8 ubAimTime iSightRange = SoldierToBodyPartLineOfSightTest( pSoldier, sGridNo, pSoldier->bTargetLevel, pSoldier->bAimShotLocation, (UINT8) (MaxDistanceVisible() * 2), TRUE ); } + // WANNE NEW: if (iSightRange == -1) // didn't do a bodypart-based test { iSightRange = SoldierTo3DLocationLineOfSightTest( pSoldier, sGridNo, pSoldier->bTargetLevel, pSoldier->bTargetCubeLevel, (UINT8) (MaxDistanceVisible() * 2), TRUE ); diff --git a/TileEngine/worldman.cpp b/TileEngine/worldman.cpp index cf857b142..6e2d978bf 100644 --- a/TileEngine/worldman.cpp +++ b/TileEngine/worldman.cpp @@ -3386,7 +3386,8 @@ UINT8 WhoIsThere2( INT16 sGridNo, INT8 bLevel ) // person must either have their pSoldier->sGridNo here or be non-passable if ( (pStructure->fFlags & STRUCTURE_PERSON) && ( !(pStructure->fFlags & STRUCTURE_PASSABLE) || MercPtrs[ pStructure->usStructureID ]->sGridNo == sGridNo) ) { - if ( ( bLevel == 0 && pStructure->sCubeOffset == 0 ) || (bLevel > 0 && pStructure->sCubeOffset > 0) ) + // WANNE NEW: CTH Fix + //if ( ( bLevel == 0 && pStructure->sCubeOffset == 0 ) || (bLevel > 0 && pStructure->sCubeOffset > 0) ) { // found a person, on the right level! // structure ID and merc ID are identical for merc structures