Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Mar 26, 2013, 3:30:12 PM (11 years ago)
Author:
smerkli
Message:

Added a check when dying to find another pawn in the
same formation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/formationupdate/src/orxonox/worldentities/pawns/Pawn.cc

    r9555 r9583  
    4747#include "weaponsystem/WeaponSet.h"
    4848
     49#include "controllers/FormationController.h"
     50
    4951namespace orxonox
    5052{
     
    308310    void Pawn::death()
    309311    {
     312        /* TEST TEST This is used to find out if the current pawn is also
     313         * the master of the formulation.
     314         *
     315         * NOTE: This does not yet check if the current pawn is actually
     316         *       the humanplayer or not!
     317         */
     318        for (ObjectList<FormationController>::iterator it =
     319          ObjectList<FormationController>::begin();
     320          it != ObjectList<FormationController>::end(); ++it )
     321        {
     322          orxout(user_warning) << "Test! Master: " << it->getMaster()
     323            << " My controller: " << this->getPlayer()->getController() << endl;
     324        }
     325        /* TEST TEST */
     326
     327           
     328
     329
    310330        this->setHealth(1);
    311331        if (this->getGametype() && this->getGametype()->allowPawnDeath(this, this->lastHitOriginator_))
Note: See TracChangeset for help on using the changeset viewer.