View Issue Details

IDProjectCategoryView StatusLast Update
0001604Spring engineGeneralpublic2009-10-30 13:02
Reporterabma Assigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.80.2.0 
Summary0001604: Map.getResourceMapSpotsPositions returns wrong values for y (=evelation)
DescriptionMap.getResourceMapSpotsPositions (Java-AI-Interface) returns descending values for the y values (for ex. 2699.2, 2508.6685, 2476.913, 2286.381, 2212.2856... )
but if i manual check for the evelation at x,z i get different values: -121.829254, 226.12836, 55.915802, -92.96268 ...

0001017:0002500 is somewhere in the air... :)

i had problems when i calculated the distance to a resource point, but this fixed the pos of the resource point:

pos.y=map.getElevationAt(pos.x, pos.z);

TagsNo tags attached.
Checked infolog.txt for Errors

Activities

abma

2009-08-29 04:11

administrator   ~0004015

rts/Sim/Misc/ResourceMapAnalyzer.cpp:422

// gets the actual amount of resource an extractor can make
const CResource* resource = resourceHandler->GetResource(ResourceId);
BufferSpot.y = TempResources * (resource->maxWorth) * MaxResource / 255;


It's not a bug, it's a feature... (but uncommented... :-/)

I don't know what to do... :)

imbaczek

2009-08-29 15:20

reporter   ~0004017

fix documentation ^^

hoijui

2009-08-29 16:08

reporter   ~0004018

yeah, the documentation is in the header of this file for engine devs, and for AI devs (including the java interface), it is in rts/ExternalAI/Interface/SSkirmishAICallback.h

I have quite some AI devs complaining because of the resource spot locater already anyway. and wil have to rework it.. will probably use the one from Errors AI.

The one currently used is from Krogothe/Kloot.. i had no idea that it uses the y value for this ;-)

Docu is updated, just not committed yet (have a pit of a commit mess currently).

Kloot

2009-08-29 16:49

developer   ~0004019

This is why people should just write their own finders, everyone always has something to complain. ;)

hoijui

2009-10-30 13:02

reporter   ~0004278

Documentation fixed, workaround to get the z value given by abma:
pos.y=map.getElevationAt(pos.x, pos.z);

Issue History

Date Modified Username Field Change
2009-08-29 03:27 abma New Issue
2009-08-29 04:11 abma Note Added: 0004015
2009-08-29 15:20 imbaczek Note Added: 0004017
2009-08-29 16:08 hoijui Note Added: 0004018
2009-08-29 16:49 Kloot Note Added: 0004019
2009-10-30 13:02 hoijui Note Added: 0004278
2009-10-30 13:02 hoijui Status new => closed
2009-10-30 13:02 hoijui Resolution open => fixed