Changeset 9709 in orxonox.OLD for branches/new_class_id/src/world_entities/weapons
- Timestamp:
- Aug 31, 2006, 10:51:08 PM (18 years ago)
- Location:
- branches/new_class_id/src/world_entities/weapons
- Files:
-
- 23 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/new_class_id/src/world_entities/weapons/aim.cc
r9656 r9709 29 29 30 30 31 NewObjectListDefinition(Aim); 31 32 32 33 /** … … 59 60 void Aim::init() 60 61 { 61 this-> setClassID(CL_CROSSHAIR, "Aim");62 this->registerObject(this, Aim::_objectList); 62 63 this->setName("Aim"); 63 64 … … 107 108 ObjectManager::EntityList::iterator entity; 108 109 //printf("%d\n", this->targetGroup); 109 for (entity = State::getObjectManager()->get ObjectList(this->targetGroup).begin();110 entity != State::getObjectManager()->get ObjectList(this->targetGroup).end();110 for (entity = State::getObjectManager()->getEntityList(this->targetGroup).begin(); 111 entity != State::getObjectManager()->getEntityList(this->targetGroup).end(); 111 112 entity ++) 112 113 { -
branches/new_class_id/src/world_entities/weapons/aim.h
r9656 r9709 19 19 template<class T> class tAnimation; 20 20 21 21 22 //! An Aim for zooming in on Targets. 22 23 /** … … 28 29 class Aim : public PNode, public Element2D 29 30 { 31 NewObjectListDeclaration(Aim); 30 32 31 33 public: -
branches/new_class_id/src/world_entities/weapons/aiming_system.cc
r9406 r9709 30 30 31 31 32 NewObjectListDefinition(AimingSystem); 32 33 33 34 /** … … 55 56 void AimingSystem::init() 56 57 { 57 this-> setClassID(CL_AIMING_SYSTEM, "AimingSystem");58 this->registerObject(this, AimingSystem::_objectList); 58 59 this->setName("AimingSystem"); 59 60 … … 63 64 // registering default reactions: 64 65 this->unsubscribeReaction(CREngine::CR_OBJECT_DAMAGE); 65 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, CL_WORLD_ENTITY);66 this->subscribeReaction(CREngine::CR_OBJECT_DAMAGE, WorldEntity::classID()); 66 67 67 68 this->range = 1000.0f; -
branches/new_class_id/src/world_entities/weapons/aiming_system.h
r9235 r9709 21 21 class AimingSystem : public WorldEntity 22 22 { 23 NewObjectListDeclaration(AimingSystem); 23 24 24 25 public: -
branches/new_class_id/src/world_entities/weapons/aiming_turret.cc
r9656 r9709 27 27 #include "util/loading/factory.h" 28 28 29 CREATE_FACTORY(AimingTurret, CL_AIMING_TURRET); 30 29 #include "class_id.h" 30 NewObjectListDefinitionID(AimingTurret, CL_AIMING_TURRET); 31 CREATE_FACTORY(AimingTurret); 31 32 32 33 … … 64 65 void AimingTurret::init() 65 66 { 66 this-> setClassID(CL_AIMING_TURRET, "AimingTurret");67 this->registerObject(this, AimingTurret::_objectList); 67 68 68 69 Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this); … … 86 87 87 88 this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET); 88 this->setProjectileType (CL_GUIDED_MISSILE);89 this->setProjectileTypeC("GuidedMissile"); 89 90 90 91 -
branches/new_class_id/src/world_entities/weapons/aiming_turret.h
r9656 r9709 13 13 class AimingTurret : public Weapon 14 14 { 15 NewObjectListDeclaration(AimingTurret); 16 15 17 public: 16 18 AimingTurret (); -
branches/new_class_id/src/world_entities/weapons/boomerang_gun.cc
r9235 r9709 27 27 #include "util/loading/factory.h" 28 28 29 CREATE_FACTORY(BoomerangGun, CL_BOOMERANG_GUN); 29 #include "class_id.h" 30 NewObjectListDefinitionID(BoomerangGun, CL_BOOMERANG_GUN); 31 CREATE_FACTORY(BoomerangGun); 30 32 31 33 … … 61 63 void BoomerangGun::init() 62 64 { 63 this-> setClassID(CL_BOOMERANG_GUN, "BoomerangGun");65 this->registerObject(this, BoomerangGun::_objectList); 64 66 65 67 … … 85 87 86 88 this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET); 87 this->setProjectileType (CL_BOOMERANG_PROJECTILE);89 this->setProjectileTypeC("BoomerangProjectile"); 88 90 89 91 this->loadModel("models/guns/turret1.obj", 5.0); -
branches/new_class_id/src/world_entities/weapons/boomerang_gun.h
r9235 r9709 11 11 class BoomerangGun : public Weapon 12 12 { 13 NewObjectListDeclaration(BoomerangGun); 13 14 public: 14 15 BoomerangGun (); -
branches/new_class_id/src/world_entities/weapons/cannon.cc
r9406 r9709 32 32 #include "animation3d.h" 33 33 34 #include "fast_factory.h" 35 36 37 38 39 CREATE_FACTORY(Cannon, CL_CANNON); 34 #include "loading/fast_factory.h" 35 36 37 38 #include "class_id.h" 39 NewObjectListDefinitionID(Cannon, CL_CANNON); 40 CREATE_FACTORY(Cannon); 40 41 41 42 /** … … 69 70 void Cannon::init() 70 71 { 71 this-> setClassID(CL_CANNON, "Cannon");72 this->registerObject(this, Cannon::_objectList); 72 73 73 74 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN); … … 88 89 89 90 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_HEAVY); 90 this->setProjectileType (CL_BOMB);91 this->setProjectileTypeC("Bomb"); 91 92 this->prepareProjectiles(5); 92 93 -
branches/new_class_id/src/world_entities/weapons/cannon.h
r8777 r9709 12 12 class Cannon : public Weapon 13 13 { 14 NewObjectListDeclaration(Cannon); 14 15 public: 15 16 Cannon (); -
branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.cc
r9406 r9709 29 29 30 30 31 #include " fast_factory.h"31 #include "loading/fast_factory.h" 32 32 33 33 #include "fps_sniper_rifle.h" … … 39 39 40 40 41 CREATE_FACTORY(FPSSniperRifle, CL_FPS_SNIPER_RIFLE); 41 #include "class_id.h" 42 NewObjectListDefinitionID(FPSSniperRifle, CL_FPS_SNIPER_RIFLE); 43 CREATE_FACTORY(FPSSniperRifle); 42 44 43 45 /** … … 76 78 void FPSSniperRifle::init() 77 79 { 78 this-> setClassID(CL_FPS_SNIPER_RIFLE, "FPSSniperRifle");80 this->registerObject(this, FPSSniperRifle::_objectList); 79 81 80 82 this->loadModel("models/guns/fps_sniper_rifle.obj", 0.2); … … 98 100 99 101 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 100 this->setProjectileType (CL_LASER);102 this->setProjectileTypeC("Laser"); 101 103 this->prepareProjectiles(20); 102 104 -
branches/new_class_id/src/world_entities/weapons/fps_sniper_rifle.h
r9003 r9709 39 39 class FPSSniperRifle : public Weapon 40 40 { 41 NewObjectListDeclaration(FPSSniperRifle); 42 41 43 public: 42 44 FPSSniperRifle (int leftRight); -
branches/new_class_id/src/world_entities/weapons/hyperblaster.cc
r9406 r9709 31 31 #include "animation3d.h" 32 32 33 #include " fast_factory.h"33 #include "loading/fast_factory.h" 34 34 35 35 36 36 37 38 CREATE_FACTORY(Hyperblaster, CL_HYPERBLASTER); 37 #include "class_id.h" 38 NewObjectListDefinitionID(Hyperblaster, CL_HYPERBLASTER); 39 CREATE_FACTORY(Hyperblaster); 39 40 40 41 Hyperblaster::Hyperblaster(const TiXmlElement* root) … … 56 57 void Hyperblaster::init() 57 58 { 58 this-> setClassID(CL_HYPERBLASTER, "Hyperblaster");59 this->registerObject(this, Hyperblaster::_objectList); 59 60 60 61 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN); … … 76 77 77 78 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL | WTYPE_HEAVY); 78 this->setProjectileType (CL_HYPERBLAST);79 this->setProjectileTypeC("Hyperblast"); 79 80 this->prepareProjectiles(2); 80 81 -
branches/new_class_id/src/world_entities/weapons/hyperblaster.h
r8777 r9709 12 12 class Hyperblaster : public Weapon 13 13 { 14 public: 14 NewObjectListDeclaration(Hyperblaster); 15 public: 15 16 Hyperblaster (const TiXmlElement* root = NULL); 16 17 virtual ~Hyperblaster (); -
branches/new_class_id/src/world_entities/weapons/laser_cannon.cc
r9656 r9709 29 29 #include "animation3d.h" 30 30 31 #include " fast_factory.h"31 #include "loading/fast_factory.h" 32 32 33 CREATE_FACTORY(LaserCannon, CL_LASER_CANNON); 34 33 #include "class_id.h" 34 NewObjectListDefinitionID(LaserCannon, CL_LASER_CANNON); 35 CREATE_FACTORY(LaserCannon); 35 36 36 37 LaserCannon::LaserCannon(const TiXmlElement* root) … … 52 53 void LaserCannon::init() 53 54 { 54 this-> setClassID(CL_LASER_CANNON, "LaserCannon");55 this->registerObject(this, LaserCannon::_objectList); 55 56 56 57 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/laser_cannon.obj", OBJ, RP_CAMPAIGN); … … 72 73 73 74 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 74 this->setProjectileType (CL_RAIL_PROJECTILE);75 this->setProjectileTypeC("RailProjectile"); 75 76 this->prepareProjectiles(100); 76 77 this->setEmissionPoint(Vector(2.8,0,0) * 5.0); -
branches/new_class_id/src/world_entities/weapons/laser_cannon.h
r9235 r9709 29 29 class LaserCannon : public Weapon 30 30 { 31 public: 31 NewObjectListDeclaration(LaserCannon); 32 public: 32 33 LaserCannon (const TiXmlElement* root = NULL); 33 34 virtual ~LaserCannon (); -
branches/new_class_id/src/world_entities/weapons/targeting_turret.cc
r9656 r9709 26 26 #include "util/loading/factory.h" 27 27 28 CREATE_FACTORY(TargetingTurret, CL_TARGETING_TURRET); 28 #include "class_id.h" 29 NewObjectListDefinitionID(TargetingTurret, CL_TARGETING_TURRET); 30 CREATE_FACTORY(TargetingTurret); 29 31 30 32 … … 48 50 void TargetingTurret::init() 49 51 { 50 this-> setClassID(CL_TARGETING_TURRET, "TargetingTurret");52 this->registerObject(this, TargetingTurret::_objectList); 51 53 52 54 Animation3D* animation1 = this->getAnimation(WS_ACTIVATING, this); … … 70 72 71 73 this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET); 72 this->setProjectileType (CL_GUIDED_MISSILE);74 this->setProjectileTypeC("GuidedMissile"); 73 75 74 76 -
branches/new_class_id/src/world_entities/weapons/targeting_turret.h
r9656 r9709 12 12 class TargetingTurret : public Weapon 13 13 { 14 NewObjectListDeclaration(TargetingTurret); 14 15 public: 15 16 TargetingTurret(const TiXmlElement* root = NULL); -
branches/new_class_id/src/world_entities/weapons/test_gun.cc
r9656 r9709 31 31 #include "animation3d.h" 32 32 33 #include "fast_factory.h" 34 35 CREATE_FACTORY(TestGun, CL_TEST_GUN); 36 33 #include "loading/fast_factory.h" 34 35 #include "class_id.h" 36 NewObjectListDefinitionID(TestGun, CL_TEST_GUN); 37 CREATE_FACTORY(TestGun); 37 38 /** 38 39 * standard constructor … … 109 110 void TestGun::init() 110 111 { 111 this->setClassID(CL_TEST_GUN, "TestGun"); 112 112 this->registerObject(this, TestGun::_objectList); 113 113 // this->model = (Model*)ResourceManager::getInstance()->load("models/guns/test_gun.obj", OBJ, RP_CAMPAIGN); 114 114 … … 129 129 130 130 this->setCapability(WTYPE_ALLDIRS | WTYPE_DIRECTIONAL); 131 this->setProjectileType (CL_LASER);131 this->setProjectileTypeC("Laser"); 132 132 this->prepareProjectiles(100); 133 133 -
branches/new_class_id/src/world_entities/weapons/test_gun.h
r8777 r9709 37 37 class TestGun : public Weapon 38 38 { 39 NewObjectListDeclaration(TestGun); 39 40 public: 40 41 TestGun (int leftRight); -
branches/new_class_id/src/world_entities/weapons/turret.cc
r9406 r9709 27 27 #include "util/loading/factory.h" 28 28 29 CREATE_FACTORY(Turret, CL_TURRET); 30 31 29 #include "class_id.h" 30 NewObjectListDefinitionID(Turret, CL_TURRET); 31 CREATE_FACTORY(Turret); 32 32 33 33 /** … … 62 62 void Turret::init() 63 63 { 64 this-> setClassID(CL_TURRET, "Turret");64 this->registerObject(this, Turret::_objectList); 65 65 66 66 … … 86 86 87 87 this->setCapability(WTYPE_ALLDIRS | WTYPE_TURRET); 88 this->setProjectileType (CL_ROCKET);88 this->setProjectileTypeC("Rocket"); 89 89 90 90 this->loadModel("models/guns/turret1.obj"); -
branches/new_class_id/src/world_entities/weapons/turret.h
r8777 r9709 11 11 class Turret : public Weapon 12 12 { 13 NewObjectListDeclaration(Turret); 13 14 public: 14 15 Turret (); -
branches/new_class_id/src/world_entities/weapons/weapon.cc
r9705 r9709 21 21 #include "weapon.h" 22 22 23 #include " fast_factory.h"23 #include "loading/fast_factory.h" 24 24 #include "world_entities/projectiles/projectile.h" 25 25
Note: See TracChangeset
for help on using the changeset viewer.