diff --git a/examples/baseball/bat.js b/examples/baseball/bat.js index 1ec85021c8..2eaf9df31f 100644 --- a/examples/baseball/bat.js +++ b/examples/baseball/bat.js @@ -2,17 +2,14 @@ Script.include("pitching.js"); var pitchingMachine = null; this.startNearGrab = function() { + print("Started near grab!"); if (!pitchingMachine) { - getPitchingMachine(); + pitchingMachine = getPitchingMachine(); Script.update.connect(function(dt) { pitchingMachine.update(dt); }); } - print("Started near grab!"); pitchingMachine.start(); MyAvatar.shouldRenderLocally = false; }; - this.continueNearGrab = function() { - MyAvatar.shouldRenderLocally = false; - } this.releaseGrab = function() { print("Stopped near grab!"); if (pitchingMachine) {