optimized CPU player spawn point occupation implementation

bugfix for navigating empty paths
This commit is contained in:
devZoGok
2026-03-15 15:21:11 +02:00
parent ee0dfaecde
commit 6669c1e8c2
6 changed files with 62 additions and 35 deletions
+1
View File
@@ -41,6 +41,7 @@ namespace battleship{
std::vector<GameObject*> getDestructables();
void updateGameStats(Unit*);
std::vector<Unit*> getFriendlyUnits(bool = true);
std::vector<Unit*> getHostileUnits();
bool isObjectVisible(GameObject*, std::vector<Unit*>);
inline int getResource(ResourceType rt){return resources[(int)rt];}
inline void updateResource(ResourceType rt, int amount, bool add){resources[(int)rt] = (add ? resources[(int)rt] + amount : amount);}