Skip to content

Commit

Permalink
Reset constructor upgrade between games.
Browse files Browse the repository at this point in the history
If starting a T3 game, leaving the game, and joining a T1 game, the player would have an 18% construction speed advantage over the other players.

Changelog: Fix construction speed upgrades being preserved even between games.
  • Loading branch information
Cyp committed Jan 17, 2011
1 parent 61a79c7 commit 9a28d84
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/stats.c
Expand Up @@ -163,11 +163,12 @@ void statsInitVars(void)
numSpecialAbility = 0;

//initialise the upgrade structures
memset(asWeaponUpgrade, 0, MAX_PLAYERS * WSC_NUM_WEAPON_SUBCLASSES * sizeof(WEAPON_UPGRADE));
memset(asSensorUpgrade, 0, MAX_PLAYERS * sizeof(SENSOR_UPGRADE));
memset(asECMUpgrade, 0, MAX_PLAYERS * sizeof(ECM_UPGRADE));
memset(asRepairUpgrade, 0, MAX_PLAYERS * sizeof(REPAIR_UPGRADE));
memset(asBodyUpgrade, 0, MAX_PLAYERS * sizeof(BODY_UPGRADE) * BODY_TYPE);
memset(asWeaponUpgrade, 0, sizeof(asWeaponUpgrade));
memset(asSensorUpgrade, 0, sizeof(asSensorUpgrade));
memset(asECMUpgrade, 0, sizeof(asECMUpgrade));
memset(asRepairUpgrade, 0, sizeof(asRepairUpgrade));
memset(asConstUpgrade, 0, sizeof(asConstUpgrade));
memset(asBodyUpgrade, 0, sizeof(asBodyUpgrade));

// init the max values
maxComponentWeight = maxBodyArmour = maxBodyPower =
Expand Down

0 comments on commit 9a28d84

Please sign in to comment.