mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-19 03:11:22 +02:00
fix Doppelganger
This commit is contained in:
@@ -1454,7 +1454,7 @@ struct Controller {
|
||||
|
||||
updateJoints();
|
||||
|
||||
Core::mModel = getMatrix();
|
||||
Core::mModel = matrix;
|
||||
|
||||
if (layers) {
|
||||
uint32 mask = 0;
|
||||
|
10
src/enemy.h
10
src/enemy.h
@@ -2447,9 +2447,13 @@ struct Doppelganger : Enemy {
|
||||
Enemy::updateRoom();
|
||||
|
||||
TR::Level::FloorInfo info;
|
||||
getFloorInfo(getRoomIndex(), pos, info);
|
||||
getFloorInfo(getRoomIndex(), target->pos, info);
|
||||
float laraHeight = info.floor - target->pos.y;
|
||||
|
||||
if (stand != STAND_AIR && target->stand == Character::STAND_GROUND && pos.y < info.floor - 1024) {
|
||||
getFloorInfo(getRoomIndex(), pos, info);
|
||||
float selfHeight = info.floor - pos.y;
|
||||
|
||||
if (stand != STAND_AIR && target->stand == Character::STAND_GROUND && selfHeight > 1024 && laraHeight < 256) {
|
||||
animation = Animation(level, target->getModel());
|
||||
animation.setAnim(ANIM_FALL, 1);
|
||||
stand = STAND_AIR;
|
||||
@@ -2457,7 +2461,7 @@ struct Doppelganger : Enemy {
|
||||
}
|
||||
|
||||
if (stand == STAND_AIR) {
|
||||
if (pos.y > info.floor) {
|
||||
if (selfHeight < 128.0f) {
|
||||
game->checkTrigger(this, true);
|
||||
flags.invisible = true;
|
||||
deactivate(true);
|
||||
|
Reference in New Issue
Block a user