summary refs log tree commit diff stats
path: root/src/character_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/character_system.cpp')
-rw-r--r--src/character_system.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/character_system.cpp b/src/character_system.cpp index 94833a8..781b50d 100644 --- a/src/character_system.cpp +++ b/src/character_system.cpp
@@ -24,7 +24,11 @@ void CharacterSystem::addSpriteToParty(int leaderId, int followerId) {
24 targetPos = backFollower.loc; 24 targetPos = backFollower.loc;
25 } 25 }
26 26
27 Direction toFace = directionFacingPoint(targetPos - follower.loc); 27 Direction toFace = leader.dir;
28 if (targetPos != follower.loc) {
29 toFace = directionFacingPoint(targetPos - follower.loc);
30 }
31
28 for (int i=0; i<PARTY_FRAME_DELAY; i++) { 32 for (int i=0; i<PARTY_FRAME_DELAY; i++) {
29 vec2i tween = ((follower.loc - targetPos) * i) / static_cast<double>(PARTY_FRAME_DELAY) + targetPos; 33 vec2i tween = ((follower.loc - targetPos) * i) / static_cast<double>(PARTY_FRAME_DELAY) + targetPos;
30 follower.trail.push_front({.pos = tween, .dir = toFace}); 34 follower.trail.push_front({.pos = tween, .dir = toFace});