- Timestamp:
- Jun 20, 2007, 2:44:33 PM (18 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/npcs/actionbox_enemy.cc
r10727 r10734 257 257 void ActionboxEnemy::moveTowardsBox( ActionBox * box, float dt ) 258 258 { 259 260 259 Vector targetPos = box->getAbsCoor() + box->getAbsDir().apply( Vector( 1, 0, 0 ) )*box->getDepth()*0.66f; 261 260 Vector targetDir = targetPos - myCoor; 261 262 Vector boxDir = box->getAbsDir().apply( Vector(1, 0, 0 ) ); 263 float boxDist = boxDir.dot( targetDir ); 264 265 if ( boxDist > 0 ) 266 { 267 Vector myRelCoor = this->getAbsCoor() - box->getAbsCoor(); 268 float newDist = boxDir.dot( myRelCoor ); 269 targetPos = box->getAbsCoor() + box->getAbsDir().apply( Vector( 1, 0, 0 ) )* newDist * 0.8; 270 targetDir = targetPos - myCoor; 271 } 262 272 263 273 moveTowards(targetPos, targetDir, dt); -
branches/presentation/src/world_entities/space_ships/space_ship.cc
r10731 r10734 574 574 this->bSecFire = event.bPressed; 575 575 else if( event.type == KeyMapper::PEV_FIRE1) 576 { 577 printf(" %f, %f, %f \n",this->getAbsCoor().x,this->getAbsCoor().y,this->getAbsCoor().z ); 576 578 this->bFire = event.bPressed; 579 } 577 580 else if( event.type == KeyMapper::PEV_NEXT_WEAPON && event.bPressed) 578 581 {
Note: See TracChangeset
for help on using the changeset viewer.