Changeset 10719 in orxonox.OLD for branches/presentation/src
- Timestamp:
- Jun 18, 2007, 6:02:47 PM (17 years ago)
- Location:
- branches/presentation/src/world_entities
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/presentation/src/world_entities/space_ships/space_ship.cc
r10715 r10719 92 92 ->addMethod("getAbsCoorY", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorY)) 93 93 ->addMethod("getAbsCoorZ", Executor0ret<PNode, lua_State*, float>(&PNode::getAbsCoorZ)) 94 //->addMethod("setCameraSpeed", Executor1<Sp aceShip, lua_State*, float>(&SpaceShip::setCameraSpeed))94 //->addMethod("setCameraSpeed", Executor1<SpVector(1,0,0)aceShip, lua_State*, float>(&SpaceShip::setCameraSpeed)) 95 95 ->addMethod("pause", Executor1<WorldEntity, lua_State*, bool>(&WorldEntity::pauseTrack)) 96 96 ->addMethod("setCameraDist", Executor1<SpaceShip, lua_State*, float>(&SpaceShip::setCameraDistance)) … … 592 592 this->yMouse += event.yRel; 593 593 // printf("Mouse Coord: %f, %f\n", this->xMouse, this->yMouse); 594 this->weaponMan.getFixedTarget()->setRelCoor(10000 , -10 * this->mouseSensitivity * yMouse, 10 * this->mouseSensitivity * xMouse);595 this->secWeaponMan.getFixedTarget()->setRelCoor(10000 , -10 * this->mouseSensitivity * yMouse, 10 * this->mouseSensitivity * xMouse);594 this->weaponMan.getFixedTarget()->setRelCoor(100000, -100 * this->mouseSensitivity * yMouse, 100 * this->mouseSensitivity * xMouse); 595 this->secWeaponMan.getFixedTarget()->setRelCoor(100000, -100 * this->mouseSensitivity * yMouse, 100 * this->mouseSensitivity * xMouse); 596 596 } 597 597 else if (!(State::getCamera()->getEventHandling())) -
branches/presentation/src/world_entities/space_ships/space_ship.h
r10715 r10719 75 75 inline void loadWeapon(float regen) { this->weaponEnergyRegen = regen; }; 76 76 77 void addWeaponToSlot(int wm, int config, int slot, const std::string& weaponName);77 // void addWeaponToSlot(int wm, int config, int slot, const std::string& weaponName); 78 78 79 79 inline PNode* getTravelNode() { return this->travelNode; }; -
branches/presentation/src/world_entities/weapons/disruptor.cc
r10702 r10719 153 153 pj->setParent(PNode::getNullParent()); 154 154 155 pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*130 + VECTOR_RAND(1)); 155 Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(); 156 157 // pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*130 + VECTOR_RAND(1)); 158 pj->setVelocity(this->getAbsDir().apply(tmp.getNormalized())*130 + VECTOR_RAND(1)); 156 159 157 160 pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor()); 158 pj->setAbsDir(this->getAbsDir());161 // pj->setAbsDir(this->getAbsDir()); 159 162 pj->activate(); 160 163 -
branches/presentation/src/world_entities/weapons/nadion_laser.cc
r10702 r10719 142 142 pj->setParent(PNode::getNullParent()); 143 143 144 pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(Vector(1,0,0))*160); 144 Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(); 145 146 pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(tmp.getNormalized())*160); 145 147 146 148 pj->setAbsCoor(this->getEmissionPoint()); 147 pj->setAbsDir(this->getAbsDir());149 // pj->setAbsDir(this->getAbsDir()); 148 150 pj->activate(); 149 151 -
branches/presentation/src/world_entities/weapons/rf_cannon.cc
r10715 r10719 135 135 pj->setParent(PNode::getNullParent()); 136 136 137 pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190); 137 // pj->setVelocity(this->getAbsDir().apply(Vector(1,0,0))*190); 138 Vector tmp = this->getDefaultTarget()->getAbsCoor() - this->getAbsCoor(); 139 140 pj->setVelocity(this->getParent()->getVelocity() + this->getAbsDir().apply(tmp.getNormalized())*190); 138 141 139 142 pj->setAbsCoor(this->emissionPoint[this->activeBarrel]->getAbsCoor()); 140 pj->setAbsDir(this->getAbsDir()); 141 // pj->setAbsDir(Quaternion(0, dynamic_cast<WeaponManager*>(this->getParent())->getFixedTarget()->getAbsCoor() - this->getParent()->getAbsCoor())); 142 // pj->setAbsDir(dynamic_cast<WeaponManager*>(this->getParent())->getFixedTarget()->getAbsDir()); 143 // pj->setAbsDir(this->getAbsDir()); 144 143 145 pj->activate(); 144 146 -
branches/presentation/src/world_entities/weapons/weapon_manager.h
r10714 r10719 86 86 87 87 inline void addWeaponToSlot(int config, int slot, const std::string& weaponName){ 88 this->addWeapon( Weapon::createWeapon( weaponName ), config, slot); };88 this->addWeapon( Weapon::createWeapon( weaponName ), config, slot); this->configs[config][slot]->setDefaultTarget(this->getFixedTarget()); }; 89 89 90 90
Note: See TracChangeset
for help on using the changeset viewer.