View Issue Details

IDProjectCategoryView StatusLast Update
0003678Spring engineLuapublic2013-08-17 04:17
Reportersilentwings Assigned ToKloot  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version94.1 
Fixed in Version94.1.1+git 
Summary0003678: AllowStartPosition(x,y,z,pID) and y=Spring.GetGroundHeight(x,z) return different y values
DescriptionTry placing a startpoint on a cliff or steep slope. The y value returned by AllowStartPosition(x,y,z) will be different to the y value returned from y=Spring.GetGroundHeight(x,z).

On flat ground/shallow slopes it works fine so I guess this is a error somewhere in rounding the x & z coords.

Note: About http://springrts.com/mantis/view.php?id=3665; When the startpoint is being chosen by the engine (i.e. if the player/AI didn't place) the y value from AllowStartPosition is (usually) -500. Please **don't change this** because it's the only way I've got that finds out it if the engine or the player placed this particular start point.
Steps To ReproduceYou can use this gadget to test. I was on DeltaSiegeX with BA7.75+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
TagsNo tags attached.
Checked infolog.txt for Errors

Relationships

duplicate of 0003737 resolvedKloot AllowStartPosition returns the wrong height 

Activities

Kloot

2013-08-16 21:57

developer   ~0011319

Unless you mean there is a difference even when selecting a point *inside* the startbox, this is caused by the point's xz-coordinates being clamped to the box bounds before AllowStartPosition receives them.

silentwings

2013-08-17 02:17

reporter   ~0011320

Last edited: 2013-08-17 02:18

I did mean that there was a difference in the y value of the height, when the startpoint is placed within the bounds of the startbox!

It's most noticeable on slopes & its small enough to look like a rounding issue.

But since you fixed my other mantis (and tyvm) I don't need this anymore ;)

Kloot

2013-08-17 04:17

developer   ~0011321

mkay, anything that saves work is fine with me

Issue History

Date Modified Username Field Change
2013-04-06 11:54 silentwings New Issue
2013-08-16 21:47 Kloot Relationship added duplicate of 0003737
2013-08-16 21:57 Kloot Note Added: 0011319
2013-08-16 21:57 Kloot Status new => resolved
2013-08-16 21:57 Kloot Fixed in Version => 94.1.1+git
2013-08-16 21:57 Kloot Resolution open => fixed
2013-08-16 21:57 Kloot Assigned To => Kloot
2013-08-17 02:17 silentwings Note Added: 0011320
2013-08-17 02:17 silentwings Status resolved => feedback
2013-08-17 02:17 silentwings Resolution fixed => reopened
2013-08-17 02:18 silentwings Note Edited: 0011320
2013-08-17 04:17 Kloot Note Added: 0011321
2013-08-17 04:17 Kloot Status feedback => resolved
2013-08-17 04:17 Kloot Resolution reopened => fixed