mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
New feature: mercs can drag people and corpses
Requires GameDir >= r2386. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23508&goto=350989&#msg_350989 git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8474 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
+19
-1
@@ -3087,9 +3087,27 @@ UINT32 GetTotalWeight( SOLDIERTYPE* pSoldier )
|
||||
return uiTotalWeight;
|
||||
}
|
||||
|
||||
UINT32 CalculateCarriedWeight( SOLDIERTYPE * pSoldier )
|
||||
UINT32 CalculateCarriedWeight( SOLDIERTYPE * pSoldier, BOOLEAN fConsiderDragging)
|
||||
{
|
||||
UINT32 uiTotalWeight = GetTotalWeight( pSoldier );
|
||||
|
||||
// Flugente: if we drag someone, add their weight to ours
|
||||
if ( fConsiderDragging && pSoldier->IsDraggingSomeone() )
|
||||
{
|
||||
if (pSoldier->usDragPersonID != NOBODY)
|
||||
{
|
||||
SOLDIERTYPE* pOtherSoldier = MercPtrs[pSoldier->usDragPersonID];
|
||||
|
||||
uiTotalWeight += GetTotalWeight( pOtherSoldier );
|
||||
uiTotalWeight += pOtherSoldier->GetBodyWeight();
|
||||
}
|
||||
else if (pSoldier->sDragCorpseID >= 0)
|
||||
{
|
||||
// just give corpses a flat weight
|
||||
uiTotalWeight += 100.0f;
|
||||
}
|
||||
}
|
||||
|
||||
UINT32 uiPercent;
|
||||
UINT32 ubStrengthForCarrying;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user