Skip to content

Commit

Permalink
iwd2: make too difficult actors unscheduled instead of using avatar r…
Browse files Browse the repository at this point in the history
…emoval

finishes the refactor from 06f6f83 and makes everything dandy again
  • Loading branch information
lynxlynxlynx committed May 1, 2014
1 parent 59c642d commit 7a84c94
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions gemrb/plugins/AREImporter/AREImporter.cpp
Expand Up @@ -1032,6 +1032,7 @@ Map* AREImporter::GetMap(const char *ResRef, bool day_or_night)
ab->HomeLocation.x = XDes;
ab->HomeLocation.y = YDes;
ab->Spawned = Spawned;
ab->appearance = Schedule;
//copying the scripting name into the actor
//if the CreatureAreaFlag was set to 8
if ((Flags&AF_NAME_OVERRIDE) || (core->HasFeature(GF_IWD2_SCRIPTNAME)) ) {
Expand All @@ -1054,12 +1055,9 @@ Map* AREImporter::GetMap(const char *ResRef, bool day_or_night)
// 1 - area difficulty 1
// 2 - area difficulty 2
// 4 - area difficulty 3
if (!DifficultyMargin || (DifficultyMargin & map->AreaDifficulty)) {
//TODO: save AF_ENABLED instead, so if someone implements Imprisonment for iwd2, this won't interfere
ab->SetBase(IE_AVATARREMOVAL, 0);
} else {
if (DifficultyMargin && !(DifficultyMargin & map->AreaDifficulty)) {
// iwd2 has GF_START_ACTIVE off, but that only touches IF_IDLE
ab->SetBase(IE_AVATARREMOVAL, 1);
ab->appearance = 0;
}
}
}
Expand All @@ -1074,7 +1072,6 @@ Map* AREImporter::GetMap(const char *ResRef, bool day_or_night)
}
}
ab->SetOrientation( Orientation,0 );
ab->appearance = Schedule;
ab->TalkCount = TalkCount;
// TODO: remove corpse at removal time?
ab->RemovalTime = RemovalTime;
Expand Down

0 comments on commit 7a84c94

Please sign in to comment.