mirror of
https://github.com/TombEngine/TombEngine.git
synced 2025-04-30 16:57:57 +03:00
Fixed jumping enemies
This commit is contained in:
parent
f4ee436f5d
commit
d7f2bc18f8
1 changed files with 14 additions and 10 deletions
|
@ -795,7 +795,8 @@ int CreatureAnimation(short itemNumber, short angle, short tilt)
|
||||||
else if (LOT->isJumping)
|
else if (LOT->isJumping)
|
||||||
{
|
{
|
||||||
floor = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &roomNumber);
|
floor = GetFloor(item->pos.xPos, item->pos.yPos, item->pos.zPos, &roomNumber);
|
||||||
item->floor = GetFloorHeight(floor, item->pos.xPos, item->pos.yPos, item->pos.zPos);
|
int height2 = GetFloorHeight(floor, item->pos.xPos, item->pos.yPos, item->pos.zPos);
|
||||||
|
item->floor = height2;
|
||||||
|
|
||||||
if (LOT->isMonkeying)
|
if (LOT->isMonkeying)
|
||||||
{
|
{
|
||||||
|
@ -804,7 +805,9 @@ int CreatureAnimation(short itemNumber, short angle, short tilt)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (item->pos.yPos > height + STEP_SIZE)
|
if (item->pos.yPos > item->floor)
|
||||||
|
{
|
||||||
|
if (item->pos.yPos > item->floor + STEP_SIZE)
|
||||||
{
|
{
|
||||||
item->pos.xPos = old.x;
|
item->pos.xPos = old.x;
|
||||||
item->pos.yPos = old.y;
|
item->pos.yPos = old.y;
|
||||||
|
@ -812,7 +815,8 @@ int CreatureAnimation(short itemNumber, short angle, short tilt)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
item->pos.yPos = height;
|
item->pos.yPos = item->floor;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue