fp: Orient sprite in direction of velocity

This commit is contained in:
2023-09-27 00:09:14 +10:00
parent a9fba6f01d
commit ffb2ec3ea3
2 changed files with 12 additions and 5 deletions
+2 -4
View File
@@ -345,11 +345,9 @@ static Dqn_V2 FP_Game_CalcEntityWorldPos(FP_Game const *game, FP_GameEntityHandl
if (!game)
return result;
for (FP_GameEntity const *entity = FP_Game_GetEntity(DQN_CAST(FP_Game *) game, handle);
entity != game->root_entity;
entity = entity->parent) {
FP_GameEntity const *first = FP_Game_GetEntity(DQN_CAST(FP_Game *) game, handle);
for (FP_GameEntity const *entity = first; entity != game->root_entity; entity = entity->parent)
result += entity->local_pos;
}
return result;
}