mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-17 04:11:06 +02:00
Merge pull request #13685 from zfox23/MS16820_rateLimitPolaroids
Fix MS16820: Rate limit Snapshot Polaroids
This commit is contained in:
commit
cc921ed9c4
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