Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 28, 2009, 9:05:56 PM (15 years ago)
Author:
landauf
Message:

Using a WeakPtr instead of a PawnListener-callback in UnderAttack to observe the Destroyer
HUDHealthBar also uses a WeakPtr now (before it displayed the health of already destroyed pawns)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/core5/src/orxonox/gametypes/UnderAttack.h

    r5738 r5826  
    3232#include "OrxonoxPrereqs.h"
    3333
    34 #include "interfaces/PawnListener.h"
    3534#include "TeamDeathmatch.h"
    3635
    3736namespace orxonox
    3837{
    39     class _OrxonoxExport UnderAttack : public TeamDeathmatch, public PawnListener
     38    class _OrxonoxExport UnderAttack : public TeamDeathmatch
    4039    {
    4140        public:
     
    5453
    5554        protected:
    56             virtual void destroyedPawn(Pawn* pawn);
     55            virtual void killedDestroyer();
    5756
    58             Destroyer* destroyer_;
     57            WeakPtr<Destroyer> destroyer_;
    5958            unsigned int teams_;
    6059            float gameTime_;
Note: See TracChangeset for help on using the changeset viewer.