Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7085 in orxonox.OLD for trunk/src/world_entities


Ignore:
Timestamp:
Feb 7, 2006, 4:51:47 PM (18 years ago)
Author:
patrick
Message:

trunk: entity is reset now after death

Location:
trunk/src/world_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r7082 r7085  
    148148    State::getGameRules()->onPlayerSpawn();
    149149
     150  this->reset();
     151
    150152  if( this->getOwner() % 2 == 0)
    151153  {
     
    157159  {
    158160    this->toList(OM_GROUP_01);
    159     this->toList(OM_GROUP_01);
    160161    this->setAbsCoor(-314.450, 40.701, 83.554);
     162    this->setAbsDir(Quaternion(0.0, 0.0, 0.0));
    161163  }
    162164}
  • trunk/src/world_entities/space_ships/space_ship.cc

    r7056 r7085  
    257257}
    258258
     259
     260void SpaceShip::reset()
     261{
     262  bUp = bDown = bLeft = bRight = bAscend = bDescend = bRollL = bRollR = false;
     263
     264  xMouse = yMouse = 0;
     265
     266  this->setHealth(80);
     267  this->velocity = Vector(0.0, 0.0, 0.0);
     268}
    259269
    260270
  • trunk/src/world_entities/space_ships/space_ship.h

    r7056 r7085  
    3232    virtual void leave();
    3333
     34    virtual void reset();
     35
    3436    virtual void postSpawn();
    3537    virtual void leftWorld();
     
    4345    virtual int       writeBytes(const byte* data, int length, int sender);
    4446    virtual int       readBytes(byte* data, int maxLength, int * reciever);
     47
    4548
    4649  private:
  • trunk/src/world_entities/world_entity.cc

    r7068 r7085  
    291291
    292292/**
     293 * resets the WorldEntity to its initial values. eg. used for multiplayer games: respawning
     294 */
     295void WorldEntity::reset()
     296{}
     297
     298/**
    293299 *  this method is called every frame
    294300 * @param time: the time in seconds that has passed since the last tick
  • trunk/src/world_entities/world_entity.h

    r7076 r7085  
    5151  inline bool isVisible() const { return this->bVisible; };
    5252
    53 
     53  virtual void reset();
    5454
    5555  virtual void postSpawn ();
Note: See TracChangeset for help on using the changeset viewer.