Changeset 5482 in orxonox.OLD for trunk/src/world_entities
- Timestamp:
- Nov 3, 2005, 10:33:28 PM (19 years ago)
- Location:
- trunk/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/player.cc
r5453 r5482 286 286 if( this->bDown && this->getRelCoor().x > -5) 287 287 accel = accel -(direction*acceleration); 288 if( this->bLeft && TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2) 289 accel = accel - (orthDirection*acceleration); 290 if( this->bRight && TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2) 288 if( this->bLeft) 289 { 290 if( TrackManager::getInstance()->getWidth() > -this->getRelCoor().z*2) 291 accel = accel - (orthDirection*acceleration); 292 else 293 this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5); 294 } 295 if( this->bRight) 296 { 297 if (TrackManager::getInstance()->getWidth() > this->getRelCoor().z*2) 291 298 accel = accel + (orthDirection*acceleration); 299 else 300 this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5); 301 } 292 302 if( this->bAscend ) { /* FIXME */ } 293 303 if( this->bDescend) {/* FIXME */} /* @todo up and down player movement */ … … 319 329 this->bDown = event.bPressed; 320 330 else if( event.type == KeyMapper::PEV_RIGHT) 331 { 321 332 this->bRight= event.bPressed; 333 if (event.bPressed) 334 this->setRelDirSoft(Quaternion(.4, Vector(1,0,0)), 5); 335 else 336 this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5); 337 } 322 338 else if( event.type == KeyMapper::PEV_LEFT) 339 { 323 340 this->bLeft = event.bPressed; 341 if (event.bPressed) 342 this->setRelDirSoft(Quaternion(-.4, Vector(1,0,0)), 5); 343 else 344 this->setRelDirSoft(Quaternion(0, Vector(1,0,0)), 5); 345 } 324 346 else if( event.type == KeyMapper::PEV_FIRE1) 325 347 this->bFire = event.bPressed; -
trunk/src/world_entities/world_entity.cc
r5465 r5482 105 105 delete this->obbTree; 106 106 107 if (this->model )107 if (this->model != NULL) 108 108 { 109 109 PRINTF(4)("creating obb tree\n");
Note: See TracChangeset
for help on using the changeset viewer.