Changeset 9101 in orxonox.OLD for branches/presentation/src/world_entities/creatures
- Timestamp:
- Jul 4, 2006, 4:38:53 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/creatures/fps_player.cc
r9085 r9101 27 27 #include "weapons/cannon.h" 28 28 #include "weapons/fps_sniper_rifle.h" 29 30 #include "aabb.h" 29 31 30 32 #include "key_mapper.h" … … 124 126 125 127 this->getWeaponManager().setSlotCount(2); 126 this->getWeaponManager().setSlotPosition(0, Vector(1.5, -0.7, 1.1));127 128 // this->getWeaponManager().setSlotDirection(0, Quaternion(M_PI_2, Vector(0,1,0))); 128 129 this->getWeaponManager().setSlotCapability(0, WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 129 this->getWeaponManager().setSlotPosition(1, Vector(5.0, 0.0, 0.0));130 130 this->getWeaponManager().setSlotDirection(1, Quaternion(M_PI_4*.5, Vector(1,0,0))); 131 132 133 AABB* box = this->getModelAABB(); 134 if( box != NULL) 135 { 136 this->getWeaponManager().setSlotPosition(0, Vector(1.5, box->halfLength[1] * 2.0f - 0.7, 1.1)); 137 this->getWeaponManager().setSlotPosition(1, Vector(5.0, box->halfLength[1] * 2.0f, 0.0)); 138 } 139 else 140 { 141 this->getWeaponManager().setSlotPosition(0, Vector(1.5, -0.7, 1.1)); 142 this->getWeaponManager().setSlotPosition(1, Vector(5.0, 0.0, 0.0)); 143 } 144 131 145 132 146 this->getWeaponManager().setParentNode(&this->cameraNode); … … 191 205 192 206 193 State::getCameraNode()->setRelCoor(0,0,0); 194 State::getCameraTargetNode()->setRelCoor(10,0,0); 207 AABB* box = this->getModelAABB(); 208 if( box != NULL) 209 { 210 State::getCameraNode()->setRelCoor(0, box->halfLength[1] * 2.0f, 0); 211 State::getCameraTargetNode()->setRelCoor(10, box->halfLength[1] * 2.0f, 0); 212 } 195 213 } 196 214 … … 209 227 void FPSPlayer::tick (float time) 210 228 { 211 229 212 230 if( this->bPosBut) 213 231 { … … 215 233 printf("mechanic:walkTo( %f, mheight, %f)\n",this->getAbsCoorX(),this->getAbsCoorZ()); 216 234 } 217 235 218 236 Playable::tick( time ); 219 237
Note: See TracChangeset
for help on using the changeset viewer.