- Timestamp:
- Jun 20, 2007, 10:20:07 AM (17 years ago)
- Location:
- branches/presentation/src/world_entities/npcs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/npcs/actionbox_enemy.cc
r10726 r10727 49 49 this->acceleration = 3; 50 50 this->speed = 0; 51 this->agility = 1; 51 52 52 53 this->onEscape = false; 53 54 this->escaped = false; 54 55 this->endPoint = Vector(0, 0, 0); 55 if ( root ) 56 this->loadParams( root ); 57 58 59 this->weaponMan.setParentEntity( this); 56 57 this->weaponMan.setParentEntity( this); 60 58 //weapons: 61 59 … … 114 112 115 113 LoadParam(root, "endPoint", this, ActionboxEnemy, setEndPoint); 114 LoadParam(root, "maxSpeed", this, ActionboxEnemy, setMaxSpeed); 115 LoadParam(root, "agility", this, ActionboxEnemy, setAgility); 116 LoadParam(root, "acceleration", this, ActionboxEnemy, setAcceleration); 116 117 } 117 118 … … 217 218 { 218 219 Quaternion cur = myDir; 219 Quaternion rx( dt, Vector( 0, 0, 1 ) );220 Quaternion rx( agility*dt, Vector( 0, 0, 1 ) ); 220 221 221 222 Quaternion tmp1 = cur * rx; … … 234 235 } 235 236 236 Quaternion ry( dt, cur.inverse().apply( Vector( 0, 1, 0 ) ) );237 Quaternion ry( agility*dt, cur.inverse().apply( Vector( 0, 1, 0 ) ) ); 237 238 238 239 tmp1 = cur * ry; -
branches/presentation/src/world_entities/npcs/actionbox_enemy.h
r10725 r10727 31 31 float maxSpeed; 32 32 float speed; 33 float agility; 34 35 void setAcceleration( float f ){ this->acceleration = f; } 36 void setMaxSpeed( float f ){ this->maxSpeed = f; } 37 void setAgility( float f ){ this->agility = f; } 33 38 34 39 Quaternion myDir;
Note: See TracChangeset
for help on using the changeset viewer.