Mercurial > mm7
comparison Party.cpp @ 2071:9f4d5a9d6fd8
Merge
author | Nomad |
---|---|
date | Tue, 03 Dec 2013 21:29:12 +0200 |
parents | 7890930801a8 |
children | d28d3c006077 |
comparison
equal
deleted
inserted
replaced
2070:4231fdf46dde | 2071:9f4d5a9d6fd8 |
---|---|
158 | 158 |
159 //----- (0049370F) -------------------------------------------------------- | 159 //----- (0049370F) -------------------------------------------------------- |
160 int Party::GetNextActiveCharacter() | 160 int Party::GetNextActiveCharacter() |
161 { | 161 { |
162 int v2; // eax@4 | 162 int v2; // eax@4 |
163 Player *v6; // eax@7 | |
164 signed int v8; // esi@23 | 163 signed int v8; // esi@23 |
165 int v12; // [sp+Ch] [bp-4h]@1 | 164 int v12; // [sp+Ch] [bp-4h]@1 |
166 | 165 |
167 v12 = 0; | 166 v12 = 0; |
168 if ( pParty->bTurnBasedModeOn == 1 ) | 167 if ( pParty->bTurnBasedModeOn == 1 ) |
175 | 174 |
176 if ( playerAlreadyPicked[0] && playerAlreadyPicked[1] && playerAlreadyPicked[2] && playerAlreadyPicked[3] ) | 175 if ( playerAlreadyPicked[0] && playerAlreadyPicked[1] && playerAlreadyPicked[2] && playerAlreadyPicked[3] ) |
177 playerAlreadyPicked.fill(false); | 176 playerAlreadyPicked.fill(false); |
178 for (int i = 0; i < 4; i++) | 177 for (int i = 0; i < 4; i++) |
179 { | 178 { |
180 v6 = &this->pPlayers[i]; | 179 if ( !this->pPlayers[i].CanAct() || this->pPlayers[i].uTimeToRecovery > 0) |
181 if ( !v6->CanAct() | |
182 || v6->uTimeToRecovery > 0) | |
183 { | |
184 playerAlreadyPicked[i] = true; | 180 playerAlreadyPicked[i] = true; |
185 } | |
186 else if ( !playerAlreadyPicked[i] ) | 181 else if ( !playerAlreadyPicked[i] ) |
187 { | 182 { |
188 playerAlreadyPicked[i] = true; | 183 playerAlreadyPicked[i] = true; |
189 if (i > 0) //TODO check if this condition really should be here. it is equal to the original source but still seems kind of weird | 184 if (i > 0) //TODO check if this condition really should be here. it is equal to the original source but still seems kind of weird |
190 return i + 1; | 185 return i + 1; |
192 } | 187 } |
193 } | 188 } |
194 | 189 |
195 for (int i = 0; i < 4; i++) | 190 for (int i = 0; i < 4; i++) |
196 { | 191 { |
197 if ( this->pPlayers[i].CanAct() | 192 if ( this->pPlayers[i].CanAct() && this->pPlayers[i].uTimeToRecovery == 0 ) |
198 && this->pPlayers[i].uTimeToRecovery == 0 ) | |
199 { | 193 { |
200 if ( v12 == 0 || this->pPlayers[i].uSpeedBonus > v8 ) | 194 if ( v12 == 0 || this->pPlayers[i].uSpeedBonus > v8 ) |
201 { | 195 { |
202 v8 = this->pPlayers[i].uSpeedBonus; | 196 v8 = this->pPlayers[i].uSpeedBonus; |
203 v12 = i + 1; | 197 v12 = i + 1; |
816 | 810 |
817 if ( uHoursToSleep > 240 ) | 811 if ( uHoursToSleep > 240 ) |
818 InitializeActors(); | 812 InitializeActors(); |
819 v2 = (signed __int64)((7680 * uHoursToSleep) * 0.033333335); | 813 v2 = (signed __int64)((7680 * uHoursToSleep) * 0.033333335); |
820 pParty->uTimePlayed += v2; | 814 pParty->uTimePlayed += v2; |
821 for (int i = 0; i < 4; i++) | 815 for (int i = 1; i <= 4; i++) |
822 { | 816 { |
823 pPlayers[i + 1]->Recover((int)v2); | 817 pPlayers[i]->Recover((int)v2); |
824 } | 818 } |
825 _494035_timed_effects__water_walking_damage__etc(); | 819 _494035_timed_effects__water_walking_damage__etc(); |
826 } | 820 } |
827 //----- (004B1BDB) -------------------------------------------------------- | 821 //----- (004B1BDB) -------------------------------------------------------- |
828 void RestAndHeal(__int64 uNumMinutes) | 822 void RestAndHeal(__int64 uNumMinutes) |