Changeset 708 for code/branches/FICN/src/orxonox/objects/weapon_system
- Timestamp:
- Dec 28, 2007, 10:30:29 PM (16 years ago)
- Location:
- code/branches/FICN/src/orxonox/objects/weapon_system
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.cc
r668 r708 59 59 } 60 60 61 void AmmunitionDump::setDumpSize(const Ogre::String &name, int size)61 void AmmunitionDump::setDumpSize(const String &name, int size) 62 62 { 63 63 if (size < 0) … … 70 70 71 71 72 int AmmunitionDump::store(const Ogre::String &name, int quantity)72 int AmmunitionDump::store(const String &name, int quantity) 73 73 { 74 74 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); … … 87 87 88 88 89 int AmmunitionDump::getAmmunition(const Ogre::String &name, int quantity)89 int AmmunitionDump::getAmmunition(const String &name, int quantity) 90 90 { 91 91 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); … … 103 103 104 104 105 int AmmunitionDump::getStockSize(const Ogre::String &name)105 int AmmunitionDump::getStockSize(const String &name) 106 106 { 107 107 int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name); -
code/branches/FICN/src/orxonox/objects/weapon_system/AmmunitionDump.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "network/Synchronisable.h" 37 37 //#include "../core/CoreIncludes.h" 38 #include "misc/String.h" 38 39 #include "../BaseObject.h" 39 40 … … 46 47 ~AmmunitionDump(); 47 48 48 void setDumpSize(const Ogre::String &name, int size);49 void setDumpSize(const String &name, int size); 49 50 50 int store(const Ogre::String &name, int quantiy);51 int store(const String &name, int quantiy); 51 52 52 int getAmmunition(const Ogre::String &name, int quantity);53 int getAmmunition(const String &name, int quantity); 53 54 54 int getStockSize(const Ogre::String &name);55 int getStockSize(const String &name); 55 56 56 57 virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); }; -
code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.cc
r668 r708 26 26 */ 27 27 28 #include "OgreMath.h" 29 #include "OgreVector3.h" 30 #include "OgreStringConverter.h" 31 #include "OgreSceneNode.h" 32 #include "OgreEntity.h" 33 #include "OgreSceneManager.h" 28 #include <OgreStringConverter.h> 29 #include <OgreSceneNode.h> 30 #include <OgreEntity.h> 31 #include <OgreSceneManager.h> 34 32 33 #include "misc/Vector3.h" 35 34 #include "Bullet.h" 36 35 #include "BulletManager.h" … … 42 41 43 42 namespace orxonox { 44 using namespace Ogre;45 46 43 CreateFactory(BarrelGun); 47 44 … … 78 75 79 76 Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity" 80 +StringConverter::toString(bulletCounter_++), "Barrel.mesh");77 + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh"); 81 78 82 79 Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0)) … … 106 103 107 104 108 109 105 void BarrelGun::secondaryFire() 110 106 { … … 120 116 121 117 Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity" 122 +StringConverter::toString(bulletCounter_++), "Barrel.mesh");118 + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh"); 123 119 124 120 Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0)) -
code/branches/FICN/src/orxonox/objects/weapon_system/BarrelGun.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "BaseWeapon.h" -
code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.cc
r680 r708 26 26 */ 27 27 28 #include "OgreMath.h" 29 #include "OgreVector3.h" 30 #include "OgreStringConverter.h" 31 #include "OgreSceneNode.h" 32 #include "OgreEntity.h" 33 #include "OgreSceneManager.h" 28 #include <OgreStringConverter.h> 29 #include <OgreSceneNode.h> 30 #include <OgreEntity.h> 31 #include <OgreSceneManager.h> 34 32 33 #include "misc/Vector3.h" 35 34 #include "../../Orxonox.h" 36 37 35 #include "Bullet.h" 38 36 #include "BulletManager.h" … … 43 41 44 42 namespace orxonox { 45 using namespace Ogre;46 47 //CreateFactory(BaseWeapon);48 49 43 float BaseWeapon::nextActionValidityPeriod_s = 0.5; 50 44 -
code/branches/FICN/src/orxonox/objects/weapon_system/BaseWeapon.h
r680 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "../Model.h" … … 116 116 float primaryFiringRate_; 117 117 float secondaryFiringRate_; 118 Ogre::Real primaryBulletSpeed_;119 Ogre::Real secondaryBulletSpeed_;118 Real primaryBulletSpeed_; 119 Real secondaryBulletSpeed_; 120 120 121 121 int magazineSize_; -
code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.cc
r669 r708 26 26 */ 27 27 28 #include "OgreSceneNode.h"29 #include "OgreEntity.h"30 #include "OgreVector3.h"31 32 28 #include "Bullet.h" 33 29 34 35 30 namespace orxonox { 36 using namespace Ogre;37 38 31 CreateFactory(Bullet); 39 32 -
code/branches/FICN/src/orxonox/objects/weapon_system/Bullet.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "../Model.h" -
code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.cc
r680 r708 26 26 */ 27 27 28 #include "OgreSceneNode.h"29 30 28 #include "BulletManager.h" 31 29 #include "Bullet.h" … … 33 31 34 32 namespace orxonox { 35 using namespace Ogre;36 37 33 CreateFactory(BulletManager); 38 34 … … 86 82 } 87 83 88 int BulletManager::getAmmunitionID(const Ogre::String &ammoName)84 int BulletManager::getAmmunitionID(const String &ammoName) 89 85 { 90 Ogre::String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };86 String ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" }; 91 87 int ammoTypesLength = 3; 92 88 -
code/branches/FICN/src/orxonox/objects/weapon_system/BulletManager.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36 #include "network/Synchronisable.h" 37 37 #include "tinyxml/tinyxml.h" 38 38 //#include "../core/CoreIncludes.h" 39 #include "misc/String.h" 39 40 #include "../BaseObject.h" 40 41 #include "../Tickable.h" … … 49 50 void addBullet(Bullet*); 50 51 51 int getAmmunitionID(const Ogre::String&);52 int getAmmunitionID(const String&); 52 53 53 54 int getNumberOfAmmos(); -
code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.cc
r680 r708 26 26 */ 27 27 28 #include "OgreMath.h"29 #include "OgreVector3.h"30 #include "OgreStringConverter.h"31 #include "OgreSceneNode.h"32 #include "OgreEntity.h"33 #include "OgreSceneManager.h"34 35 28 #include "BaseWeapon.h" 36 37 29 #include "WeaponStation.h" 38 30 39 31 40 32 namespace orxonox { 41 using namespace Ogre;42 43 33 WeaponStation::WeaponStation(int stationSize) 44 34 : slots_(new BaseWeapon*[stationSize]), -
code/branches/FICN/src/orxonox/objects/weapon_system/WeaponStation.h
r673 r708 32 32 #include <OgrePrerequisites.h> 33 33 34 #include " orxonox/OrxonoxPrereqs.h"34 #include "../../OrxonoxPrereqs.h" 35 35 36 36
Note: See TracChangeset
for help on using the changeset viewer.