equal
deleted
inserted
replaced
238 // dimensions? |
238 // dimensions? |
239 PixelCoordinate map = terrain.getDimensions(); |
239 PixelCoordinate map = terrain.getDimensions(); |
240 |
240 |
241 // translate to a byte array |
241 // translate to a byte array |
242 size_t terrain_size = map.x * map.y; |
242 size_t terrain_size = map.x * map.y; |
243 uint8_t terrain_buf[map.x][map.y]; |
243 |
244 |
244 // get terrain buffer |
245 // copy over from terrain vector |
245 const uint8_t *terrain_buf = terrain.getTerrainBuffer(); |
246 for (PixelDimension x = 0; x < map.x; x++) { |
|
247 for (PixelDimension y = 0; y < map.y; y++) { |
|
248 terrain_buf[x][y] = (uint8_t) terrain.terrain[x][y]; |
|
249 } |
|
250 } |
|
251 |
246 |
252 // allocate our packet... |
247 // allocate our packet... |
253 BigNetworkPacket pkt ( |
248 BigNetworkPacket pkt ( |
254 // NetworkChannel header |
249 // NetworkChannel header |
255 NETWORK_SESSION_HEADER_SIZE |
250 NETWORK_SESSION_HEADER_SIZE |