123456789101112131415161718192021 |
- #include <Punkt.h>
- #include "AddChunkUpdate.h"
- #include "Chunk.h"
- #include "Globals.h"
- AddChunkUpdateType::AddChunkUpdateType()
- : WorldUpdateType(ID)
- {}
- void AddChunkUpdateType::applyUpdate(Framework::StreamReader* zReader)
- {
- Framework::Punkt center;
- zReader->lese((char*)¢er.x, 4);
- zReader->lese((char*)¢er.y, 4);
- std::cout << "downloading chunk " << center.x << ", " << center.y << "\n";
- Chunk* chunk = new Chunk(center);
- chunk->load(zReader);
- currentGame->setChunk(chunk);
- }
|