structures work only once complete

research structures research when they have min 30% HP
This commit is contained in:
devZoGok
2024-02-25 16:46:52 +02:00
parent bce93977bd
commit 43ccac92d4
6 changed files with 23 additions and 3 deletions
+2
View File
@@ -8,6 +8,8 @@ namespace battleship{
}
void PointDefense::attack(Order order){
if(!isComplete()) return;
Unit *targUnit = order.targets[0].unit;
Vector3 targDir = (targUnit ? targUnit->getPos() : order.targets[0].pos) - pos;