|
|
|
|
@ -911,10 +911,7 @@ void Teleport(Monster &monster)
|
|
|
|
|
monster.occupyTile(*position, false); |
|
|
|
|
monster.position.old = *position; |
|
|
|
|
monster.direction = GetMonsterDirection(monster); |
|
|
|
|
|
|
|
|
|
if (monster.lightId != NO_LIGHT) { |
|
|
|
|
ChangeLightXY(monster.lightId, *position); |
|
|
|
|
} |
|
|
|
|
ChangeLightXY(monster.lightId, *position); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool IsHardHit(Monster &target, unsigned dam) |
|
|
|
|
@ -1027,8 +1024,7 @@ bool MonsterWalk(Monster &monster)
|
|
|
|
|
monster.position.tile.y += monster.var2; |
|
|
|
|
// dMonster is set here for backwards compatibility; without it, the monster would be invisible if loaded from a vanilla save.
|
|
|
|
|
monster.occupyTile(monster.position.tile, false); |
|
|
|
|
if (monster.lightId != NO_LIGHT) |
|
|
|
|
ChangeLightXY(monster.lightId, monster.position.tile); |
|
|
|
|
ChangeLightXY(monster.lightId, monster.position.tile); |
|
|
|
|
M_StartStand(monster, monster.direction); |
|
|
|
|
} else { // We didn't reach new tile so update monster's "sub-tile" position
|
|
|
|
|
if (monster.animInfo.tickCounterOfCurrentFrame == 0) { |
|
|
|
|
@ -1037,8 +1033,7 @@ bool MonsterWalk(Monster &monster)
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (monster.lightId != NO_LIGHT) |
|
|
|
|
SyncLightPosition(monster); |
|
|
|
|
SyncLightPosition(monster); |
|
|
|
|
|
|
|
|
|
return isAnimationEnd; |
|
|
|
|
} |
|
|
|
|
@ -3748,6 +3743,7 @@ void M_GetKnockback(Monster &monster)
|
|
|
|
|
M_ClearSquares(monster); |
|
|
|
|
monster.position.old += dir; |
|
|
|
|
StartMonsterGotHit(monster); |
|
|
|
|
ChangeLightXY(monster.lightId, monster.position.tile); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void M_StartHit(Monster &monster, int dam) |
|
|
|
|
|