Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6250 in orxonox.OLD for branches/network/src/story_entities


Ignore:
Timestamp:
Dec 21, 2005, 4:29:15 PM (19 years ago)
Author:
patrick
Message:

network: network game manager now sounds good

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/story_entities/network_world.cc

    r6239 r6250  
    7070#include "playable.h"
    7171#include "network_manager.h"
     72#include "network_game_manager.h"
    7273#include "playable.h"
    7374
     
    168169{
    169170  this->setClassID(CL_WORLD, "NetworkWorld");
     171  PRINTF(0)("START\n");
    170172
    171173  this->setName(name);
     
    354356      {
    355357
    356         BaseObject* created = Factory::fabricate(element);
     358        BaseObject* created = NetworkGameManager::getInstance()->createEntity(element);
    357359        if( created != NULL )
    358360        {
     
    361363          printf("Created a %s: %s\n", created->getClassName(), created->getName());
    362364        }
     365        else
     366          PRINTF(1)("NetworkWorld: could not create this entity\n");
    363367
    364368          // if we load a 'Player' we use it as localPlayer
     
    442446//   this->spawn(testEntity);
    443447
    444   for(int i = 0; i < 100; i++)
    445   {
    446     WorldEntity* tmp = new NPCTest1();
    447     char npcChar[10];
    448     sprintf (npcChar, "NPC_%d", i);
    449         tmp->setName(npcChar);
    450     tmp->setAbsCoor(((float)rand()/RAND_MAX) * 5000, 50/*+ (float)rand()/RAND_MAX*20*/, ((float)rand()/RAND_MAX -.5) *30);
    451     this->spawn(tmp);
    452   }
     448//   for(int i = 0; i < 100; i++)
     449//   {
     450//     WorldEntity* tmp = NetworkGameManager::;
     451//     char npcChar[10];
     452//     sprintf (npcChar, "NPC_%d", i);
     453//         tmp->setName(npcChar);
     454//     tmp->setAbsCoor(((float)rand()/RAND_MAX) * 5000, 50/*+ (float)rand()/RAND_MAX*20*/, ((float)rand()/RAND_MAX -.5) *30);
     455//     this->spawn(tmp);
     456//   }
    453457
    454458  this->music = NULL;
Note: See TracChangeset for help on using the changeset viewer.