Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 5875 in orxonox.OLD


Ignore:
Timestamp:
Dec 2, 2005, 3:33:46 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/spaceshipcontrol: compiles again

Location:
branches/spaceshipcontrol/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/spaceshipcontrol/src/Makefile.am

    r5766 r5875  
    4747                  world_entities/world_entity.cc \
    4848                  world_entities/camera.cc \
     49                  world_entities/playable.cc \
    4950                  world_entities/player.cc \
    5051                  world_entities/npcs/npc.cc \
     
    8788                 world_entities/world_entity.h \
    8889                 world_entities/camera.h \
     90                 world_entities/playable.h \
    8991                 world_entities/player.h \
    9092                 world_entities/npcs/npc.h \
  • branches/spaceshipcontrol/src/lib/util/list.h

    r5403 r5875  
    44 */
    55
    6 #ifndef _LIST_H
    7 #define _LIST_H
     6#ifndef _T_LIST_H
     7#define _T_LIST_H
    88
    99#include "compiler.h"
     
    645645}
    646646
    647 #endif /* _LIST_H */
     647#endif /* _T_LIST_H */
  • branches/spaceshipcontrol/src/world_entities/playable.cc

    r5872 r5875  
    1414*/
    1515
    16 #include "weapon_manager.h"
     16#include "weapons/weapon_manager.h"
    1717#include "playable.h"
     18#include "event_handler.h"
     19#include "player.h"
    1820
    1921
     
    2325}
    2426
    25 Playable::init()
     27Playable::~Playable()
     28{
     29
     30}
     31
     32void Playable::init()
    2633{
    2734  this->setClassID(CL_PLAYABLE, "Playable");
     
    3643{
    3744  /*EventHandler*/
    38   evh = EventHandler::getInstance();
     45  EventHandler* evh = EventHandler::getInstance();
    3946  for (int i = 0 ; i < events.size(); i++)
    4047  {
    41   if (!evh->isSubscribed(ES_GAME, i))
    42   evh->subscribe(this, ES_GAME, i);
    43 }
     48    if (!evh->isSubscribed(ES_GAME, i))
     49      evh->subscribe(player, ES_GAME, i);
     50  }
    4451
    4552}
    46 
    47 Playable::getWeaponManager()
    48 {
    49   return weaponMan;
    50 }
  • branches/spaceshipcontrol/src/world_entities/playable.h

    r5872 r5875  
    2121class Playable : public WorldEntity
    2222{
    23 
    2423  public:
    2524    Playable();
     
    2928    void loadParams(const TiXmlElement* root);
    3029
    31     virtual void addWeapon(Weapon* weapon )= 0;
    32     virtual void removeWeapon(Weapon* weapon) = 0;
    33     WeaponManager* getWeaponManager();
     30    virtual void addWeapon(Weapon* weapon )  {}//= 0;
     31    virtual void removeWeapon(Weapon* weapon) {}//= 0;
     32    inline WeaponManager* getWeaponManager() const { return this->weaponMan; };
    3433
    3534    void subscribeEvents(Player* player);
    36     virtual void process(const Event &event) = 0;
    37     virtual void setKeySet();
     35    virtual void process(const Event &event) {} //= 0;
     36    virtual void setKeySet() {};
    3837    inline const std::list<Event*>& getEventList() { return this->events; };
    3938
  • branches/spaceshipcontrol/src/world_entities/player.cc

    r5872 r5875  
    1616#include "player.h"
    1717
    18 #include "factory.h"
    19 
    20 #include "list.h"
    21 
    2218#include "event_handler.h"
    23 
    2419#include "event.h"
    2520
Note: See TracChangeset for help on using the changeset viewer.