Remove memory allocation in pathfinding
This commit is contained in:
@@ -138,7 +138,8 @@ void updatePlayerInput() {
|
||||
.target=target,
|
||||
.map=map,
|
||||
.outPath=&path,
|
||||
.pool=game->pools.pathData
|
||||
.pool=game->pools.pathData,
|
||||
.alloc=&game->stackAlloc
|
||||
});
|
||||
if (!path.paths) continue;
|
||||
ecs_set_ptr(ECS, entity, Path, &path);
|
||||
@@ -166,7 +167,8 @@ void updatePlayerInput() {
|
||||
.target=worldPos,
|
||||
.map=map,
|
||||
.outPath=&path,
|
||||
.pool=game->pools.pathData
|
||||
.pool=game->pools.pathData,
|
||||
.alloc=&game->stackAlloc
|
||||
});
|
||||
if (!path.paths) continue;
|
||||
ecs_set_ptr(ECS, entity, Path, &path);
|
||||
|
||||
Reference in New Issue
Block a user