Changeset 6083 in orxonox.OLD for branches/network
- Timestamp:
- Dec 13, 2005, 11:31:50 AM (19 years ago)
- Location:
- branches/network/src/world_entities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/network/src/world_entities/spawning_point.cc
r6081 r6083 22 22 * standard constructor 23 23 */ 24 SpawningPoint::SpawningPoint (const Vector& absCoordinate )24 SpawningPoint::SpawningPoint (const Vector& absCoordinate, const World* world) 25 25 {} 26 26 … … 29 29 * constructor 30 30 */ 31 SpawningPoint::SpawningPoint (const Vector& position, float frequency, float seed, int classID) 31 SpawningPoint::SpawningPoint (const Vector& position, float frequency, 32 float seed, int classID, const World* world) 33 : WorldEntity(position) 32 34 { 35 this->frequency = frequency; 36 this->seed = seed; 37 this->classID = classID; 38 this->world = world; 33 39 } 34 40 … … 45 51 */ 46 52 void SpawningPoint::spawn() 47 {} 53 { 54 PRINTF(5)("Spangingpoint creates a new Entity (id: %i, frequency: %f, seed: %f)\n", this->classID, 55 this->frequency, this->seed); 56 BaseObject* spawningEntity = Factory::fabricate(this->classID); 57 if( LIKELY(this->world != NULL)) 58 this->world->spawn(dynamic_cast<WorldEntity*>(spawningEntity)); 59 } 48 60 49 61 -
branches/network/src/world_entities/spawning_point.h
r6081 r6083 10 10 #include "world_entity.h" 11 11 12 class World; 13 12 14 //! The spawning point for world entities 13 15 class SpawningPoint : public WorldEntity { 14 16 15 17 public: 16 SpawningPoint (const Vector& absCoordinate = Vector(0.0, 0.0, 0.0) );17 SpawningPoint (const Vector& position, float frequency, float seed, int classID );18 SpawningPoint (const Vector& absCoordinate = Vector(0.0, 0.0, 0.0), const World* world); 19 SpawningPoint (const Vector& position, float frequency, float seed, int classID, const World* world); 18 20 virtual ~SpawningPoint (); 19 21
Note: See TracChangeset
for help on using the changeset viewer.