mirror of
https://github.com/overte-org/overte.git
synced 2025-04-29 22:02:38 +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() {
|
||||
var pitchingMachine = null;
|
||||
|
||||
this.startNearGrab = this.continueNearGrab = function() {
|
||||
// send the avatar to the baseball location so that they're ready to bat
|
||||
MyAvatar.location = "/baseball"
|
||||
|
||||
this.pitchAndHideAvatar = function() {
|
||||
if (!pitchingMachine) {
|
||||
pitchingMachine = getOrCreatePitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
}
|
||||
pitchingMachine.start();
|
||||
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() {
|
||||
if (pitchingMachine) {
|
||||
pitchingMachine.stop();
|
||||
|
|
Loading…
Reference in a new issue