diff Actor.cpp @ 1877:bed4532cfe59

Actor::StealFrom changed signature to void, minor cleanup
author Grumpy7
date Thu, 17 Oct 2013 09:10:18 +0200
parents 2070d01ccfae
children 6ffa3228eaf7
line wrap: on
line diff
--- a/Actor.cpp	Thu Oct 17 09:00:11 2013 +0200
+++ b/Actor.cpp	Thu Oct 17 09:10:18 2013 +0200
@@ -1466,22 +1466,16 @@
 }
 
 //----- (0042EBEE) --------------------------------------------------------
-bool Actor::StealFrom(unsigned int uActorID)
+void Actor::StealFrom( unsigned int uActorID )
 {
-  unsigned int v1; // esi@1
   Player *pPlayer; // edi@1
-  bool result; // eax@1
   int v4; // ebx@2
   unsigned int v5; // eax@2
   DDM_DLV_Header *v6; // esi@4
-  unsigned int v7; // [sp+8h] [bp-4h]@1
   int v8; // [sp+8h] [bp-4h]@6
 
-  v1 = uActiveCharacter;
-  v7 = uActorID;
   pPlayer = &pParty->pPlayers[uActiveCharacter-1];
-  result = pPlayer->CanAct();
-  if ( result )
+  if ( pPlayer->CanAct() )
   {
     CastSpellInfoHelpers::_427D48();
     v4 = 0;
@@ -1491,16 +1485,15 @@
     v6 = &pOutdoor->ddm;
     if ( uCurrentlyLoadedLevelType != LEVEL_Outdoor)
       v6 = &pIndoor->dlv;
-    pPlayer->StealFromActor(v7, v4, v6->uReputation++);
+    pPlayer->StealFromActor(uActorID, v4, v6->uReputation++);
     v8 = pPlayer->GetAttackRecoveryTime(0);
     if ( v8 < 30 )
       v8 = 30;
     if ( !pParty->bTurnBasedModeOn )
-      pPlayer->SetRecoveryTime((signed __int64)(flt_6BE3A4_debug_recmod1 * (double)v8 * 2.133333333333333));
+      pPlayer->SetRecoveryTime((int)(flt_6BE3A4_debug_recmod1 * v8 * 2.133333333333333));
     pTurnEngine->ApplyPlayerAction();
-    result = 1;
   }
-  return result;
+  return;
 }
 
 //----- (00403A60) --------------------------------------------------------