1234567891011121314151617181920212223242526 |
- #include "EntityRemovedUpdate.h"
- #include "Dimension.h"
- EntityRemovedUpdate::EntityRemovedUpdate(int entityId, int dimensionId, Framework::Vec3<int> pos)
- : WorldUpdate(EntityRemovedUpdateType::ID, 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);
- }
- EntityRemovedUpdateType::EntityRemovedUpdateType()
- : WorldUpdateType(ID)
- {}
|