Changeset 6087 in orxonox.OLD for branches/network/src
- Timestamp:
- Dec 13, 2005, 1:38:05 PM (19 years ago)
- Location:
- branches/network/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/spawning_point.cc
r6086 r6087 23 23 */ 24 24 SpawningPoint::SpawningPoint (const Vector& absCoordinate, const World* world) 25 : WorldEntity(absCoodrinate)25 : WorldEntity(absCoodrinate) 26 26 { 27 27 this->world = world; … … 37 37 SpawningPoint::SpawningPoint (const Vector& position, float frequency, 38 38 float seed, int classID, const World* world) 39 : WorldEntity(position)39 : WorldEntity(position) 40 40 { 41 41 this->frequency = frequency; … … 60 60 void SpawningPoint::loadParams(const TiXmlElement* root) 61 61 { 62 / / Do the PNode loading stuff63 static_cast< PNode*>(this)->loadParams(root);62 /* let the world entity its stuff first */ 63 static_cast<WorldEntity*>(this)->loadParams(root); 64 64 65 / / Model Loading66 LoadParam(root, " model", this, WorldEntity, loadModel)67 .describe("the fileName of the model, that should be loaded onto this world-entity. (must be relative to the data-dir)")68 .defaultValues(3, NULL, 1.0f, 0);65 /* now load the frequency */ 66 LoadParam(root, "frequency", this, SpawningPoint, setSpawningFrequency) 67 .describe("sets the frequency of the spawning point") 68 .defaultValues(1, 1.0f); 69 69 70 71 /* now load the seed */ 72 LoadParam(root, "randomseed", this, SpawningPoint, setPositionSeed) 73 .describe("sets the random position seed (variance in the spawning location around the position)") 74 .defaultValues(1, 0.0f); 75 76 /* now load the seed */ 77 LoadParam(root, "classid", this, SpawningPoint, setSpawningEntity) 78 .describe("sets the random position seed (variance in the spawning location around the position)") 79 .defaultValues(1, CL_WORLD_ENTITY); 70 80 } 71 81 … … 77 87 { 78 88 PRINTF(5)("Spangingpoint creates a new Entity (id: %i, frequency: %f, seed: %f)\n", this->classID, 79 this->frequency, this->seed);89 this->frequency, this->seed); 80 90 BaseObject* spawningEntity = Factory::fabricate(this->classID); 81 91 if( LIKELY(this->world != NULL)) -
branches/network/src/world_entities/spawning_point.h
r6086 r6087 23 23 void loadParams(const TiXmlElement* root); 24 24 25 void setSpawningEntity(int classID);26 void setSpawningFrequency(float frequency);27 void setPositionSeed(float seed);28 29 25 /** sets the entity that is going to be spawned by this point @param classID: the id from the class_id.h file */ 30 26 void SpawningPoint::setSpawningEntity(int classID) { this->classID = classID; }
Note: See TracChangeset
for help on using the changeset viewer.