mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 22:51:20 +02:00
Handle AC script not being able to create an entity
This commit is contained in:
parent
1cc215e14b
commit
6a88398e8e
1 changed files with 13 additions and 9 deletions
|
@ -74,9 +74,12 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
entityID = Entities.addEntity(properties);
|
entityID = Entities.addEntity(properties);
|
||||||
// TODO: Handle failure adding entity?
|
if (!Uuid.isNull(entityID)) {
|
||||||
|
updateTimestampTimer = Script.setInterval(onUpdateTimestamp, TIMESTAMP_UPDATE_INTERVAL);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
updateTimestampTimer = Script.setInterval(onUpdateTimestamp, TIMESTAMP_UPDATE_INTERVAL);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
function find(scriptUUID) {
|
function find(scriptUUID) {
|
||||||
|
@ -205,13 +208,14 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
function play(recording, position, orientation) {
|
function play(recording, position, orientation) {
|
||||||
isPlayingRecording = true;
|
if (Entity.create(recordingFilename, position, orientation, scriptUUID)) {
|
||||||
recordingFilename = recording;
|
log("Play new recording " + recordingFilename);
|
||||||
|
isPlayingRecording = true;
|
||||||
log("Play new recording " + recordingFilename);
|
recordingFilename = recording;
|
||||||
|
playRecording(recordingFilename, position, orientation);
|
||||||
Entity.create(recordingFilename, position, orientation, scriptUUID);
|
} else {
|
||||||
playRecording(recordingFilename, position, orientation);
|
log("Could not create entity to play new recording " + recordingFilename);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function autoPlay() {
|
function autoPlay() {
|
||||||
|
|
Loading…
Reference in a new issue