XEEN: Don't add monsters in setSpeedTable if they're dead

I think this should fix a crash I rarely got in doMonsterTurn
This commit is contained in:
Paul Gilbert 2018-03-16 20:23:22 -04:00
parent 26782415df
commit fe80dcb4fe

View File

@ -1108,7 +1108,7 @@ void Combat::setSpeedTable() {
// Populate the _speedTable list with the character/monster indexes
// in order of attacking speed
_speedTable.clear();
for (; maxSpeed >= 0; --maxSpeed) {
for (; maxSpeed > 0; --maxSpeed) {
for (uint idx = 0; idx < charSpeeds.size(); ++idx) {
if (charSpeeds[idx] == maxSpeed)
_speedTable.push_back(idx);