123456789101112131415161718192021222324252627282930 |
- #include "WorldUpdate.h"
- WorldUpdate::WorldUpdate(int type, int dimensionId, Framework::Vec3<float> pos)
- : ReferenceCounter(),
- affectedDimensionId(dimensionId),
- type(type),
- pos(pos)
- {}
- void WorldUpdate::writeAndCheck(Framework::StreamWriter* zWriter)
- {
- zWriter->schreibe((char*)&type, 4);
- this->write(zWriter);
- zWriter->schreibe((char*)&type, 4);
- }
- int WorldUpdate::getAffectedDimension() const
- {
- return affectedDimensionId;
- }
- int WorldUpdate::getType() const
- {
- return type;
- }
- int WorldUpdate::distanceTo(int x, int y) const
- {
- return pos.abstand(Framework::Vec3<float>((float)x, (float)y, pos.z));
- }
|