mirror of
https://github.com/overte-org/overte.git
synced 2025-04-30 08:42:43 +02:00
don't force location in continueNearGrab
This commit is contained in:
parent
917b746a68
commit
cea2e0fafd
1 changed files with 12 additions and 4 deletions
|
@ -14,18 +14,26 @@ Script.include("pitching.js");
|
||||||
(function() {
|
(function() {
|
||||||
var pitchingMachine = null;
|
var pitchingMachine = null;
|
||||||
|
|
||||||
this.startNearGrab = this.continueNearGrab = function() {
|
this.pitchAndHideAvatar = function() {
|
||||||
// send the avatar to the baseball location so that they're ready to bat
|
|
||||||
MyAvatar.location = "/baseball"
|
|
||||||
|
|
||||||
if (!pitchingMachine) {
|
if (!pitchingMachine) {
|
||||||
pitchingMachine = getOrCreatePitchingMachine();
|
pitchingMachine = getOrCreatePitchingMachine();
|
||||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||||
}
|
}
|
||||||
pitchingMachine.start();
|
pitchingMachine.start();
|
||||||
MyAvatar.shouldRenderLocally = false;
|
MyAvatar.shouldRenderLocally = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.startNearGrab = function() {
|
||||||
|
// send the avatar to the baseball location so that they're ready to bat
|
||||||
|
MyAvatar.location = "/baseball"
|
||||||
|
|
||||||
|
pitchAndHideAvatar()
|
||||||
};
|
};
|
||||||
|
|
||||||
|
this.continueNearGrab = function() {
|
||||||
|
pitchAndHideAvatar()
|
||||||
|
}
|
||||||
|
|
||||||
this.releaseGrab = function() {
|
this.releaseGrab = function() {
|
||||||
if (pitchingMachine) {
|
if (pitchingMachine) {
|
||||||
pitchingMachine.stop();
|
pitchingMachine.stop();
|
||||||
|
|
Loading…
Reference in a new issue