Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 1772 for code/trunk


Ignore:
Timestamp:
Sep 11, 2008, 6:39:56 PM (16 years ago)
Author:
scheusso
Message:

fixed a bug in spaceship ai(segfault when client disconnects && client was target of spaceshipAI)

Location:
code/trunk/src/orxonox/objects
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/objects/SpaceShip.cc

    r1767 r1772  
    5353#include "ParticleProjectile.h"
    5454#include "GraphicsEngine.h"
     55#include "SpaceShipAI.h"
    5556
    5657namespace orxonox
     
    145146    SpaceShip::~SpaceShip()
    146147    {
     148        for (ObjectList<SpaceShipAI>::iterator it = ObjectList<SpaceShipAI>::begin(); it; ++it)
     149            it->shipDied(this);
     150     
    147151        if (this->isInitialized())
    148152        {
  • code/trunk/src/orxonox/objects/SpaceShipAI.cc

    r1755 r1772  
    7373    SpaceShipAI::~SpaceShipAI()
    7474    {
    75         for (ObjectList<SpaceShipAI>::iterator it = ObjectList<SpaceShipAI>::begin(); it; ++it)
    76             it->shipDied(this);
    7775    }
    7876
     
    315313    }
    316314
    317     void SpaceShipAI::shipDied(SpaceShipAI* ship)
     315    void SpaceShipAI::shipDied(SpaceShip* ship)
    318316    {
    319317        if (ship == this->target_)
  • code/trunk/src/orxonox/objects/SpaceShipAI.h

    r1747 r1772  
    5050            static void createEnemy(int num);
    5151            static void killEnemies(int num);
    52             void shipDied(SpaceShipAI* ship);
     52            void shipDied(SpaceShip* ship);
    5353            void damage(float damage);
    5454            void kill();
Note: See TracChangeset for help on using the changeset viewer.