CPU AI orients fort towards the closest spawnpoint

This commit is contained in:
devZoGok
2025-03-08 12:14:31 +02:00
parent 31aa7c44a6
commit 2e9873cb30
4 changed files with 54 additions and 17 deletions
+10 -2
View File
@@ -12,13 +12,13 @@ namespace battleship{
using namespace gameBase;
using namespace std;
Player::Player(int diff, int fac, int t, Vector3 col, bool cpuPl, Vector3 sp, string n) :
Player::Player(int diff, int fac, int t, Vector3 col, bool cpuPl, int sp, string n) :
difficulty(diff),
faction(fac),
team(t),
color(col),
cpuPlayer(cpuPl),
spawnPoint(sp),
spawnPointId(sp),
name("pl"),
refineds(30000),
trader(new Trader())
@@ -212,4 +212,12 @@ namespace battleship{
break;
}
}
void Player::build(int id, Vector3 pos, Quaternion rot, bool additionalOrder){
/*
Unit *buildStruct = GameObjectFactory::createUnit(this, id, pos, rot);
addUnit(buildStruct);
issueOrder(Order::TYPE::BUILD, vector<Order::Target>{Order::Target(buildStruct)}, additionalOrder);
*/
}
}