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