Changeset 9417 in orxonox.OLD for branches/terrain
- Timestamp:
- Jul 24, 2006, 1:23:47 PM (18 years ago)
- Location:
- branches/terrain/src
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/terrain/src/lib/collision_detection/cd_engine.cc
r9406 r9417 24 24 #include "model.h" 25 25 #include "world_entity.h" 26 #include "terrain .h"26 #include "terrain_entity.h" 27 27 // #include "player.h" 28 28 -
branches/terrain/src/lib/collision_detection/cd_engine.h
r8186 r9417 16 16 class WorldEntity; 17 17 class OBBTree; 18 class Terrain ;18 class TerrainEntity; 19 19 class BspManager; 20 20 //class Player; … … 50 50 inline void disable(const int options) { int temp = this->state & options; this->state ^= temp; } 51 51 52 inline void setTerrain(Terrain * terrain) { this->terrain = terrain; }52 inline void setTerrain(TerrainEntity* terrain) { this->terrain = terrain; } 53 53 inline void setBSPModel(BspManager* bspManager) { this->bspManager = bspManager; } 54 54 … … 83 83 OBBTree* rootTree; //!< for testing purposes a root tree 84 84 85 Terrain *terrain; //!< this it a ref to the terrain, serving as a ground for all WE85 TerrainEntity* terrain; //!< this it a ref to the terrain, serving as a ground for all WE 86 86 BspManager* bspManager; 87 87 }; -
branches/terrain/src/lib/graphics/importer/bsp_file.cc
r9414 r9417 102 102 this->numTextures = lump.length/sizeof(BspTexture); 103 103 this->textures = new char[lump.length]; 104 file.seekg( lump.offset ); 105 file.read( TEXTURE_SEMANTICS, this->numTextures, 104 file.seekg( lump.offset ); 105 file.read( TEXTURE_SEMANTICS, this->numTextures, 106 106 this->textures, slurpedBytes ); 107 107 } 108 108 void BspFile::readPlanes() 109 { 109 { 110 110 size_t slurpedBytes; 111 111 bsp_lump& lump = header.lumps[Planes]; … … 113 113 this->planes = new plane[this->numPlanes]; 114 114 file.seekg( lump.offset ); 115 file.read( PLANE_SEMANTICS, this->numPlanes, 115 file.read( PLANE_SEMANTICS, this->numPlanes, 116 116 this->planes, slurpedBytes ); 117 117 } … … 124 124 this->nodes = new node[this->numNodes]; 125 125 file.seekg( lump.offset ); 126 file.read( NODE_SEMANTICS, this->numNodes, 126 file.read( NODE_SEMANTICS, this->numNodes, 127 127 this->nodes, slurpedBytes ); 128 128 } … … 135 135 this->leaves = new leaf[this->numLeafs]; 136 136 file.seekg( lump.offset ); 137 file.read( LEAF_SEMANTICS, this->numLeafs, 138 this->leaves, slurpedBytes ); 137 file.read( LEAF_SEMANTICS, this->numLeafs, 138 this->leaves, slurpedBytes ); 139 139 } 140 140 … … 146 146 this->leafFaces = (char*)( new int[this->numLeafFaces] ); 147 147 file.seekg( lump.offset ); 148 file.read( "i", this->numLeafFaces, 148 file.read( "i", this->numLeafFaces, 149 149 this->leafFaces, slurpedBytes ); 150 150 } … … 157 157 this->leafBrushes = (char*) ( new int[this->numLeafBrushes] ); 158 158 file.seekg( lump.offset ); 159 file.read( "i", this->numLeafBrushes, 160 this->leafBrushes, slurpedBytes ); 159 file.read( "i", this->numLeafBrushes, 160 this->leafBrushes, slurpedBytes ); 161 161 } 162 162 … … 168 168 this->bspModels = new model[this->numBspModels]; 169 169 file.seekg( lump.offset ); 170 file.read( MODEL_SEMANTICS, this->numBspModels, 170 file.read( MODEL_SEMANTICS, this->numBspModels, 171 171 this->bspModels, slurpedBytes ); 172 172 } … … 179 179 this->brushes = new brush[numBrushes]; 180 180 file.seekg( lump.offset ); 181 file.read( BRUSH_SEMANTICS, numBrushes, 181 file.read( BRUSH_SEMANTICS, numBrushes, 182 182 this->brushes, slurpedBytes ); 183 183 } … … 189 189 this->vertice = (char*)( new BspVertex[this->numVertex] ); 190 190 file.seekg( lump.offset ); 191 file.read( VERTEX_SEMANTICS, this->numVertex, 191 file.read( VERTEX_SEMANTICS, this->numVertex, 192 192 this->vertice, slurpedBytes ); 193 193 } … … 215 215 this->faces = new face[this->numFaces]; 216 216 file.seekg( lump.offset ); 217 file.read( FACE_SEMANTICS, this->numFaces, 217 file.read( FACE_SEMANTICS, this->numFaces, 218 218 this->faces, slurpedBytes ); 219 219 } … … 226 226 this->lightMaps = new lightmap[this->numLightMaps]; 227 227 file.seekg( lump.offset ); 228 file.read( LIGHTMAP_SEMANTICS, this->numLightMaps, 228 file.read( LIGHTMAP_SEMANTICS, this->numLightMaps, 229 229 this->lightMaps, slurpedBytes ); 230 230 } 231 231 void BspFile::readLightvols() 232 232 { 233 /* not loaded atm */ 233 /* not loaded atm */ 234 234 } 235 235 void BspFile::readBrushSides() … … 241 241 this->brushSides = new brushside[this->numBrushSides]; 242 242 file.seekg( lump.offset ); 243 file.read( BRUSHSIDE_SEMANTICS, this->numBrushSides, 243 file.read( BRUSHSIDE_SEMANTICS, this->numBrushSides, 244 244 this->brushSides, slurpedBytes ); 245 245 } … … 251 251 file.seekg( lump.offset ); 252 252 file.read( "i2", 1, this->visData, slurpedBytes ); 253 file.read( "b", lump.length-8, 254 this->visData+8, slurpedBytes ); 253 file.read( "b", lump.length-8, 254 this->visData+8, slurpedBytes ); 255 255 } 256 256 /** … … 267 267 if (file.exists() && file.open( File::ReadOnly ) ) { 268 268 PRINTF(0)("BSP FILE: Datei %s gefunden. \n", name); 269 269 270 270 //BSP-Files have little endian order. 271 271 file.setByteorder( LittleEndian ); 272 272 file.read( HEADER_SEMANTICS, (void*)&header, slurpedBytes ); 273 273 if ( header.version != 46 ) { 274 PRINTF(0)("BSP FILE: Wrong BSPVersion. We only handle 0x2e-files!\n"); 275 //!< now, we should do some error handling 274 PRINTF(0)("BSP FILE: Wrong BSPVersion. We only handle 0x2e-files!\n"); 275 //!< now, we should do some error handling 276 276 return ( -1 ); 277 277 } … … 280 280 readPlanes(); 281 281 readNodes(); 282 readLeafs(); readLeafFaces(); readLeafBrushes(); 283 readModels(); 282 readLeafs(); readLeafFaces(); readLeafBrushes(); 283 readModels(); 284 284 readVertices(); readMeshVerts(); 285 285 readBrushSides(); readBrushes(); … … 287 287 readFaces(); 288 288 readLightmaps(); readLightvols(); 289 readVisdata( 289 readVisdata(); 290 290 file.close(); 291 291 -
branches/terrain/src/lib/graphics/importer/md3/md3_animation_cfg.cc
r9414 r9417 174 174 } 175 175 }*/ 176 */ 176 177 177 } 178 178 -
branches/terrain/src/lib/graphics/importer/terrain/terrain_quad.h
r9414 r9417 1 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 4 4 Copyright (C) 2006 orx 5 5 6 6 This program is free software; you can redistribute it and/or modify 7 7 it under the terms of the GNU General Public License as published by 8 8 the Free Software Foundation; either version 2, or (at your option) 9 9 any later version. 10 10 11 11 ### File Specific: 12 12 main programmer: Marco Biasini 13 13 14 14 */ 15 15 #ifndef _TERRAIN_QUAD_TREE_H … … 24 24 25 25 typedef enum { TL_CHILD = 0, TR_CHILD = 1, BL_CHILD = 2, BR_CHILD = 3 } TerrainQuadChild; 26 26 27 27 class TerrainQuad { 28 28 public: 29 29 TerrainQuad( Terrain *_owner, int _xOffset, int _zOffset ); 30 30 TerrainQuad( Terrain *_owner, int _x0, int _z0, int _x1, int _z1 ); 31 32 virtual ~TerrainQuad( ) 31 32 virtual ~TerrainQuad( ) 33 33 { 34 34 for ( int i = 0; i < 4; ++i ) { 35 35 if ( !children[i]->isChildless() ) 36 36 SAVE_DELETE( children[i] ); 37 } 37 } 38 38 } 39 39 int cull( ); 40 40 41 41 /** 42 42 * Returns the array containing the children quad-nodes of this node in the following 43 43 * order: top-left, top-right, bottom-left, bottom-right 44 44 */ 45 inline pTerrainQuad* getChildren( ) 46 { 47 return children; 45 inline pTerrainQuad* getChildren( ) 46 { 47 return children; 48 48 } 49 49 50 50 /** 51 51 * Sets the child-nodes to the specified _children elements. … … 56 56 children[i] = _children[i]; 57 57 } 58 58 59 59 inline bool isChildless() { return ( children[0] == NULL ); } 60 60 61 61 /** 62 62 * Returns the child node given by _child. The returned node may be null. 63 63 */ 64 inline pTerrainQuad getChild( TerrainQuadChild _child ) 65 { 66 return children[_child]; 64 inline pTerrainQuad getChild( TerrainQuadChild _child ) 65 { 66 return children[_child]; 67 67 } 68 68 inline void setScale( Vector _scale ) … … 88 88 inline int getWidth() { return width; } 89 89 inline int getHeight() { return height; } 90 90 91 91 protected: 92 92 TerrainQuad( ) {} -
branches/terrain/src/lib/math/plane.h
r9110 r9417 47 47 Plane () : n(Vector(1,1,1)), k(0) {} 48 48 ~Plane () {} 49 49 inline const Plane& operator= ( const Plane& _p ) 50 { 51 this->n = _p.n; 52 this->k = _p.k; 53 return *this; 54 } 50 55 Vector intersectLine (const Line& l) const; 51 56 float distancePoint (const Vector& p) const; -
branches/terrain/src/lib/util/filesys/binary_file.cc
r9415 r9417 5 5 int bytesize( const char _c ) 6 6 { 7 switch( _c) { 8 case 'f': 9 case 'i': 10 return 4; 11 case 'b': 12 return 1; 13 case 's': 14 return 2; 15 default: 16 return 0; 17 } 7 switch( _c) 8 { 9 case 'f': 10 case 'i': 11 return 4; 12 case 'b': 13 return 1; 14 case 's': 15 return 2; 16 default: 17 return 0; 18 } 18 19 } 19 20 20 21 pDataSemantics BinaryFile::compileSemantics( const char *_semantics ) 21 22 { 22 const char *curr = _semantics; 23 char *tmp = new char[strlen(_semantics)]; 24 //Find out how many subchunks exist. 25 pDataSemantics chunk = new DataSemantics(); 26 bool terminated = false; 27 int open = 0; 28 while ( *curr ) { 29 switch( *curr ) { 30 case 'i': 31 case 'f': 32 case 'b': 33 case 's': 34 chunk->numChunkNodes++; 35 break; 36 case '(': 37 terminated = false; 38 chunk->numChunkNodes++; 39 while ( *curr && terminated == false ) { 40 if ( *curr == ')' ) 41 terminated = true; 42 curr++; 43 } 44 if ( !terminated ) { 45 printf( "Syntax error: ')' is missing" ); 46 delete chunk; 47 return NULL; 48 } 49 break; 50 default: 51 break; 52 } 53 curr++; 54 } 55 //Compile the chunks... 56 chunk->chunks = new pDataSemantics[chunk->numChunkNodes]; 57 int currChunk = 0; 58 curr = _semantics; 59 while ( *curr ) { 60 switch( *curr ) { 61 case 'i': 62 case 'f': 63 case 'b': 64 case 's': 65 chunk->chunks[currChunk] = new DataSemantics(); 66 chunk->chunks[currChunk]->isTerminal = true; 67 chunk->chunks[currChunk]->type = bytesize( *curr ); 68 chunk->chunks[currChunk]->totalSize = bytesize( *curr ); 69 currChunk++; 70 break; 71 case '(': 72 curr++; 73 open = 0; 74 memset( tmp, 0, strlen( _semantics ) ); 75 char * cp = tmp; 76 while ( *curr ) { 77 if ( *curr == '(' ) 78 open++; 79 if ( *curr == ')' ) { 80 if ( open ) 81 open--; 82 else 83 break; 84 } 85 *cp = *curr; 86 cp++; 87 curr++; 88 } 89 *cp = '\0'; 90 chunk->chunks[currChunk] = compileSemantics( tmp ); 91 currChunk++; 92 break; 93 case ')': 94 printf( "Syntax error: ')' shouldn't appear here\n" ); 95 delete[] tmp; delete chunk; 96 return NULL; 97 break; 98 default: 99 int multiplier = 1, quantifier = 0; 100 const char *start = curr; 101 const char *end = curr; 102 while ( isdigit( *end ) ) { 103 end++; 104 } 105 for ( const char *d = end-1; d >=start; --d ) { 106 quantifier+=multiplier*(*d-'0'); 107 multiplier*=10; 108 } 109 if ( start == end ) { 110 printf( "Syntax error: '%c' is not known.\n", *curr ); 111 delete[] tmp; delete chunk; 112 return NULL; 113 } 114 if ( currChunk ) { 115 chunk->chunks[currChunk-1]->quantifier = quantifier; 116 chunk->chunks[currChunk-1]->totalSize*= quantifier; 117 } 118 else { 119 printf( "Syntax error: Quantifier without a preceding type\n" ); 120 delete[] tmp; delete chunk; 121 return NULL; 122 } 123 curr = end-1; 124 break; 125 } 126 curr++; 127 } 128 for ( int i = 0; i < chunk->numChunkNodes; ++i ) { 129 chunk->totalSize+= chunk->chunks[i]->totalSize; 130 } 131 delete[] tmp; 132 return chunk; 23 const char *curr = _semantics; 24 char *tmp = new char[strlen(_semantics)]; 25 //Find out how many subchunks exist. 26 pDataSemantics chunk = new DataSemantics(); 27 bool terminated = false; 28 int open = 0; 29 while ( *curr ) 30 { 31 switch( *curr ) 32 { 33 case 'i': 34 case 'f': 35 case 'b': 36 case 's': 37 chunk->numChunkNodes++; 38 break; 39 case '(': 40 terminated = false; 41 chunk->numChunkNodes++; 42 while ( *curr && terminated == false ) 43 { 44 if ( *curr == ')' ) 45 terminated = true; 46 curr++; 47 } 48 if ( !terminated ) 49 { 50 printf( "Syntax error: ')' is missing" ); 51 delete chunk; 52 return NULL; 53 } 54 break; 55 default: 56 break; 57 } 58 curr++; 59 } 60 //Compile the chunks... 61 chunk->chunks = new pDataSemantics[chunk->numChunkNodes]; 62 int currChunk = 0; 63 curr = _semantics; 64 while ( *curr ) 65 { 66 switch( *curr ) 67 { 68 case 'i': 69 case 'f': 70 case 'b': 71 case 's': 72 chunk->chunks[currChunk] = new DataSemantics(); 73 chunk->chunks[currChunk]->isTerminal = true; 74 chunk->chunks[currChunk]->type = bytesize( *curr ); 75 chunk->chunks[currChunk]->totalSize = bytesize( *curr ); 76 currChunk++; 77 break; 78 case '(': { 79 curr++; 80 open = 0; 81 memset( tmp, 0, strlen( _semantics ) ); 82 char * cp = tmp; 83 while ( *curr ) 84 { 85 if ( *curr == '(' ) 86 open++; 87 if ( *curr == ')' ) 88 { 89 if ( open ) 90 open--; 91 else 92 break; 93 } 94 *cp = *curr; 95 cp++; 96 curr++; 97 } 98 *cp = '\0'; 99 chunk->chunks[currChunk] = compileSemantics( tmp ); 100 currChunk++; 101 } 102 break; 103 case ')': 104 printf( "Syntax error: ')' shouldn't appear here\n" ); 105 delete[] tmp; delete chunk; 106 return NULL; 107 break; 108 default: 109 int multiplier = 1, quantifier = 0; 110 const char *start = curr; 111 const char *end = curr; 112 while ( isdigit( *end ) ) 113 { 114 end++; 115 } 116 for ( const char *d = end-1; d >=start; --d ) 117 { 118 quantifier+=multiplier*(*d-'0'); 119 multiplier*=10; 120 } 121 if ( start == end ) 122 { 123 printf( "Syntax error: '%c' is not known.\n", *curr ); 124 delete[] tmp; delete chunk; 125 return NULL; 126 } 127 if ( currChunk ) 128 { 129 chunk->chunks[currChunk-1]->quantifier = quantifier; 130 chunk->chunks[currChunk-1]->totalSize*= quantifier; 131 } 132 else 133 { 134 printf( "Syntax error: Quantifier without a preceding type\n" ); 135 delete[] tmp; delete chunk; 136 return NULL; 137 } 138 curr = end-1; 139 break; 140 } 141 curr++; 142 } 143 for ( int i = 0; i < chunk->numChunkNodes; ++i ) 144 { 145 chunk->totalSize+= chunk->chunks[i]->totalSize; 146 } 147 delete[] tmp; 148 return chunk; 133 149 } 134 150 135 151 void convert_data( pDataSemantics _comp, void *_data ) 136 152 { 137 char *ptr = (char*)_data; 138 short *sptr; 139 int *iptr; 140 if ( _comp->isTerminal ) { 141 switch( _comp->type ) { 142 case TT_INT: 143 iptr = (int*)ptr; 144 for ( int i = 0; i < _comp->quantifier; ++i ) { 145 swap32( iptr ); 146 iptr++; 147 } 148 break; 149 case TT_SHORT: 150 sptr = (short*)ptr; 151 for ( int i = 0; i < _comp->quantifier; ++i ) { 152 swap16( sptr ); 153 sptr++; 154 } 155 break; 156 case TT_BYTE: 157 break; 158 } 159 } 160 else { 161 for ( int j = 0; j < _comp->quantifier; ++j ) { 162 for ( int i = 0; i < _comp->numChunkNodes; ++i ) { 163 convert_data( _comp->chunks[i], ptr ); 164 ptr+= _comp->chunks[i]->totalSize; 165 } 166 } 167 168 } 153 char *ptr = (char*)_data; 154 short *sptr; 155 int *iptr; 156 if ( _comp->isTerminal ) 157 { 158 switch( _comp->type ) 159 { 160 case TT_INT: 161 iptr = (int*)ptr; 162 for ( int i = 0; i < _comp->quantifier; ++i ) 163 { 164 swap32( iptr ); 165 iptr++; 166 } 167 break; 168 case TT_SHORT: 169 sptr = (short*)ptr; 170 for ( int i = 0; i < _comp->quantifier; ++i ) 171 { 172 swap16( sptr ); 173 sptr++; 174 } 175 break; 176 case TT_BYTE: 177 break; 178 } 179 } 180 else 181 { 182 for ( int j = 0; j < _comp->quantifier; ++j ) 183 { 184 for ( int i = 0; i < _comp->numChunkNodes; ++i ) 185 { 186 convert_data( _comp->chunks[i], ptr ); 187 ptr+= _comp->chunks[i]->totalSize; 188 } 189 } 190 191 } 169 192 } 170 193 void BinaryFile::read( const char *_semantics, int _chunks, 171 void* _buf, size_t& _bytesRead ) 172 { 173 pDataSemantics comp = compileSemantics( _semantics ); 174 fread( _buf, comp->totalSize, _chunks, this->handle() ); 175 if ( byteorder != NATIVE_BYTEORDER ) { 176 for ( int i = 0; i < _chunks; ++i ) { 177 convert_data( comp, (char*)_buf+i*comp->totalSize ); 178 } 179 } 180 _bytesRead = comp->totalSize*_chunks; 181 delete comp; 194 void* _buf, size_t& _bytesRead ) 195 { 196 pDataSemantics comp = compileSemantics( _semantics ); 197 fread( _buf, comp->totalSize, _chunks, this->handle() ); 198 if ( byteorder != NATIVE_BYTEORDER ) 199 { 200 for ( int i = 0; i < _chunks; ++i ) 201 { 202 convert_data( comp, (char*)_buf+i*comp->totalSize ); 203 } 204 } 205 _bytesRead = comp->totalSize*_chunks; 206 delete comp; 182 207 } 183 208 void BinaryFile::read( const char *_semantics, 184 void* _buf, size_t& _bytesRead ) 185 { 186 pDataSemantics comp = compileSemantics( _semantics ); 187 fread( _buf, comp->totalSize, 1, this->handle() ); 188 189 if ( byteorder != NATIVE_BYTEORDER ) { 190 convert_data( comp, _buf ); 191 } 192 delete comp; 209 void* _buf, size_t& _bytesRead ) 210 { 211 pDataSemantics comp = compileSemantics( _semantics ); 212 fread( _buf, comp->totalSize, 1, this->handle() ); 213 214 if ( byteorder != NATIVE_BYTEORDER ) 215 { 216 convert_data( comp, _buf ); 217 } 218 delete comp; 193 219 } 194 220 195 221 void BinaryFile::write( const char *_semantics, 196 void* _buf, size_t& _bytesWritten ) 197 { 198 pDataSemantics comp = compileSemantics( _semantics ); 199 if ( byteorder != NATIVE_BYTEORDER ) { 200 convert_data( comp, _buf ); 201 } 202 _bytesWritten = comp->totalSize; 203 fwrite( _buf, comp->totalSize, 1, this->handle() ); 204 delete comp; 205 } 222 void* _buf, size_t& _bytesWritten ) 223 { 224 pDataSemantics comp = compileSemantics( _semantics ); 225 if ( byteorder != NATIVE_BYTEORDER ) 226 { 227 convert_data( comp, _buf ); 228 } 229 _bytesWritten = comp->totalSize; 230 fwrite( _buf, comp->totalSize, 1, this->handle() ); 231 delete comp; 232 } -
branches/terrain/src/story_entities/game_world.cc
r9406 r9417 30 30 #include "camera.h" 31 31 #include "environment.h" 32 #include "terrain .h"32 #include "terrain_entity.h" 33 33 #include "test_entity.h" 34 #include "terrain .h"34 #include "terrain_entity.h" 35 35 #include "playable.h" 36 36 #include "environments/mapped_water.h" -
branches/terrain/src/story_entities/game_world_data.cc
r9406 r9417 31 31 #include "player.h" 32 32 #include "camera.h" 33 #include "terrain .h"33 #include "terrain_entity.h" 34 34 #include "skybox.h" 35 35 #include "md2/md2Model.h" … … 222 222 if( element->Value() == "Terrain" && created->isA(CL_TERRAIN)) 223 223 { 224 this->terrain = dynamic_cast<Terrain *>(created);224 this->terrain = dynamic_cast<TerrainEntity*>(created); 225 225 CDEngine::getInstance()->setTerrain(terrain); 226 226 } -
branches/terrain/src/story_entities/game_world_data.h
r9406 r9417 14 14 class Camera; 15 15 class Player; 16 class Terrain ;16 class TerrainEntity; 17 17 class WorldEntity; 18 18 … … 58 58 Player* localPlayer; //!< The player, you fly through the level. 59 59 WorldEntity* sky; //!< The environmental sky of orxonox 60 Terrain *terrain; //!< The terrain - ground60 TerrainEntity* terrain; //!< The terrain - ground 61 61 62 62 OrxSound::OggPlayer* music; //!< Reference to the SoundEngine's music player (OggPlayer) -
branches/terrain/src/story_entities/multi_player_world_data.cc
r9406 r9417 31 31 #include "camera.h" 32 32 #include "environment.h" 33 #include "terrain .h"33 #include "terrain_entity.h" 34 34 #include "test_entity.h" 35 #include "terrain.h"36 35 #include "md2/md2Model.h" 37 36 #include "world_entities/projectiles/projectile.h" … … 161 160 if( element->Value() != NULL && !strcmp( element->Value(), "SkyBox")) 162 161 this->sky = dynamic_cast<WorldEntity*>(created); 163 if( element->Value() != NULL && !strcmp( element->Value(), "Terrain "))162 if( element->Value() != NULL && !strcmp( element->Value(), "TerrainEntityF")) 164 163 { 165 this->terrain = dynamic_cast<Terrain *>(created);164 this->terrain = dynamic_cast<TerrainEntity*>(created); 166 165 CDEngine::getInstance()->setTerrain(terrain); 167 166 } … … 194 193 if( element->Value() != NULL && !strcmp( element->Value(), "Terrain")) 195 194 { 196 this->terrain = dynamic_cast<Terrain *>(created);195 this->terrain = dynamic_cast<TerrainEntity*>(created); 197 196 CDEngine::getInstance()->setTerrain(terrain); 198 197 } -
branches/terrain/src/util/multiplayer_team_deathmatch.cc
r9406 r9417 32 32 33 33 #include "shared_network_data.h" 34 #include "terrain .h"34 #include "terrain_entity.h" 35 35 #include "class_list.h" 36 36 #include "space_ships/space_ship.h"
Note: See TracChangeset
for help on using the changeset viewer.