2025-08-06 08:03 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003048Spring engineGeneralpublic2012-04-03 13:40
ReporterGoogle_Frog 
Assigned ToKloot 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version88.0 
Target VersionFixed in Version89.0 
Summary0003048: Lua'ed move speed modification is not kept
DescriptionIn previous versions Spring.MoveCtrl.SetGunshipMoveTypeData or Spring.MoveCtrl.SetGroundMoveTypeData only needed to be called once to modify a unit's maxSpeed. In 88.0 the maxSpeed is reset to the unit default maxSpeed about 5-15 frames after the speed modification.

The example code below should slow all ground units to 1. Instead in 88.0 unit speed jitters every 2 seconds because the unit speed is reduced by Spring.MoveCtrl.SetGroundMoveTypeData and subsequently reset to default by the engine.
Additional Informationfunction gadget:GameFrame(n)
  if n %60 == 0 then
    for _, unitID in ipairs(Spring.GetAllUnits()) do
      Spring.MoveCtrl.SetGroundMoveTypeData(unitID, {maxSpeed = 1})
    end
  end
end

(I know this crashes if structures, air or gunships exist, it is an example)
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes
There are no notes attached to this issue.
+Notes

-Issue History
Date Modified Username Field Change
2012-04-03 10:27 Google_Frog New Issue
2012-04-03 13:40 Kloot Status new => resolved
2012-04-03 13:40 Kloot Fixed in Version => 89.0
2012-04-03 13:40 Kloot Resolution open => fixed
2012-04-03 13:40 Kloot Assigned To => Kloot
+Issue History