Skip to content

Commit

Permalink
#118 universal solution
Browse files Browse the repository at this point in the history
  • Loading branch information
XProger committed May 22, 2018
1 parent 6b084c8 commit 36b7355
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/enemy.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ struct Enemy : Character {
return false;
thinkTime -= 1.0f / 30.0f;

updateZone();

target = (Character*)game->getLara(pos);

vec3 targetVec = target->pos - pos - getDir() * length;
Expand Down Expand Up @@ -921,8 +923,6 @@ struct Rat : Enemy {

modelLand = level->getModelIndex(TR::Entity::ENEMY_RAT_LAND) - 1;
modelWater = level->getModelIndex(TR::Entity::ENEMY_RAT_WATER) - 1;
getModel();
updateZone();
}

const virtual TR::Model* getModel() {
Expand Down Expand Up @@ -1119,8 +1119,6 @@ struct Crocodile : Enemy {
bool water = getRoom().flags.water;
flying = water;
stand = water ? STAND_UNDERWATER : STAND_GROUND;
getModel();
updateZone();
}

const virtual TR::Model* getModel() {
Expand Down

0 comments on commit 36b7355

Please sign in to comment.