Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 27, 2009, 1:44:48 AM (16 years ago)
Author:
landauf
Message:

added bot-support for TeamBaseMatch (and some small fixes)

Location:
code/trunk/src/orxonox/objects/worldentities/pawns
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/worldentities/pawns/Pawn.h

    r3084 r3086  
    147147    class _OrxonoxExport PawnListener : virtual public OrxonoxClass
    148148    {
    149         friend class Pawn;
    150 
    151149        public:
    152150            PawnListener();
    153151            virtual ~PawnListener() {}
    154152
    155         protected:
    156153            virtual void destroyedPawn(Pawn* pawn) = 0;
    157154    };
  • code/trunk/src/orxonox/objects/worldentities/pawns/TeamBaseMatchBase.cc

    r3033 r3086  
    4848            gametype->addBase(this);
    4949        }
     50
     51        this->setRadarObjectShape(RadarViewable::Triangle);
    5052    }
    5153
     
    7072            case BaseState::uncontrolled:
    7173            default:
    72                 colour = ColourValue(0.5, 0.5, 0.7, 1.0);
     74                colour = ColourValue(0.5, 0.5, 0.5, 1.0);
    7375                break;
    7476        }
     
    8486            }
    8587        }
     88
     89        this->setRadarObjectColour(colour);
     90
     91        // Call this so bots stop shooting at the base after they converted it
     92        for (ObjectList<PawnListener>::iterator it = ObjectList<PawnListener>::begin(); it != ObjectList<PawnListener>::end(); ++it)
     93            it->destroyedPawn(this);
    8694    }
    8795}
Note: See TracChangeset for help on using the changeset viewer.