Skip to content

Commit

Permalink
Load mission droid pointers, fixes bug present in ticket:2731
Browse files Browse the repository at this point in the history
  • Loading branch information
perim committed May 21, 2011
1 parent 10f6740 commit f1321b5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game.cpp
Expand Up @@ -4353,6 +4353,10 @@ static bool loadSaveDroidPointers(const QString &pFileName, DROID **ppsCurrentDr
int id = ini.value("id").toInt();

for (psDroid = ppsCurrentDroidLists[player]; psDroid && psDroid->id != id; psDroid = psDroid->psNext) {}
if (!psDroid)
{
for (psDroid = mission.apsDroidLists[player]; psDroid && psDroid->id != id; psDroid = psDroid->psNext) {}
}
ASSERT_OR_RETURN(false, psDroid, "Droid %d not found", id);

for (int j = 0; j < DROID_MAXWEAPS; j++)
Expand Down

0 comments on commit f1321b5

Please sign in to comment.