X-Git-Url: http://git.localhorst.tv/?a=blobdiff_plain;f=src%2Fmap%2FMapState.cpp;h=b529e216541ac3894ee574bb4460cee4a8e06595;hb=a1c89e41e38eca790e168b8acd3beee974685fcd;hp=3be5a4592f5d16b636c3fb2d8a33d1df7a8277f6;hpb=7b70f3c1609fb2b783bd932280c98dbc44f5f746;p=l2e.git diff --git a/src/map/MapState.cpp b/src/map/MapState.cpp index 3be5a45..b529e21 100644 --- a/src/map/MapState.cpp +++ b/src/map/MapState.cpp @@ -77,6 +77,7 @@ void MapState::UpdateWorld(float deltaT) { } if (nextDirection >= 0) { if (afterLock) { + // FIXME: this check is unreliable, see #21 OnMove(); afterLock = false; } @@ -130,6 +131,15 @@ void MapState::OnGridLock() { void MapState::OnMove() { // TODO: evaluate monster movements + UpdateFollower(controlled); +} + +void MapState::UpdateFollower(Entity *e) { + if (!e->Follower()) return; + UpdateFollower(e->Follower()); + + e->Follower()->SetOrientation(e->GetOrientation()); + // TODO: set follower speed }