mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-31 07:53:36 +00:00
fix Hooneyfoot bug
svn-id: r18379
This commit is contained in:
parent
001d14cf69
commit
802780619a
@ -461,7 +461,7 @@ void Actor::realLocation(Location &location, uint16 objectId, uint16 walkFlags)
|
||||
void Actor::actorFaceTowardsPoint(uint16 actorId, const Location &toLocation) {
|
||||
ActorData *actor;
|
||||
Location delta;
|
||||
debug (8, "Actor::actorFaceTowardsPoint actorId=%i", actorId);
|
||||
//debug (8, "Actor::actorFaceTowardsPoint actorId=%i", actorId);
|
||||
actor = getActor(actorId);
|
||||
|
||||
toLocation.delta(actor->location, delta);
|
||||
@ -576,7 +576,11 @@ void Actor::updateActorsScene(int actorsEntrance) {
|
||||
_protagonist = NULL;
|
||||
|
||||
for (i = 0; i < _actorsCount; i++) {
|
||||
actor = _actors[i];
|
||||
actor = _actors[i];
|
||||
actor->inScene = false;
|
||||
if (actor->disabled) {
|
||||
continue;
|
||||
}
|
||||
if ((actor->flags & (kProtagonist | kFollower)) || (i == 0)) {
|
||||
|
||||
if (actor->flags & kProtagonist) {
|
||||
@ -591,6 +595,7 @@ void Actor::updateActorsScene(int actorsEntrance) {
|
||||
actor->sceneNumber = _vm->_scene->currentSceneNumber();
|
||||
}
|
||||
if (actor->sceneNumber == _vm->_scene->currentSceneNumber()) {
|
||||
actor->inScene = true;
|
||||
actor->actionCycle = (_vm->_rnd.getRandomNumber(7) & 0x7) * 4; // 1/8th chance
|
||||
}
|
||||
}
|
||||
@ -813,10 +818,7 @@ void Actor::handleActions(int msec, bool setup) {
|
||||
|
||||
for (i = 0; i < _actorsCount; i++) {
|
||||
actor = _actors[i];
|
||||
if (actor->disabled)
|
||||
continue;
|
||||
|
||||
if (actor->sceneNumber != _vm->_scene->currentSceneNumber())
|
||||
if (!actor->inScene)
|
||||
continue;
|
||||
|
||||
//todo: dragon stuff
|
||||
@ -1255,13 +1257,11 @@ void Actor::createDrawOrderList() {
|
||||
_drawOrderList.clear();
|
||||
for (i = 0; i < _actorsCount; i++) {
|
||||
actor = _actors[i];
|
||||
if (actor->disabled)
|
||||
if (!actor->inScene)
|
||||
continue;
|
||||
|
||||
if (i == 0 || actor->flags & (kFollower | kProtagonist) || actor->sceneNumber == _vm->_scene->currentSceneNumber()) {
|
||||
_drawOrderList.pushBack(actor, compareFunction);
|
||||
calcScreenPosition(actor);
|
||||
}
|
||||
_drawOrderList.pushBack(actor, compareFunction);
|
||||
calcScreenPosition(actor);
|
||||
}
|
||||
|
||||
for (i = 0; i < _objsCount; i++) {
|
||||
@ -1649,8 +1649,7 @@ bool Actor::actorWalkTo(uint16 actorId, const Location &toLocation) {
|
||||
|
||||
for (i = 0; (i < _actorsCount) && (_barrierCount < ACTOR_BARRIERS_MAX); i++) {
|
||||
anotherActor = _actors[i];
|
||||
if (anotherActor->disabled) continue;
|
||||
if (anotherActor->sceneNumber != _vm->_scene->currentSceneNumber()) continue;
|
||||
if (!anotherActor->inScene) continue;
|
||||
if (anotherActor == actor ) continue;
|
||||
|
||||
|
||||
|
@ -274,7 +274,9 @@ public:
|
||||
int frameListResourceId; // Actor's frame list resource id
|
||||
|
||||
byte speechColor; // Actor dialogue color
|
||||
|
||||
//
|
||||
bool inScene;
|
||||
|
||||
//variables
|
||||
uint16 actorFlags; // dynamic flags
|
||||
int32 currentAction; // ActorActions type
|
||||
|
@ -1151,8 +1151,7 @@ void IsoMap::placeOnTileMap(const Location &start, Location &result, int16 dista
|
||||
|
||||
for (i = 0; i < _vm->_actor->_actorsCount; i++) {
|
||||
actor = _vm->_actor->_actors[i];
|
||||
if (actor->disabled) continue;
|
||||
if (actor->sceneNumber != _vm->_scene->currentSceneNumber()) continue;
|
||||
if (!actor->inScene) continue;
|
||||
|
||||
u = (actor->location.u() >> 4) - uBase;
|
||||
v = (actor->location.v() >> 4) - vBase;
|
||||
@ -1255,8 +1254,7 @@ void IsoMap::findTilePath(ActorData* actor, const Location &start, const Locatio
|
||||
(_vm->_scene->currentSceneResourceId() != RID_ITE_OVERMAP_SCENE)) {
|
||||
for (i = 0; i < _vm->_actor->_actorsCount; i++) {
|
||||
other = _vm->_actor->_actors[i];
|
||||
if (other->disabled) continue;
|
||||
if (other->sceneNumber != _vm->_scene->currentSceneNumber()) continue;
|
||||
if (!other->inScene) continue;
|
||||
if (other==actor) continue;
|
||||
|
||||
u = (other->location.u() >> 4) - uBase;
|
||||
|
Loading…
x
Reference in New Issue
Block a user