123456789101112131415161718192021 |
- #include "EntityRemovedUpdate.h"
- #include "Dimension.h"
- EntityRemovedUpdate::EntityRemovedUpdate(int entityId, int dimensionId, Framework::Vec3<int> pos)
- : WorldUpdate(WorldUpdateTypeEnum::REMOVE_ENTITY, dimensionId, pos, pos),
- entityId(entityId)
- {}
- EntityRemovedUpdate::~EntityRemovedUpdate()
- {}
- void EntityRemovedUpdate::onUpdate(Dimension* zDimension)
- {
- zDimension->removeEntity(entityId);
- }
- void EntityRemovedUpdate::write(Framework::StreamWriter* zWriter)
- {
- zWriter->schreibe((char*)&entityId, 4);
- }
|