Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8874 in orxonox.OLD for branches


Ignore:
Timestamp:
Jun 28, 2006, 5:08:38 PM (18 years ago)
Author:
patrick
Message:

check door functions

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

Legend:

Unmodified
Added
Removed
  • branches/single_player_map/src/world_entities/WorldEntities.am

    r8873 r8874  
    1616                world_entities/character_attributes.cc \
    1717                world_entities/test_entity.cc \
     18                world_entities/door.cc \
    1819                world_entities/planet.cc \
    1920                world_entities/bsp_entity.cc \
     
    7576                character_attributes.h \
    7677                test_entity.h \
     78                door.h \
    7779                planet.h \
    7880                bsp_entity.h \
  • branches/single_player_map/src/world_entities/door.cc

    r8872 r8874  
    1818
    1919
    20 #include "executor/executor.h"
    2120#include "util/loading/factory.h"
    2221#include "util/loading/load_param.h"
    2322
    24 #include "kill.h"
    25 #include "game_rules.h"
    26 
    27 #include "test_entity.h"
    28 
    2923
    3024#include "interactive_model.h"
    31 #include "md2/md2Model.h"
    3225
    33 #include "state.h"
     26#include "door.h"
     27#include "class_list.h"
     28
    3429
    3530using namespace std;
     
    4237{
    4338  this->init();
    44   this->md2Model = new MD2Model("models/droidika.md2", "models/droideka.pcx");
    4539}
    4640
     
    6357  this->setClassID(CL_DOOR, "Door");
    6458  this->toList(OM_COMMON);
    65 
    66   this->lastCollided = NULL;
    67   this->bDeath = false;
    6859}
    6960
     
    10394 * checks if the door is open
    10495 */
    105 void Door::checkOpen()
     96bool Door::checkOpen()
    10697{
    10798
     99  std::list<BaseObject*>::const_iterator it;
     100  const std::list<BaseObject*>* list = ClassList::getList(CL_PLAYABLE);
     101  WorldEntity* entity;
    108102
     103  if( list == NULL)
     104    return false;
     105
     106  // for all players
     107  for( it = list->begin(); it != list->end(); it++)
     108  {
     109    entity = dynamic_cast<WorldEntity*>(*it);
     110
     111  }
     112
     113
     114  list = ClassList::getList(CL_GENERIC_NPC);
     115  if( list == NULL)
     116    return false;
     117  for( it = list->begin(); it != list->end(); it++)
     118  {
     119
     120  }
     121
     122  return false;
    109123}
    110124
  • branches/single_player_map/src/world_entities/door.h

    r8872 r8874  
    2323
    2424  private:
    25     void checkOpen();
     25    bool checkOpen();
    2626
    2727  private:
Note: See TracChangeset for help on using the changeset viewer.