Browse Source

Fix monster light offset after walk animation ends

pull/6108/head
staphen 3 years ago committed by Anders Jenbo
parent
commit
874fa6b8d3
  1. 2
      Source/monster.cpp

2
Source/monster.cpp

@ -1016,7 +1016,7 @@ void SyncLightPosition(Monster &monster)
if (monster.lightId == NO_LIGHT)
return;
const WorldTileDisplacement offset = monster.position.CalculateWalkingOffset(monster.direction, monster.animInfo);
const WorldTileDisplacement offset = monster.isWalking() ? monster.position.CalculateWalkingOffset(monster.direction, monster.animInfo) : WorldTileDisplacement {};
ChangeLightOffset(monster.lightId, offset.screenToLight());
}

Loading…
Cancel
Save