View Issue Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
---|---|---|---|---|---|---|---|---|---|
0001018 | Spring engine | General | public | 2008-08-22 17:43 | 2008-08-23 03:04 | ||||
Reporter | imbaczek | ||||||||
Assigned To | Kloot | ||||||||
Priority | normal | Severity | major | Reproducibility | always | ||||
Status | resolved | Resolution | fixed | ||||||
Product Version | 0.76b1+svn | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0001018: CGlobalAITestScript gets executed as a default script | ||||||||
Description | see summary | ||||||||
Additional Information | probably wrong player gets assigned as team leader. | ||||||||
Tags | No tags attached. | ||||||||
Checked infolog.txt for Errors | |||||||||
Attached Files |
|
Notes | |
imbaczek (reporter) 2008-08-22 18:05 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 (reporter) 2008-08-22 19:18 |
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 (developer) 2008-08-22 19:41 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 (reporter) 2008-08-22 19:52 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 (developer) 2008-08-23 03:03 |
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 |