mirror of
https://github.com/devZoGok/PlanetFleet.git
synced 2026-08-26 19:43:29 +00:00
unit health is no longer affected when unpausing during debug mode
This commit is contained in:
@@ -322,9 +322,11 @@ namespace battleship{
|
||||
vector<int> currTechs = player->getTechnologies();
|
||||
|
||||
string name = unitTable["name"];
|
||||
health = unitTable["health"]; health += game->calcAbilFromTech(Ability::Type::HEALTH, currTechs, (int)GameObject::type, id);
|
||||
vehicle = unitTable["isVehicle"];
|
||||
maxHealth = health;
|
||||
health += game->calcAbilFromTech(Ability::Type::HEALTH, currTechs, (int)GameObject::type, id);
|
||||
maxHealth = unitTable["health"];
|
||||
|
||||
if(health == 0) health = maxHealth;
|
||||
|
||||
lineOfSight = unitTable["lineOfSight"]; lineOfSight += game->calcAbilFromTech(Ability::Type::LINE_OF_SIGHT, currTechs, (int)GameObject::type, id);
|
||||
unitClass = (UnitClass)unitTable["unitClass"];
|
||||
|
||||
@@ -176,7 +176,7 @@ namespace battleship{
|
||||
UnitType type;
|
||||
std::vector<Order> orders;
|
||||
std::string guiScreen = "";
|
||||
int health, maxHealth, playerId, lenHpBar = 200;
|
||||
int health = 0, maxHealth, playerId, lenHpBar = 200;
|
||||
vb01::s64 orderLineDispTime = 0, lastFireTime = 0;
|
||||
float lineOfSight;
|
||||
std::vector<Armor> armorTypes;
|
||||
|
||||
Reference in New Issue
Block a user