~ubuntu-branches/ubuntu/precise/openarena/precise

« back to all changes in this revision

Viewing changes to code/game/ai_main.c

  • Committer: Bazaar Package Importer
  • Author(s): Ansgar Burchardt
  • Date: 2008-09-05 21:14:51 UTC
  • mfrom: (1.2.1 upstream) (2.1.5 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080905211451-243bmbl6l6gdav7l
* Remove non-free code/tools/lcc (Closes: #496346)
  + Remove hunk from patch 10_fix_build_and_binary_on_alpha
  + debian/rules: Add BUILD_GAME_QVM=0 to $(MAKE) call
    (thanks to Peter De Wachter)
* Remove code/libs containing binary libraries for Mac OS X and Win32
* debian/copyright: Explain which parts of upstream's sources were removed
* debian/rules: replace ${source:Upstream-Version} by 0.7.7
  because the variable also contains the `+dfsg1' part
* Add -fsigned-char to compiler options (Closes: #487970)
  (thanks to Peter De Wachter)
* Add myself to Uploaders
* debian/control: Remove article from beginning of short description,
  don't start short description with a capital letter
* debian/openarena.6: Escape minus signs
  + fixes lintian warnings: hyphen-used-as-minus-sign

Show diffs side-by-side

added added

removed removed

Lines of Context:
99
99
        va_list ap;
100
100
 
101
101
        va_start(ap, fmt);
102
 
        vsprintf(str, fmt, ap);
 
102
        Q_vsnprintf(str, sizeof(str), fmt, ap);
103
103
        va_end(ap);
104
104
 
105
105
        switch(type) {
285
285
        else leader = " ";
286
286
 
287
287
        strcpy(flagstatus, "  ");
288
 
        if (gametype == GT_CTF) {
 
288
        if (gametype == GT_CTF || gametype == GT_CTF_ELIMINATION) {
289
289
                if (BotCTFCarryingFlag(bs)) {
290
290
                        if (BotTeam(bs) == TEAM_RED) strcpy(flagstatus, S_COLOR_RED"F ");
291
291
                        else strcpy(flagstatus, S_COLOR_BLUE"F ");
373
373
                        BotAI_Print(PRT_MESSAGE, "%-20s%s%s: harvesting\n", netname, leader, flagstatus);
374
374
                        break;
375
375
                }
 
376
                case LTG_POINTA:
 
377
                {
 
378
                        BotAI_Print(PRT_MESSAGE, "%-20s%s%s: going for point A\n", netname, leader, flagstatus);
 
379
                        break;
 
380
                }
 
381
                case LTG_POINTB:
 
382
                {
 
383
                        BotAI_Print(PRT_MESSAGE, "%-20s%s%s: going for point B\n", netname, leader, flagstatus);
 
384
                        break;
 
385
                }
376
386
                default:
377
387
                {
378
388
                        BotAI_Print(PRT_MESSAGE, "%-20s%s%s: roaming\n", netname, leader, flagstatus);
435
445
        else leader = " ";
436
446
 
437
447
        strcpy(carrying, "  ");
438
 
        if (gametype == GT_CTF) {
 
448
        if (gametype == GT_CTF || gametype == GT_CTF_ELIMINATION) {
439
449
                if (BotCTFCarryingFlag(bs)) {
440
450
                        strcpy(carrying, "F ");
441
451
                }
521
531
                        Com_sprintf(action, sizeof(action), "harvesting");
522
532
                        break;
523
533
                }
 
534
                case LTG_POINTA:
 
535
                {
 
536
                        Com_sprintf(action, sizeof(action), "going for point A");
 
537
                        break;
 
538
                }
 
539
                case LTG_POINTB:
 
540
                {
 
541
                        Com_sprintf(action, sizeof(action), "going for point B");
 
542
                        break;
 
543
                }
524
544
                default:
525
545
                {
526
546
                        trap_BotGetTopGoal(bs->gs, &goal);
1626
1646
        //game directory
1627
1647
        trap_Cvar_VariableStringBuffer("fs_game", buf, sizeof(buf));
1628
1648
        if (strlen(buf)) trap_BotLibVarSet("gamedir", buf);
1629
 
        //cd directory
1630
 
        trap_Cvar_VariableStringBuffer("fs_cdpath", buf, sizeof(buf));
1631
 
        if (strlen(buf)) trap_BotLibVarSet("cddir", buf);
1632
1649
        //home directory
1633
1650
        trap_Cvar_VariableStringBuffer("fs_homepath", buf, sizeof(buf));
1634
1651
        if (strlen(buf)) trap_BotLibVarSet("homedir", buf);