mirror of
https://github.com/overte-org/overte.git
synced 2025-08-05 15:10:31 +02:00
Merge pull request #11596 from samcake/RC-57
RC-57 : Fixing the zone entity not rendered properly when created
This commit is contained in:
commit
1fcbf56ab7
1 changed files with 15 additions and 13 deletions
|
@ -237,19 +237,7 @@ void EntityTreeRenderer::update(bool simulate) {
|
||||||
EntityTreePointer tree = std::static_pointer_cast<EntityTree>(_tree);
|
EntityTreePointer tree = std::static_pointer_cast<EntityTree>(_tree);
|
||||||
tree->update(simulate);
|
tree->update(simulate);
|
||||||
|
|
||||||
if (simulate) {
|
// Update the rendereable entities as needed
|
||||||
// Handle enter/leave entity logic
|
|
||||||
checkEnterLeaveEntities();
|
|
||||||
|
|
||||||
// Even if we're not moving the mouse, if we started clicking on an entity and we have
|
|
||||||
// not yet released the hold then this is still considered a holdingClickOnEntity event
|
|
||||||
// and we want to simulate this message here as well as in mouse move
|
|
||||||
if (_lastPointerEventValid && !_currentClickingOnEntityID.isInvalidID()) {
|
|
||||||
emit holdingClickOnEntity(_currentClickingOnEntityID, _lastPointerEvent);
|
|
||||||
_entitiesScriptEngine->callEntityScriptMethod(_currentClickingOnEntityID, "holdingClickOnEntity", _lastPointerEvent);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
{
|
||||||
PerformanceTimer sceneTimer("scene");
|
PerformanceTimer sceneTimer("scene");
|
||||||
auto scene = _viewState->getMain3DScene();
|
auto scene = _viewState->getMain3DScene();
|
||||||
|
@ -269,6 +257,20 @@ void EntityTreeRenderer::update(bool simulate) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (simulate) {
|
||||||
|
// Handle enter/leave entity logic
|
||||||
|
checkEnterLeaveEntities();
|
||||||
|
|
||||||
|
// Even if we're not moving the mouse, if we started clicking on an entity and we have
|
||||||
|
// not yet released the hold then this is still considered a holdingClickOnEntity event
|
||||||
|
// and we want to simulate this message here as well as in mouse move
|
||||||
|
if (_lastPointerEventValid && !_currentClickingOnEntityID.isInvalidID()) {
|
||||||
|
emit holdingClickOnEntity(_currentClickingOnEntityID, _lastPointerEvent);
|
||||||
|
_entitiesScriptEngine->callEntityScriptMethod(_currentClickingOnEntityID, "holdingClickOnEntity", _lastPointerEvent);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue