MegaGlest Forum

MegaGlest => Bug reports => Closed bug reports => Topic started by: Ishmaru on 3 December 2013, 15:08:48

Title: Attack Boost Stats are saved incorrectly
Post by: Ishmaru on 3 December 2013, 15:08:48
I noticed that when you save while a unit is receiving boosted stats, that boost is saved as the unit's base stats, so that when the game is reloaded those boosts become permanent, even once the unit leaves the boost radius. This also means that while that unit returns to the same boost radius, another boost is applied on top of the previous (now permanent) boost.

For Example:

Unit A Base Armor: 50

Unit A is in an Attack boost radius so: 50+50

Save game

When reloaded Unit A Base Armor: 100 (should be 50)

After saving, when Unit A is in the Attack boost radius: 100+50

When Unit A leaves boost radius armor returns to 100 (should return back to 50)

Unit A now permanently have more armor than it should.

Extra Computer Info:

Laptop Windows 7, 8 gigs ram, Nvidia Geforce card,  Intel I7
Title: Re: Attack Boost Stats are saved incorrectly
Post by: titi on 5 December 2013, 00:10:17
Established! This can be reproduced very good withthe prax mod. Once you start up a normal game, workers in range of the priest have a speed upgrade. Look at the workers walk speed, its 190+75.
Now save this game state and load the game again. The result is you get a worker with a move skill of 190+150. If the priest is in range ( which was the case when you saved the game)  it's 190+150. Let the priest walk out of range and the worker shows 190+75 permanent now.
Title: Re: Attack Boost Stats are saved incorrectly
Post by: softcoder on 23 December 2013, 00:10:44
This should be fixed as of this git txn: https://github.com/MegaGlest/megaglest-source/commit/da3c55c00b5b4503d6e431a424a219bf9cf308ac (https://github.com/MegaGlest/megaglest-source/commit/da3c55c00b5b4503d6e431a424a219bf9cf308ac)