My ground units can gain multipliers to upgrade their max speed. To do this, I set maxVelocity = 1000 in all of my unitdefs, and reset it manually to the unit's "real speed" * the current multiplier when a new unit gets created (with SetGroundMoveTypeData).
This worked fine in 85, but in 87, after a unit is issued a move command, the unit's speed gets reset to its maxVelocity (i.e. 30000). I only call SetGroundMoveTypeData in that one spot, and my call is not getting invoked unexpectedly.
Nothing jumped out at me in the changelog that might cause this. Anybody have any idea what might be going on? Or is there a better way to do what I want to do? Thanks!
Speed upgrade bug: unit speed gets reset to maxVelocity
Moderator: Moderators
Re: Speed upgrade bug: unit speed gets reset to maxVelocity
Yes, speed change via script is broken in Spring 87.
I have a gadget that perform Spring.UnitScript.SetUnitCOBValue(u,MAX_SPEED, ...
This change the unit speed only temporarily: As soon as I give the unit a new waypoint, then its max speed reset to the unitdef max speed.
Unlike what I've been previously told, the temporarily speed change is applied whether the modified speed is faster or slower than the unit def speed.
And either way, the speed change only remain till next order..
I have a gadget that perform Spring.UnitScript.SetUnitCOBValue(u,MAX_SPEED, ...
This change the unit speed only temporarily: As soon as I give the unit a new waypoint, then its max speed reset to the unitdef max speed.
Unlike what I've been previously told, the temporarily speed change is applied whether the modified speed is faster or slower than the unit def speed.
And either way, the speed change only remain till next order..
Re: Speed upgrade bug: unit speed gets reset to maxVelocity
Thanks! I'll see if I can throw a workaround in for now then.
Re: Speed upgrade bug: unit speed gets reset to maxVelocity
My findings are in contradiction with Google_Frog findings at:
http://springrts.com/mantis/view.php?id=2877
Maybe the bug behavior changed between 85 and 87?
And once again, I'm worried to see such tickets "closed", "no change", without even a word from engine devs.
http://springrts.com/mantis/view.php?id=2877
Maybe the bug behavior changed between 85 and 87?
And once again, I'm worried to see such tickets "closed", "no change", without even a word from engine devs.
- Deadnight Warrior
- Posts: 183
- Joined: 08 Jun 2009, 17:59
Re: Speed upgrade bug: unit speed gets reset to maxVelocity
When I initialy reported that bug I was not able to set unit's speed over the maxVelocity specified in UnitDefs.
So I had to make a workaround as Google_Frog suggested, it worked, till 87.0.
Now it behaves as zwzsg reported and my game is yet again broken due to inability to permanently change a unit's speed.
If someone want's to try it out get YAAG, all combat units are modular and one of the modules is engine power, which affects unit's top speed (not any more, but works in 85.0)
So I had to make a workaround as Google_Frog suggested, it worked, till 87.0.
Now it behaves as zwzsg reported and my game is yet again broken due to inability to permanently change a unit's speed.
If someone want's to try it out get YAAG, all combat units are modular and one of the modules is engine power, which affects unit's top speed (not any more, but works in 85.0)