Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 25, 2007, 3:05:01 AM (17 years ago)
Author:
patrick
Message:

merged playability. but got strange bug

Location:
branches/playability.new
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/playability.new

    • Property svn:ignore
      •  

        old new  
        1010autom4te.cache
        1111aclocal.m4
         12tags
         13test.bmp
         14config.sub
         15config.guess
         16OrxonoxPlayability.kdevses
         17OrxonoxPlayability.kdevelop.pcs
  • branches/playability.new/src/world_entities/player.cc

    r9869 r10362  
    1616#include "player.h"
    1717#include "playable.h"
     18#include "space_ships/space_ship.h"
    1819
    1920#include "event_handler.h"
     
    7374    PRINTF(4)("Enter new Playable\n");
    7475    this->playable = playable;
    75     this->_hud.setEnergyWidget(this->playable->getHealthWidget());
    76     this->_hud.setWeaponManager(&this->playable->getWeaponManager());
     76    this->_hud.setArmorWidget(this->playable->getHealthWidget());
     77    if (dynamic_cast<SpaceShip*>(this->playable) != 0)
     78      this->_hud.setWeaponManager(&this->playable->getWeaponManager(), &dynamic_cast<SpaceShip*>(this->playable)->getWeaponManagerSecondary());
     79    else
     80      this->_hud.setWeaponManager(&this->playable->getWeaponManager());
    7781
    7882    this->playable->setPlayer(this);
     
    9498void Player::weaponConfigChanged()
    9599{
    96   this->_hud.updateWeaponManager();
     100  //this->_hud.updateWeaponManager();
     101
     102  if (dynamic_cast<SpaceShip*>(this->playable) != 0)
     103      this->_hud.setWeaponManager(&this->playable->getWeaponManager(), &dynamic_cast<SpaceShip*>(this->playable)->getWeaponManagerSecondary());
     104    else
     105      this->_hud.setWeaponManager(&this->playable->getWeaponManager());
    97106}
    98107
     
    128137}
    129138
     139
Note: See TracChangeset for help on using the changeset viewer.