mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 23:02:24 +02:00
Merge pull request #16039 from zfox23/enterEntityOnReload
Fix BUGZ-1197 (and others): Ensure enterEntity is emitted when avatar is inside entity and script is reloaded
This commit is contained in:
commit
9702fb48b6
1 changed files with 4 additions and 0 deletions
|
@ -1027,6 +1027,10 @@ void EntityTreeRenderer::addingEntity(const EntityItemID& entityID) {
|
|||
|
||||
void EntityTreeRenderer::entityScriptChanging(const EntityItemID& entityID, bool reload) {
|
||||
checkAndCallPreload(entityID, reload, true);
|
||||
// Force "re-checking" entities so that the logic inside `checkEnterLeaveEntities()` is run.
|
||||
// This will ensure that the `enterEntity()` signal is emitted on clients whose avatars
|
||||
// are inside an entity when the script is reloaded.
|
||||
forceRecheckEntities();
|
||||
}
|
||||
|
||||
void EntityTreeRenderer::checkAndCallPreload(const EntityItemID& entityID, bool reload, bool unloadFirst) {
|
||||
|
|
Loading…
Reference in a new issue