1234567891011121314151617181920212223242526 |
- #include "WorldUpdate.h"
- #include "Registries.h"
- #include <Text.h>
- WorldUpdateType::WorldUpdateType(int id)
- : ReferenceCounter(),
- id(id)
- {
- STATIC_REGISTRY(WorldUpdateType).registerT(this, id);
- }
- void WorldUpdateType::applyUpdateAndCheck(Framework::StreamReader* zReader)
- {
- this->applyUpdate(zReader);
- int id;
- zReader->lese((char*)&id, 4);
- if (id != this->id)
- {
- Framework::Text* t = new Framework::Text("asynchony after world update of type ");
- t->append(this->id);
- t->append(". ID received from server was: ");
- t->append(id);
- throw t->getText();
- }
- }
|