Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9518 in orxonox.OLD for branches/proxy/src/world_entities


Ignore:
Timestamp:
Jul 27, 2006, 6:58:04 PM (18 years ago)
Author:
bensch
Message:

targetting turrets are firing all the time now, but the hack is out :/

Location:
branches/proxy/src/world_entities
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/proxy/src/world_entities/npcs/ground_turret.cc

    r9513 r9518  
    3939 */
    4040GroundTurret::GroundTurret(const TiXmlElement* root)
    41   : NPC(root)
     41    : NPC(root)
    4242{
    4343  this->init();
     
    5252GroundTurret::~GroundTurret ()
    5353{
    54 
    5554}
    5655
     
    8887  // all the clases this Entity is directly derived from must be called in this way, to load all settings.
    8988  NPC::loadParams(root);
    90 
    9189
    9290  /**
     
    126124void GroundTurret::tick(float dt)
    127125{
    128   if(this->getHealth() > 0.0f && State::getPlayer() &&
    129      State::getPlayer()->getPlayable() &&
    130      State::getPlayer()->getPlayable()->distance(this) < 120) // HACK
     126  if(this->getHealth() > 0.0f
     127    ) // HACK <--- YOU ARE THE MOTHERFUCKER
    131128  {
    132   if (likely(this->left != NULL))
    133   {
    134 //    this->left->tickW(dt);
    135     this->left->requestAction(WA_SHOOT);
    136   }
    137   if (likely(this->right != NULL))
    138   {
    139 //    this->right->tickW(dt);
    140     this->right->requestAction(WA_SHOOT);
    141   }
     129    if (likely(this->left != NULL))
     130    {
     131      //    this->left->tickW(dt);
     132      this->left->requestAction(WA_SHOOT);
     133    }
     134    if (likely(this->right != NULL))
     135    {
     136      //    this->right->tickW(dt);
     137      this->right->requestAction(WA_SHOOT);
     138    }
    142139  }
    143140}
     
    164161void GroundTurret::postSpawn ()
    165162{
    166 
    167163}
    168164
     
    173169void GroundTurret::leftWorld ()
    174170{
    175 
    176171}
    177172
  • branches/proxy/src/world_entities/weapons/aim.cc

    r9516 r9518  
    7171  this->range = 10000;
    7272  this->angle = M_PI_4;
    73   this->targetGroup = OM_GROUP_02_PROJ;
     73  this->targetGroup = OM_GROUP_01;
    7474  this->anim = new tAnimation<Aim>(this, &Aim::setSize);
    7575  this->anim->setInfinity(ANIM_INF_CONSTANT);
     
    132132void Aim::setTargetGroupS(const std::string& groupName)
    133133{
    134   printf("::::::::::::::::::::::: TEST\n");
    135134  OM_LIST id = ObjectManager::StringToOMList(groupName);
    136135  if (id != OM_NULL)
     
    138137  else
    139138    PRINTF(2)("List %s not found for targetting\n", groupName.c_str());
    140 
    141   printf("targetGroup: %s, %d", groupName.c_str(), id);
    142139}
    143140
  • branches/proxy/src/world_entities/weapons/targeting_turret.h

    r9516 r9518  
    2626  virtual void draw() const;
    2727
     28  const PNode* getLockedTarget() const { return lockedTarget; };
     29
    2830private:
    2931  void init();
Note: See TracChangeset for help on using the changeset viewer.