Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9008 in orxonox.OLD for trunk/src/world_entities/spawning_point.h


Ignore:
Timestamp:
Jul 2, 2006, 2:22:19 PM (19 years ago)
Author:
bensch
Message:

orxonox/trunk: merged the network bak to the trunk
merged with command:
svn merge -r8804:HEAD https://svn.orxonox.net/orxonox/branches/multi_player_map .

conflicts all resolved in favour of the branche

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/world_entities/spawning_point.h

    r8802 r9008  
    1010#include "playable.h"
    1111
     12#include "message_manager.h"
     13
    1214#include <list>
    1315
     
    1820{
    1921  float respawnTime;
    20   WorldEntity * entity;
    21   OM_LIST list;
     22  Playable * entity;
    2223};
    2324
     
    4344
    4445  public:
    45     SpawningPoint (ClassID classID, const Vector& position = Vector(0.0, 0.0, 0.0));
    46     SpawningPoint (const Vector& position, ClassID classID, SpawningPointMode type, float delay);
     46    SpawningPoint(const TiXmlElement* root = NULL);
    4747    virtual ~SpawningPoint ();
    4848    void init();
     
    5050    virtual void loadParams(const TiXmlElement* root);
    5151
    52     /**  sets the entity that is going to be spawned by this point @param classID: the id from the class_id.h file */
    53     void SpawningPoint::setSpawningEntity(ClassID classid) { this->classid = classid; }
    54     /** sets the frequency with which the point is going to spawn entities (1/sec) @param frequency: the frequency */
    55     void SpawningPoint::setSpawningDelay(float delay) { this->delay = delay; }
    56     /** sets the spawning point mode @param mode: the mode */
    57     void SpawningPoint::setSpawningMode(int mode) { this->mode = (SpawningPointMode)mode; }
    58    
    5952    inline int getTeamId(){ return this->teamId; }
    6053    inline void setTeamId( int teamId ){ this->teamId = teamId; }
    6154
    62     void pushEntity(WorldEntity* entity, float delay = 0);
     55    void pushEntity(Playable* entity, float delay = 0);
    6356
    6457    /** activates the spawning point */
     
    7467
    7568  private:
    76     void spawn(WorldEntity* entity);
     69    void spawn(Playable* entity);
     70   
     71    void sendRespawnMessage( int uniqueId );
     72    static bool respawnMessageHandler( MessageId messageId, byte * data, int dataLength, void * someData, int userId );
    7773
    7874
    7975  private:
    80     float                           delay;                          //!< the timer that counts down until the next spawn
    8176    float                           localTimer;                     //!< the local timer
    82     float                           seed;                           //!< the random seed of the position
    8377    int                             teamId;                         //!< only spawn players of this team
    84     ClassID                         classid;                        //!< the classid of the entity to spawn
    85     SpawningPointMode               mode;                           //!< the mode of the spawning point
    8678    std::list<QueueEntry>           queue;                          //!< queue of waiting WorldEntities to be spawned
    8779    bool                            bSpawning;                      //!< flag to indicate if this spawning point is active or not
Note: See TracChangeset for help on using the changeset viewer.