mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
Units validate orders before receiving them
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ namespace battleship{
|
||||
if(trainingStatus >= 100){
|
||||
Unit *unit = GameObjectFactory::createUnit(player, unitQueue[0], pos, rot);
|
||||
player->addUnit(unit);
|
||||
unit->setOrder(Order(Order::TYPE::MOVE, vector<Order::Target>{Order::Target(nullptr, pos + 30 * dirVec)}, Vector3::VEC_ZERO));
|
||||
unit->receiveOrder(Order(Order::TYPE::MOVE, vector<Order::Target>{Order::Target(nullptr, pos + 30 * dirVec)}, Vector3::VEC_ZERO), false);
|
||||
|
||||
unitQueue.erase(unitQueue.begin());
|
||||
trainingStatus = 0;
|
||||
|
||||
Reference in New Issue
Block a user