mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 16:44:04 +02:00
Fix MS16820: Rate limit Snapshot Polaroids
This commit is contained in:
parent
fe5b13b781
commit
04754d0dab
1 changed files with 13 additions and 1 deletions
|
@ -279,9 +279,21 @@ function onMessage(message) {
|
|||
}
|
||||
|
||||
var POLAROID_PRINT_SOUND = SoundCache.getSound(Script.resourcesPath() + "sounds/snapshot/sound-print-photo.wav");
|
||||
var POLAROID_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/alan/dev/Test/snapshot.fbx';
|
||||
var POLAROID_MODEL_URL = 'http://hifi-content.s3.amazonaws.com/alan/dev/Test/snapshot.fbx';
|
||||
var POLAROID_RATE_LIMIT_MS = 1000;
|
||||
var polaroidPrintingIsRateLimited = false;
|
||||
|
||||
function printToPolaroid(image_url) {
|
||||
|
||||
// Rate-limit printing
|
||||
if (polaroidPrintingIsRateLimited) {
|
||||
return;
|
||||
}
|
||||
polaroidPrintingIsRateLimited = true;
|
||||
Script.setTimeout(function () {
|
||||
polaroidPrintingIsRateLimited = false;
|
||||
}, POLAROID_RATE_LIMIT_MS);
|
||||
|
||||
var polaroid_url = image_url;
|
||||
|
||||
var model_pos = Vec3.sum(MyAvatar.position, Vec3.multiply(1.25, Quat.getForward(MyAvatar.orientation)));
|
||||
|
|
Loading…
Reference in a new issue