2025-07-20 13:11 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003226Spring engineGeneralpublic2012-07-30 12:42
Reportergajop 
Assigned ToKloot 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version89.0 
Target VersionFixed in Version89.0.1+git 
Summary0003226: Spring.SetFeaturePosition doesn't work
DescriptionIt simply does nothing for me, and I have a valid featureID.
I'm using the same code for moving units, via Spring.SetUnitPosition and that works ok, and as a workaround I'm currently destroying features and recreating new ones at different positions using Spring.CreateFeature.
Steps To ReproduceCreate a feature, and then set its positions using Spring.SetFeaturePosition to be different than those initially set.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • diff file icon Feature.cpp.diff (333 bytes) 2012-07-30 01:52 -
    405c405
    < 	Move3D(pos, false);
    ---
    > 	Move3D(newPos, false);
    411c411
    < 			finalHeight = ground->GetHeightAboveWater(pos.x, pos.z);
    ---
    > 			finalHeight = ground->GetHeightAboveWater(newPos.x, newPos.z);
    413c413
    < 			finalHeight = ground->GetHeightReal(pos.x, pos.z);
    ---
    > 			finalHeight = ground->GetHeightReal(newPos.x, newPos.z);
    
    diff file icon Feature.cpp.diff (333 bytes) 2012-07-30 01:52 +

-Relationships
+Relationships

-Notes

~0009093

gajop (developer)

Last edited: 2012-07-30 01:53

View 2 revisions

Bug's probably here:
https://github.com/spring/spring/blob/develop/rts/Sim/Features/Feature.cpp#L405
In comparison to what it should be like:
https://github.com/spring/spring/blob/develop/rts/Sim/Units/Unit.cpp#L553
However it seems those two ForcedMoves aren't supposed to behave the same way, but this is the patch I managed to create (Feature.cpp)

PS: the diff supplied was for a 89.0 clean, not the git one (can't be bothered to configure it on arch right now)

+Notes

-Issue History
Date Modified Username Field Change
2012-07-30 00:38 gajop New Issue
2012-07-30 01:52 gajop File Added: Feature.cpp.diff
2012-07-30 01:52 gajop Note Added: 0009093
2012-07-30 01:53 gajop Note Edited: 0009093 View Revisions
2012-07-30 12:42 Kloot Status new => resolved
2012-07-30 12:42 Kloot Fixed in Version => 89.0.1+git
2012-07-30 12:42 Kloot Resolution open => fixed
2012-07-30 12:42 Kloot Assigned To => Kloot
+Issue History