Convert SOLDIERTYPE::usDragPersonID to SoldierID

This commit is contained in:
Asdow
2024-11-16 00:09:48 +02:00
parent 153d402065
commit 8ef7fb5ae4
3 changed files with 4 additions and 8 deletions
+1 -1
View File
@@ -3167,7 +3167,7 @@ UINT32 CalculateCarriedWeight( SOLDIERTYPE * pSoldier, BOOLEAN fConsiderDragging
{
if (pSoldier->usDragPersonID != NOBODY)
{
SOLDIERTYPE* pOtherSoldier = MercPtrs[pSoldier->usDragPersonID];
SOLDIERTYPE* pOtherSoldier = pSoldier->usDragPersonID;
uiTotalWeight += GetTotalWeight( pOtherSoldier );
uiTotalWeight += pOtherSoldier->GetBodyWeight();
+2 -2
View File
@@ -11529,7 +11529,7 @@ void SOLDIERTYPE::MoveMerc( FLOAT dMovementChange, FLOAT dAngle, BOOLEAN fCheckR
if ( this->usDragPersonID != NOBODY )
{
SOLDIERTYPE* pSoldier = MercPtrs[this->usDragPersonID];
SOLDIERTYPE* pSoldier = this->usDragPersonID;
if ( pSoldier )
{
@@ -20876,7 +20876,7 @@ void SOLDIERTYPE::CancelDrag()
// if we are dragging a person, set them to the center of their gridno, otherwise their position might be off
if (this->usDragPersonID != NOBODY)
{
SOLDIERTYPE* pSoldier = MercPtrs[this->usDragPersonID];
SOLDIERTYPE* pSoldier = this->usDragPersonID;
if ( pSoldier && !TileIsOutOfBounds(pSoldier->sGridNo) )
{
+1 -5
View File
@@ -1532,12 +1532,8 @@ public:
// Flugente: this was the location of required variables required for the now removed poison feature. They can be used again
UINT8 ubMilitiaAssists; // Flugente: stores militia assists
INT8 sNonNPCTraderID; // Flugente: we can set up non-NPC soldiers to be merchants, we store their dealer id here (value > 0 means arms dealer entry x)
//INT8 bUnusedINT8_3;
UINT16 usDragPersonID; // Flugente: id of person we are dragging
//INT16 bUnusedINT16_4;
SoldierID usDragPersonID; // Flugente: id of person we are dragging
INT16 sDragCorpseID; // Flugente: id of corpse we are dragging
SoldierID usChatPartnerID; // Flugente: the id of another merc we are 'chatting' with
// Flugente: new variables for extra stats