mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
handle case where user grab data didn't have a heartbeat
This commit is contained in:
parent
0e028fbac8
commit
acd2caf26c
1 changed files with 2 additions and 1 deletions
|
@ -1731,7 +1731,8 @@ function MyController(hand) {
|
|||
};
|
||||
Entities.editEntity(entityID, whileHeldProperties);
|
||||
} else if (data["refCount"] > 1) {
|
||||
if (now - data["heartBeat"] > HEART_BEAT_TIMEOUT) {
|
||||
if (data["heartBeat"] === undefined ||
|
||||
now - data["heartBeat"] > HEART_BEAT_TIMEOUT) {
|
||||
// this entity has userData suggesting it is grabbed, but nobody is updating the hearbeat.
|
||||
// deactivate it before grabbing.
|
||||
this.resetAbandonedGrab(entityID);
|
||||
|
|
Loading…
Reference in a new issue