From 1e741d76b06bb6e772fc32f75124a328b35dfbe9 Mon Sep 17 00:00:00 2001 From: eduinvestor Date: Thu, 23 Apr 2020 13:29:09 +0200 Subject: [PATCH] Revert "fix same bug again......" This reverts commit 038d0f774ead346bd95e1891b07a6a05cc7c420b. --- FalloutStrategy/Motor2D/Motor2D.vcxproj | 2 +- FalloutStrategy/Motor2D/StaticEntity.cpp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/FalloutStrategy/Motor2D/Motor2D.vcxproj b/FalloutStrategy/Motor2D/Motor2D.vcxproj index ad513816..ac813835 100644 --- a/FalloutStrategy/Motor2D/Motor2D.vcxproj +++ b/FalloutStrategy/Motor2D/Motor2D.vcxproj @@ -14,7 +14,7 @@ {2AF9969B-F202-497B-AF30-7BEF9CE8005E} programacio_2 Fallout_Strategy - 10.0 + 10.0.18362.0 diff --git a/FalloutStrategy/Motor2D/StaticEntity.cpp b/FalloutStrategy/Motor2D/StaticEntity.cpp index de28bee7..973d975f 100644 --- a/FalloutStrategy/Motor2D/StaticEntity.cpp +++ b/FalloutStrategy/Motor2D/StaticEntity.cpp @@ -400,6 +400,8 @@ void StaticEntity::ExecuteUpgrade(Faction faction, Upgrades upgrade_name) { App->player->UpdateResourceData(Resource::CAPS, -cost); LOG("Resource Limit Upgraded. New limit is: %i", storage_capacity); + + base_resource_limit[faction].upgrade_num++; } } } @@ -415,6 +417,8 @@ void StaticEntity::ExecuteUpgrade(Faction faction, Upgrades upgrade_name) { //Pay the price App->player->UpdateResourceData(Resource::CAPS, -cost); LOG("Gatherer Resource Limit Upgraded"); + + gatherer_resource_limit[faction].upgrade_num++; } } else if (upgrade_name == UNITS_DAMAGE) { @@ -429,6 +433,8 @@ void StaticEntity::ExecuteUpgrade(Faction faction, Upgrades upgrade_name) { //Pay the price App->player->UpdateResourceData(Resource::CAPS, -cost); LOG("Units Damage Upgraded"); + + units_damage[faction].upgrade_num++; } } else if (upgrade_name == UNITS_SPEED) { @@ -444,6 +450,8 @@ void StaticEntity::ExecuteUpgrade(Faction faction, Upgrades upgrade_name) { //Pay the price App->player->UpdateResourceData(Resource::CAPS, -cost); LOG("Units Speed Upgraded"); + + units_speed[faction].upgrade_num++; } } else if (upgrade_name == UNITS_HEALTH) { @@ -457,6 +465,7 @@ void StaticEntity::ExecuteUpgrade(Faction faction, Upgrades upgrade_name) { App->entities->entities[i]->current_health += (int)(App->entities->entities[i]->max_health * 0.15); } } + units_health[faction].upgrade_num++; } } else if (upgrade_name == CREATION_TIME) { @@ -469,6 +478,7 @@ void StaticEntity::ExecuteUpgrade(Faction faction, Upgrades upgrade_name) { App->entities->unit_data[i][j].spawn_seconds -= App->entities->unit_data[i][j].spawn_seconds * 0.05; } } + units_creation_time[faction].upgrade_num++; } } }