- Timestamp:
- Jun 30, 2006, 2:35:50 AM (18 years ago)
- Location:
- branches/single_player_map/src/world_entities
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/single_player_map/src/world_entities/creatures/fps_player.cc
r8900 r8939 90 90 this->setHealth(80); 91 91 92 this->fallVelocity = 0.0f; 92 93 93 94 this->cameraNode.setParent(this); … … 251 252 } 252 253 254 // physical falling of the player 255 256 257 // this->fallVelocity += 10.0f * time + this->fallVelocity; 258 259 253 260 velocity *= 100; 254 261 255 262 this->shiftCoor( velocity*time ); 263 264 265 256 266 257 267 -
branches/single_player_map/src/world_entities/creatures/fps_player.h
r8731 r8939 51 51 52 52 PNode cameraNode; 53 54 float fallVelocity; //!< velocity for falling down 53 55 }; 54 56 -
branches/single_player_map/src/world_entities/world_entity.h
r8894 r8939 94 94 CollisionHandle* getCollisionHandle(CREngine::CRType type) const { return this->collisionHandles[type]; } 95 95 96 /** @returns true if this entity is standing on ground (BSP model) */ 97 bool isOnGround() const { return this->isOnGround(); } 98 /** @param flag: marks if this entity is standing on ground */ 99 void setOnGround(bool flag) { this->bOnGround = flag; } 100 96 101 virtual void hit(float damage); 97 102 virtual void destroy(); … … 117 122 118 123 void hide() { if( this->objectListNumber != OM_DEAD) this->lastObjectListNumber = this->objectListNumber; this->toList(OM_DEAD); } 119 void unhide() { this->toList(this->lastObjectListNumber); }124 void unhide() { if( this->objectListNumber != this->lastObjectListNumber) this->toList(this->lastObjectListNumber); } 120 125 121 126 … … 194 199 195 200 PhysicsInterface physicsInterface; //!< the physics object of the WorldEntity 196 201 bool bOnGround; //!< true if this entity is standing on the ground 197 202 198 203 protected:
Note: See TracChangeset
for help on using the changeset viewer.