Changeset 8738 for code/trunk/src/modules
- Timestamp:
- Jul 9, 2011, 7:45:14 PM (13 years ago)
- Location:
- code/trunk/src/modules
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/modules/overlays/hud/HUDRadar.cc
r8737 r8738 106 106 panel->setMaterialName(TextureGenerator::getMaterialName( 107 107 shapeMaterials_[object->getRadarObjectShape()], object->getRadarObjectColour())); 108 panel->hide(); 108 109 this->radarObjects_[object] = panel; 109 110 } … … 166 167 float distance = (wePointer->getWorldPosition() - this->owner_->getPosition()).length(); 167 168 // calculate the size with 1/distance dependency for simplicity (instead of exp(-distance * lambda) 168 float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) ;169 float size = maximumDotSize_ * halfDotSizeDistance_ / (halfDotSizeDistance_ + distance) * it->first->getRadarObjectScale(); 169 170 it->second->setDimensions(size, size); 170 171 -
code/trunk/src/modules/weapons/projectiles/Rocket.cc
r8706 r8738 52 52 Constructor. Registers the object and initializes some default values. 53 53 */ 54 Rocket::Rocket(BaseObject* creator) : ControllableEntity(creator), BasicProjectile() 54 Rocket::Rocket(BaseObject* creator) 55 : ControllableEntity(creator) 56 , BasicProjectile() 57 , RadarViewable(creator, static_cast<WorldEntity*>(this)) 55 58 { 56 59 RegisterObject(Rocket);// - register the Rocket class to the core … … 106 109 camPosition->setAllowMouseLook(true); 107 110 this->addCameraPosition(camPosition); 111 112 this->setRadarObjectColour(ColourValue(1.0, 0.5, 0.0)); // orange 113 this->setRadarObjectShape(RadarViewable::Triangle); 114 this->setRadarObjectScale(0.5f); 108 115 } 109 116 -
code/trunk/src/modules/weapons/projectiles/Rocket.h
r8706 r8738 34 34 #include "tools/Timer.h" 35 35 #include "worldentities/ControllableEntity.h" 36 #include "interfaces/RadarViewable.h" 36 37 37 38 #include "BasicProjectile.h" … … 48 49 Oli Scheuss 49 50 */ 50 class _WeaponsExport Rocket : public ControllableEntity, public BasicProjectile 51 class _WeaponsExport Rocket : public ControllableEntity, public BasicProjectile, public RadarViewable 51 52 { 52 53 public: -
code/trunk/src/modules/weapons/projectiles/SimpleRocket.cc
r8706 r8738 48 48 CreateFactory(SimpleRocket); 49 49 50 SimpleRocket::SimpleRocket(BaseObject* creator) : ControllableEntity(creator), BasicProjectile() 50 SimpleRocket::SimpleRocket(BaseObject* creator) 51 : ControllableEntity(creator) 52 , BasicProjectile() 53 , RadarViewable(creator, static_cast<WorldEntity*>(this)) 51 54 { 52 55 RegisterObject(SimpleRocket);// - register the SimpleRocket class to the core 53 56 54 57 this->localAngularVelocity_ = 0; 55 this->lifetime_ = 1 20;58 this->lifetime_ = 10; 56 59 57 60 this->setMass(15); … … 86 89 } 87 90 91 this->setRadarObjectColour(ColourValue(1.0, 1.0, 0.0)); // yellow 92 this->setRadarObjectShape(RadarViewable::Triangle); 93 this->setRadarObjectScale(0.5f); 88 94 } 89 95 -
code/trunk/src/modules/weapons/projectiles/SimpleRocket.h
r8706 r8738 35 35 #include "worldentities/ControllableEntity.h" 36 36 #include "graphics/ParticleSpawner.h" 37 #include "interfaces/RadarViewable.h" 37 38 38 39 #include "BasicProjectile.h" … … 48 49 Gabriel Nadler (Original file: Oli Scheuss) 49 50 */ 50 class _WeaponsExport SimpleRocket : public ControllableEntity, public BasicProjectile 51 class _WeaponsExport SimpleRocket : public ControllableEntity, public BasicProjectile, public RadarViewable 51 52 { 52 53 public:
Note: See TracChangeset
for help on using the changeset viewer.