fp: Add debug visualisation for A*

This commit is contained in:
2023-09-23 17:19:36 +10:00
parent 38410073cf
commit 9106230079
4 changed files with 32 additions and 6 deletions
+1 -1
View File
@@ -605,9 +605,9 @@ void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_Renderer *renderer,
// NOTE: Stalk entity ======================================================================
Dqn_V2 entity_world_pos = FP_Game_CalcEntityWorldPos(game, entity->handle);
{
Dqn_Profiler_ZoneScopeWithIndex("FP_Update: Path finding", FP_ProfileZone_FPUpdate_PathFinding);
FP_GameEntity *stalk_entity = FP_Game_GetEntity(game, entity->stalk_entity);
if (stalk_entity->handle.id) {
Dqn_Profiler_ZoneScopeWithIndex("FP_Update: Path finding", FP_ProfileZone_FPUpdate_PathFinding);
Dqn_V2 stalk_world_pos = FP_Game_CalcEntityWorldPos(game, stalk_entity->handle);
Dqn_V2I stalk_tile = Dqn_V2I_InitNx2(stalk_world_pos.x / game->tile_size, stalk_world_pos.y / game->tile_size);
if (entity->stalk_entity_last_known_tile != stalk_tile) {