Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6365 in orxonox.OLD for branches/network/src


Ignore:
Timestamp:
Dec 31, 2005, 12:37:15 AM (19 years ago)
Author:
patrick
Message:

network: the network branche works again

Location:
branches/network/src/story_entities
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/game_world.h

    r6363 r6365  
    3838
    3939    /* classes from story-entity */
    40     ErrorMessage preLoad();
    41     ErrorMessage load ();
    42     ErrorMessage postLoad();
     40    virtual ErrorMessage preLoad();
     41    virtual ErrorMessage load ();
     42    virtual ErrorMessage postLoad();
    4343
    4444    virtual ErrorMessage preStart();
  • branches/network/src/story_entities/multi_player_world.cc

    r6364 r6365  
    9292}
    9393
    94 
    95 
    96 /**
    97  * this is executed just before load
    98  *
    99  * since the load function sometimes needs data, that has been initialized
    100  * before the load and after the proceeding storyentity has finished
    101  */
    102 ErrorMessage MultiPlayerWorld::preLoad()
    103 {
    104   static_cast<GameWorld*>(this)->preLoad();
    105 
    106   /* the the single player specific stuff */
    107 }
    108 
    109 
    110 /**
    111  *  loads the MultiPlayerWorld by initializing all resources, and set their default values.
    112  */
    113 ErrorMessage MultiPlayerWorld::load()
    114 {
    115   static_cast<GameWorld*>(this)->load();
    116 
    117   /* the the single player specific stuff here */
    118 }
    119 
    120 
    121 /**
    122  *  post loads the MultiPlayerWorld by initializing all resources, and set their default values.
    123  */
    124 ErrorMessage MultiPlayerWorld::postLoad()
    125 {
    126   static_cast<GameWorld*>(this)->postLoad();
    127 
    128   /* the single player specific stuff here */
    129 }
    130 
  • branches/network/src/story_entities/multi_player_world.h

    r6361 r6365  
    2626  void loadParams(const TiXmlElement* root);
    2727
    28   ErrorMessage preLoad();
    29   ErrorMessage load ();
    30   ErrorMessage postLoad();
    3128
    3229  private:
  • branches/network/src/story_entities/single_player_world.cc

    r6364 r6365  
    9595
    9696
    97 /**
    98  * this is executed just before load
    99  *
    100  * since the load function sometimes needs data, that has been initialized
    101  * before the load and after the proceeding storyentity has finished
    102  */
    103 ErrorMessage SinglePlayerWorld::preLoad()
    104 {
    105   static_cast<GameWorld*>(this)->preLoad();
    10697
    107   /* the the single player specific stuff */
    108 }
     98// ErrorMessage SinglePlayerWorld::load()
     99// {
     100//   static_cast<GameWorld*>(this)->load();
     101//
     102//   /* the the single player specific stuff here */
     103//
     104//   /* some static world entities */
     105//   for(int i = 0; i < 100; i++)
     106//   {
     107//     WorldEntity* tmp = new NPCTest1();
     108//     char npcChar[10];
     109//     sprintf (npcChar, "NPC_%d", i);
     110//     tmp->setName(npcChar);
     111//     tmp->setAbsCoor(((float)rand()/RAND_MAX) * 5000, 50/*+ (float)rand()/RAND_MAX*20*/, ((float)rand()/RAND_MAX -.5) *30);
     112//     this->spawn(tmp);
     113//   }
     114// }
    109115
    110 
    111 /**
    112  *  loads the SinglePlayerWorld by initializing all resources, and set their default values.
    113  */
    114 ErrorMessage SinglePlayerWorld::load()
    115 {
    116   static_cast<GameWorld*>(this)->load();
    117 
    118   /* the the single player specific stuff here */
    119 
    120   /* some static world entities */
    121   for(int i = 0; i < 100; i++)
    122   {
    123     WorldEntity* tmp = new NPCTest1();
    124     char npcChar[10];
    125     sprintf (npcChar, "NPC_%d", i);
    126     tmp->setName(npcChar);
    127     tmp->setAbsCoor(((float)rand()/RAND_MAX) * 5000, 50/*+ (float)rand()/RAND_MAX*20*/, ((float)rand()/RAND_MAX -.5) *30);
    128     this->spawn(tmp);
    129   }
    130 }
    131 
    132 
    133 /**
    134  *  post loads the SinglePlayerWorld by initializing all resources, and set their default values.
    135  */
    136 ErrorMessage SinglePlayerWorld::postLoad()
    137 {
    138   static_cast<GameWorld*>(this)->postLoad();
    139 
    140   /* the single player specific stuff here */
    141 }
  • branches/network/src/story_entities/single_player_world.h

    r6360 r6365  
    2727    void loadParams(const TiXmlElement* root);
    2828
    29     ErrorMessage preLoad();
    30     ErrorMessage load ();
    31     ErrorMessage postLoad();
    32 
    3329  private:
    3430    void constuctorInit(const char* name, int worldID);
Note: See TracChangeset for help on using the changeset viewer.