Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3056 for code/trunk/src


Ignore:
Timestamp:
May 25, 2009, 1:56:53 PM (16 years ago)
Author:
Aurelian
Message:

Bug in gametype Asteroids fixed: game ends directly after death

Location:
code/trunk/src/orxonox/objects/gametypes
Files:
2 edited

Legend:

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

    r3033 r3056  
    4444        RegisterObject(Asteroids);
    4545        this->firstCheckpointReached_ = false;
    46         this->firstTimeSpawned_ = false;
    4746    }
    4847
     
    6261    }
    6362
    64     void Asteroids::spawnPlayer(PlayerInfo* player)
     63    void Asteroids::pawnKilled(Pawn* victim, Pawn* killer)
    6564    {
    66         if (this->timerIsActive_ && this->firstTimeSpawned_)
     65        if (victim && victim->getPlayer())
    6766        {
    6867            this->end();
    69             return;
    7068        }
    71 
    72         this->firstTimeSpawned_ = true;
    73         Gametype::spawnPlayer(player);
    7469    }
    7570
  • code/trunk/src/orxonox/objects/gametypes/Asteroids.h

    r3033 r3056  
    5151
    5252        protected:
    53             virtual void spawnPlayer(PlayerInfo* player);
     53            virtual void pawnKilled(Pawn* victim, Pawn* killer = 0);
    5454
    5555        private:
    5656            bool firstCheckpointReached_;
    5757            bool gameEnded_;
    58             bool firstTimeSpawned_;
    59 
    6058    };
    6159}
Note: See TracChangeset for help on using the changeset viewer.