mirror of
https://github.com/overte-org/overte.git
synced 2025-04-24 12:13:36 +02:00
Update bat.js to lazy load the pitching machine
This commit is contained in:
parent
d535bb6ed8
commit
bb0ce67f6b
1 changed files with 5 additions and 2 deletions
|
@ -1,8 +1,11 @@
|
|||
(function() {
|
||||
Script.include("pitching.js");
|
||||
var pitchingMachine = getPitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
var pitchingMachine = null;
|
||||
this.startNearGrab = function() {
|
||||
if (!pitchingMachine) {
|
||||
getPitchingMachine();
|
||||
Script.update.connect(function(dt) { pitchingMachine.update(dt); });
|
||||
}
|
||||
print("Started near grab!");
|
||||
pitchingMachine.start();
|
||||
MyAvatar.shouldRenderLocally = false;
|
||||
|
|
Loading…
Reference in a new issue