View Issue Details

IDProjectCategoryView StatusLast Update
0000956Spring engineGeneralpublic2008-06-19 22:00
Reporterzenzike Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.76b1+svn 
Summary0000956: GetUnitHealth always returns 0
DescriptionWhen RAI is playing against another AI, the GetUnitHealth() call always returns 0. I think this is because there is a problem with unit->losStatus[allyTeam], presumably there is a problem with AIs and ally teams?

To reproduce, simply create a game with RAI vs any other AI (including itself), and watch the RAI log file.

TagsNo tags attached.
Checked infolog.txt for Errors

Activities

Kloot

2008-06-17 17:32

developer   ~0002337

Last edited: 2008-06-17 17:32

Seems to return 0 only when called inside EnemyEnterLOS() (the losStatus check indeed fails in that particular case). Probably related to the recent changes to CUnit::CalcLosStatus() et all.

Kloot

2008-06-17 17:39

developer   ~0002338

Should be fixed now, r6039.

zenzike

2008-06-18 19:23

reporter   ~0002346

Why is the final line:
losStatus[at] &= newStatus;
rather than
losStatus[at] = newStatus;

I haven't looked deep into how losStatus works, but shouldn't the value of losStatus beceme the newStatus?

zenzike

2008-06-18 19:31

reporter   ~0002347

Oh, what's the difference between "closed" and "resolved" in mantis too? Will you see my message if it's a closed bug?

LordMatt

2008-06-19 22:00

reporter   ~0002354

Yes

Issue History

Date Modified Username Field Change
2008-06-17 14:36 zenzike New Issue
2008-06-17 17:03 Kloot Status new => assigned
2008-06-17 17:03 Kloot Assigned To => Kloot
2008-06-17 17:32 Kloot Note Added: 0002337
2008-06-17 17:32 Kloot Note Edited: 0002337
2008-06-17 17:39 Kloot Note Added: 0002338
2008-06-17 17:39 Kloot Status assigned => resolved
2008-06-17 17:39 Kloot Resolution open => fixed
2008-06-18 19:23 zenzike Status resolved => closed
2008-06-18 19:23 zenzike Note Added: 0002346
2008-06-18 19:31 zenzike Status closed => feedback
2008-06-18 19:31 zenzike Resolution fixed => reopened
2008-06-18 19:31 zenzike Note Added: 0002347
2008-06-19 22:00 LordMatt Status feedback => resolved
2008-06-19 22:00 LordMatt Resolution reopened => fixed
2008-06-19 22:00 LordMatt Note Added: 0002354