mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
adjusted building implementation for freezers
This commit is contained in:
+6
-1
@@ -9,6 +9,7 @@
|
||||
#include "player.h"
|
||||
#include "fxManager.h"
|
||||
#include "destructable.h"
|
||||
#include "structure.h"
|
||||
#include "gameObjectFactory.h"
|
||||
#include "projectile.h"
|
||||
|
||||
@@ -212,7 +213,11 @@ namespace battleship{
|
||||
|
||||
switch(type){
|
||||
case Type::FREEZER:
|
||||
destr->setFreezeStatus(destr->getFreezeStatus() + 1);
|
||||
if(target->getType() == GameObject::Type::UNIT && ((Unit*)target)->getUnitClass() == UnitClass::ICE_SHEET)
|
||||
((Structure*)target)->incrementBuildStatus();
|
||||
else
|
||||
destr->setFreezeStatus(destr->getFreezeStatus() + 1);
|
||||
|
||||
break;
|
||||
default:
|
||||
destr->takeDamage(damage);
|
||||
|
||||
Reference in New Issue
Block a user