mirror of
https://github.com/overte-org/overte.git
synced 2025-07-23 18:44:00 +02:00
update render-land bounds when polyvox moves
This commit is contained in:
parent
d097fa7982
commit
a14ff22df3
2 changed files with 24 additions and 8 deletions
|
@ -1439,3 +1439,16 @@ void RenderablePolyVoxEntityItem::bonkNeighbors() {
|
||||||
currentZNNeighbor->setVolDataDirty();
|
currentZNNeighbor->setVolDataDirty();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RenderablePolyVoxEntityItem::locationChanged(bool tellPhysics) {
|
||||||
|
EntityItem::locationChanged(tellPhysics);
|
||||||
|
if (!render::Item::isValidID(_myItem)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
render::ScenePointer scene = AbstractViewStateInterface::instance()->getMain3DScene();
|
||||||
|
render::PendingChanges pendingChanges;
|
||||||
|
pendingChanges.updateItem<PolyVoxPayload>(_myItem, [](PolyVoxPayload& payload) {});
|
||||||
|
|
||||||
|
scene->enqueuePendingChanges(pendingChanges);
|
||||||
|
}
|
||||||
|
|
|
@ -141,6 +141,9 @@ public:
|
||||||
// Transparent polyvox didn't seem to be working so disable for now
|
// Transparent polyvox didn't seem to be working so disable for now
|
||||||
bool isTransparent() override { return false; }
|
bool isTransparent() override { return false; }
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void locationChanged(bool tellPhysics = true) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The PolyVoxEntityItem class has _voxelData which contains dimensions and compressed voxel data. The dimensions
|
// The PolyVoxEntityItem class has _voxelData which contains dimensions and compressed voxel data. The dimensions
|
||||||
// may not match _voxelVolumeSize.
|
// may not match _voxelVolumeSize.
|
||||||
|
|
Loading…
Reference in a new issue