diff Player.cpp @ 828:0f56abdcce94

Massive refactors of spells + PID (packed id) macros introduced.
author Nomad
date Wed, 27 Mar 2013 00:27:38 +0200
parents 5e3f4bf3b8e6
children dfd683c4f538
line wrap: on
line diff
--- a/Player.cpp	Tue Mar 26 20:06:51 2013 +0200
+++ b/Player.cpp	Wed Mar 27 00:27:38 2013 +0200
@@ -25,6 +25,7 @@
 #include "texts.h"
 
 #include "mm7_data.h"
+#include "MM7.h"
 
 
 
@@ -582,7 +583,7 @@
   int v9; // eax@10
   //unsigned int pVoiceID; // ecx@10
   int v11; // esi@10
-  signed int v12; // eax@11
+  //signed int v12; // eax@11
   signed int v13; // esi@12
   int v14; // eax@12
   //int v15; // eax@17
@@ -629,8 +630,7 @@
       if (int _v1 = byte_4ECF08[v11 - 1][uVoiceID])
       {
         pSoundId = rand() % _v1 + 2 * (v11 + 50 * uVoiceID) + 4998;
-        v12 = (8 * pPlayerNum + 312) | OBJECT_Player;
-        pAudioPlayer->PlaySound((SoundID)pSoundId, v12, 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0);
+        pAudioPlayer->PlaySound((SoundID)pSoundId, PID(OBJECT_Player, pPlayerNum + 39), 0, -1, 0, 0, pSoundVolumeLevels[uVoicesVolumeMultiplier] * 128.0f, 0);
       }
     }
   }
@@ -4549,7 +4549,7 @@
 //----- (0048E96A) --------------------------------------------------------
 void Player::SetRecoveryTime(signed int rec)
 {
-  assert(rec > 0);
+  assert(rec >= 0);
 
   if (rec > uTimeToRecovery)
     uTimeToRecovery = rec;