Skip to content

Commit

Permalink
Revert "fix same bug again......"
Browse files Browse the repository at this point in the history
This reverts commit 038d0f7.
  • Loading branch information
pablogalve committed Apr 23, 2020
1 parent 038d0f7 commit 1e741d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion FalloutStrategy/Motor2D/Motor2D.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<ProjectGuid>{2AF9969B-F202-497B-AF30-7BEF9CE8005E}</ProjectGuid>
<RootNamespace>programacio_2</RootNamespace>
<ProjectName>Fallout_Strategy</ProjectName>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<WindowsTargetPlatformVersion>10.0.18362.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
Expand Down
10 changes: 10 additions & 0 deletions FalloutStrategy/Motor2D/StaticEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
}
}
}
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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) {
Expand All @@ -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++;
}
}
}
Expand Down

0 comments on commit 1e741d7

Please sign in to comment.