mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
- bugfix: CtH calculation (shows up nearly 0% next to an enemy), when mercs spots an enemy after climbing up/down a rooftop
- bugfix: Added Pulmu's weight calculation fix git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@563 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+2
-1
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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 );
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user