Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8862 in orxonox.OLD


Ignore:
Timestamp:
Jun 28, 2006, 3:28:08 PM (18 years ago)
Author:
patrick
Message:

safer hiding and anhiding function

Location:
branches/single_player_map/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/lib/collision_reaction/collision_event.h

    r8855 r8862  
    4444  inline Vector getCollisionPosition() { return this->position; }
    4545
     46  /** @return true if the entity is in the wall */
     47  inline bool isInWall() { return this->bInWall; }
     48
    4649
    4750 private:
  • branches/single_player_map/src/lib/collision_reaction/cr_physics_ground_walk.cc

    r8852 r8862  
    7171
    7272  float CR_MAX_WALK_HEIGHT = 2.0f;
     73  float CR_THRESHOLD = 0.2f;
    7374
    7475  if( box != NULL)
     
    8283
    8384    // object is beneath the plane (ground)
    84     if( height < 0.0f)
     85    if( height < 0.0f )
    8586    {
    86       entity->shiftCoor(Vector(0,-height,0));
     87      entity->shiftCoor(Vector(0, -height, 0));
    8788    }
     89    // object is already in the wall
     90    else if( ce->isInWall())
     91    {
     92
     93    }
     94
    8895
    8996
  • branches/single_player_map/src/world_entities/world_entity.h

    r8861 r8862  
    116116  ObjectManager::EntityList::iterator& getEntityIterator() { return this->objectListIterator; }
    117117
    118   void hide() { this->lastObjectListNumber = this->objectListNumber; this->toList(OM_DEAD); }
     118  void hide() { if( this->objectListNumber != OM_DEAD) this->lastObjectListNumber = this->objectListNumber; this->toList(OM_DEAD); }
    119119  void unhide() { this->toList(this->lastObjectListNumber); }
    120120
Note: See TracChangeset for help on using the changeset viewer.