Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6700 in orxonox.OLD for trunk/src/world_entities/playable.cc


Ignore:
Timestamp:
Jan 25, 2006, 3:10:17 PM (18 years ago)
Author:
bensch
Message:

trunk: Energy→Health

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/playable.cc

    r6695 r6700  
    2222#include "state.h"
    2323
     24#include "world_entities/projectiles/projectile.h"
     25
    2426#include "power_ups/weapon_power_up.h"
    2527#include "power_ups/param_power_up.h"
     
    9799{
    98100  if (entity->isA(CL_PROJECTILE))
    99     this->removeEnergy(entity->getEnergy());
     101    this->decreaseHealth(entity->getHealth());
    100102
    101103  // EXTREME HACK
    102   if (this->getEnergy() == 0.0f)
     104  if (this->getHealth() == 0.0f)
    103105    this->deactivateNode();
    104106}
     
    166168    switch(ppu->getType()) {
    167169      case POWERUP_PARAM_HEALTH:
    168         this->addEnergy(ppu->getValue());
     170        this->increaseHealth(ppu->getValue());
    169171        return true;
    170172      case POWERUP_PARAM_MAX_HEALTH:
    171         this->setMaxEnergy(this->getMaxEnergy() + ppu->getValue());
     173        this->increaseHealthMax(ppu->getValue());
    172174        return true;
    173175    }
Note: See TracChangeset for help on using the changeset viewer.