[Bug 3325] New: Auto load of bots in skirmish fails if unknown bot name

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Thu Aug 23 05:24:25 EDT 2007


http://bugzilla.icculus.org/show_bug.cgi?id=3325

           Summary: Auto load of bots in skirmish fails if unknown bot name
           Product: Quake 3
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P3
         Component: Misc
        AssignedTo: zakk at icculus.org
        ReportedBy: info at dbwatersports.com
         QAContact: quake3-bugzilla at icculus.org


If you are starting a skirmish and select a map that has bots names that are
not known to the system, no bots are selected. The number of bots that should
be in the skirmish (based upon the map) is shown, but no bots are in the list.
This forces the user to manually select a bot for each slot. 

This is in the function ServerOptions_InitBotNames in q3_ui/ui_startserver.c.
At (or around) line 1095, there is a call to UI_GetBotInfoByName. My
recommendation is that if the call fails to return a valid bot, make a call to
GetBotInfoByNumber, this will remap the unknown bot names to the names that are
currently known by the system (if any). I added a Com_Printf to print a message
so that the console shows that the remapping occurred. 

I guess this could be considered an enhancement instead of a defect, but I
wasn't sure. Anyway, the code...

q3_ui/ui_startserver.c lines 1095-1096

botInfo = UI_GetBotInfoByName( bot );
bot = Info_ValueForKey( botInfo, "name" );

Proposed change (lines 1095-1099):

botInfo = UI_GetBotInfoByName( bot );
if( !botInfo ) {
  Com_Printf("Remapping Unknown Bot. Name: %s...\n", bot );
  botInfo = UI_GetBotInfoByNumber( count );
}


-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the quake3-bugzilla mailing list