mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-13 13:13:02 +02:00
Fix BUGZ-1197 (and others): Ensure enterEntity is emitted when avatar is inside entity and script is reloaded
This commit is contained in:
parent
ba7f9f410b
commit
b45e670d21
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