View Issue Details

IDProjectCategoryView StatusLast Update
0001018Spring engineGeneralpublic2008-08-23 03:04
Reporterimbaczek Assigned ToKloot  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
Product Version0.76b1+svn 
Summary0001018: CGlobalAITestScript gets executed as a default script
Descriptionsee summary
Additional Informationprobably wrong player gets assigned as team leader.
TagsNo tags attached.
Checked infolog.txt for Errors

Activities

imbaczek

2008-08-22 18:05

reporter   ~0002482

Last edited: 2008-08-22 18:32

this code is the reason (Game.cpp:4757)

luaParser.AddInt("leader", team->leader);

what does this code do, anyway?

edit: bad lead... teamStartingData has good data, but gs->Team hasn't; ReColorTeams has nothing to do with that, obviously.

imbaczek

2008-08-22 19:18

reporter   ~0002483

turns out leaders got reset by CGlobalAITestScript, in a game without any AIs. Go figure. This would explain several things, like commanders walking on their own in multiplayer tests and AI lines in infologs.

Kloot

2008-08-22 19:41

developer   ~0002484

Last edited: 2008-08-22 19:55

I added those lines to the CGlobalAITestScript constructor, wasn't aware it's actually always called (CScriptHandler::LoadScripts() instantiates one for every lib found in AI/Bot-libs/ regardless of the active script type). That's bad design IMO, it should really be on-demand.

imbaczek

2008-08-22 19:52

reporter   ~0002485

Last edited: 2008-08-22 19:54

added if(gameSetup) around that for now, it looks like it fixes the issue, but it's a hack. a proper fix is welcome.

edit: actually, this will still break stuff ran without gameSetup, but it's arguably not that important... still, multiplayer is fixed for now.

Kloot

2008-08-23 03:03

developer   ~0002499

I'll hold off on a clean fix until b2 considering all the other issues, marking this as resolved for the time being.

Issue History

Date Modified Username Field Change
2008-08-22 17:43 imbaczek New Issue
2008-08-22 17:45 imbaczek Additional Information Updated
2008-08-22 18:05 imbaczek Note Added: 0002482
2008-08-22 18:32 imbaczek Note Edited: 0002482
2008-08-22 19:18 imbaczek Note Added: 0002483
2008-08-22 19:18 imbaczek Severity minor => major
2008-08-22 19:18 imbaczek Summary share box lists all team player names as host's => CGlobalAITestScript gets executed as a default script
2008-08-22 19:41 Kloot Note Added: 0002484
2008-08-22 19:42 Kloot Note Edited: 0002484
2008-08-22 19:52 imbaczek Note Added: 0002485
2008-08-22 19:54 imbaczek Note Edited: 0002485
2008-08-22 19:55 Kloot Note Edited: 0002484
2008-08-23 03:03 Kloot Note Added: 0002499
2008-08-23 03:04 Kloot Status new => resolved
2008-08-23 03:04 Kloot Resolution open => fixed
2008-08-23 03:04 Kloot Assigned To => Kloot