mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 20:23:06 +02:00
safer clear grab actions
This commit is contained in:
parent
d1bb11562b
commit
8cbe0f4633
1 changed files with 2 additions and 1 deletions
|
@ -784,11 +784,12 @@ EquipHotspotBuddy.prototype.update = function(deltaTime, timestamp, controllerDa
|
||||||
|
|
||||||
var clearGrabActions = function(entityID) {
|
var clearGrabActions = function(entityID) {
|
||||||
var actionIDs = Entities.getActionIDs(entityID);
|
var actionIDs = Entities.getActionIDs(entityID);
|
||||||
|
var myGrabTag = "grab-" + MyAvatar.sessionUUID;
|
||||||
for (var actionIndex = 0; actionIndex < actionIDs.length; actionIndex++) {
|
for (var actionIndex = 0; actionIndex < actionIDs.length; actionIndex++) {
|
||||||
var actionID = actionIDs[actionIndex];
|
var actionID = actionIDs[actionIndex];
|
||||||
var actionArguments = Entities.getActionArguments(entityID, actionID);
|
var actionArguments = Entities.getActionArguments(entityID, actionID);
|
||||||
var tag = actionArguments.tag;
|
var tag = actionArguments.tag;
|
||||||
if (tag.slice(0, 5) === "grab-") {
|
if (tag === myGrabTag) {
|
||||||
Entities.deleteAction(entityID, actionID);
|
Entities.deleteAction(entityID, actionID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue