mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-15 19:49:47 +02:00
only disconnect if connected
This commit is contained in:
parent
66e969fec7
commit
1da1c1dce1
1 changed files with 8 additions and 3 deletions
|
@ -85,18 +85,23 @@
|
|||
var myDate = new Date();
|
||||
var seconds = myDate.getSeconds();
|
||||
secondRollDegrees = -seconds * DEGREES_FOR_SECOND;
|
||||
Entities.editEntity(_this.secondHand, {rotation: Quat.fromPitchYawRollDegrees(0, 0, secondRollDegrees)});
|
||||
Entities.editEntity(_this.secondHand, {
|
||||
rotation: Quat.fromPitchYawRollDegrees(0, 0, secondRollDegrees)
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
unload: function() {
|
||||
Script.update.disconnect(_this.update);
|
||||
if (connected === true) {
|
||||
connected = false;
|
||||
Script.update.disconnect(_this.update);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
update: function() {
|
||||
|
||||
if(iOwn === false) {
|
||||
if (iOwn === false) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue