2025-07-20 19:13 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0003737Spring engineLuapublic2013-08-16 21:47
Reportersilentwings 
Assigned ToKloot 
PrioritynormalSeveritymajorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version94.1.1+git 
Target VersionFixed in Version 
Summary0003737: AllowStartPosition returns the wrong height
Descriptiongadget:AllowStartPosition(x,y,z) returns the y value of the height at the point where the mouse clicked, not the point where the startpoint was placed.

These can be different because if you click outside of a startbox spring auto-places the startpoint on the edge of the box.
Steps To ReproduceMake a startbox for yourself that doesn't cover the whole map. Use the gadget below. Try to place a startpoint for yourself outside of the startbox, on a point which is obviously different height to the nearest point to your startbox. Check output from gadget.

function gadget:AllowStartPosition(x,y,z,playerID)
    Spring.Echo(x,y,z)
    yh = Spring.GetGroundHeight(x,z)
    Spring.Echo(x,yh,z)
    return true
end

See screenshot from the output of doing exactly this.
Additional Information*Pleaaaase* make sure you don't change that when the engine auto-places a startpoint it places that startpoint with a y value of -500. This is the *only* way I have of telling if a startpoint was genuinely placed by a player (as opposed to, if the player failed to ready and engine did it).
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
related to 0003665resolvedKloot AllowStartPosition(x, y, z, playerID) can't tell whether it was player or engine placing the startpos 
has duplicate 0003678resolvedKloot AllowStartPosition(x,y,z,pID) and y=Spring.GetGroundHeight(x,z) return different y values 
+Relationships

-Notes

~0010542

silentwings (reporter)

Last edited: 2013-04-23 10:55

View 2 revisions

For screenshot, mouse was click just down the cliff from where startpoint is shown (mouse doesn't show on screenshot, lol).

This is basically the same bug as http://springrts.com/mantis/view.php?id=3678 except now I think I found the cause!

+Notes

-Issue History
Date Modified Username Field Change
2013-04-23 10:35 silentwings New Issue
2013-04-23 10:35 silentwings File Added: screen00021.png
2013-04-23 10:36 silentwings Note Added: 0010542
2013-04-23 10:55 silentwings Note Edited: 0010542 View Revisions
2013-08-10 15:29 Kloot Relationship added related to 0003665
2013-08-16 21:08 Kloot Changeset attached => spring develop 7050e21f
2013-08-16 21:08 Kloot Assigned To => Kloot
2013-08-16 21:08 Kloot Status new => resolved
2013-08-16 21:08 Kloot Resolution open => fixed
2013-08-16 21:47 Kloot Relationship added has duplicate 0003678
+Issue History