mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 18:36:45 +02:00
repairs to birdSongs for new hash injector format
This commit is contained in:
parent
ef2c181c98
commit
853c0197a1
1 changed files with 11 additions and 9 deletions
|
@ -33,20 +33,22 @@ function maybePlaySound(deltaTime) {
|
||||||
// Set the location and other info for the sound to play
|
// Set the location and other info for the sound to play
|
||||||
var whichBird = Math.floor(Math.random() * birds.length);
|
var whichBird = Math.floor(Math.random() * birds.length);
|
||||||
//print("playing sound # " + whichBird);
|
//print("playing sound # " + whichBird);
|
||||||
var position = { x: lowerCorner.x + Math.random() * (upperCorner.x - lowerCorner.x),
|
var position = {
|
||||||
y: lowerCorner.y + Math.random() * (upperCorner.y - lowerCorner.y),
|
x: lowerCorner.x + Math.random() * (upperCorner.x - lowerCorner.x),
|
||||||
z: lowerCorner.z + Math.random() * (upperCorner.z - lowerCorner.z) };
|
y: lowerCorner.y + Math.random() * (upperCorner.y - lowerCorner.y),
|
||||||
|
z: lowerCorner.z + Math.random() * (upperCorner.z - lowerCorner.z)
|
||||||
|
};
|
||||||
var options = {
|
var options = {
|
||||||
position: position,
|
position: position,
|
||||||
volume: BIRD_MASTER_VOLUME
|
volume: BIRD_MASTER_VOLUME
|
||||||
};
|
};
|
||||||
var entityId = Entities.addEntity({
|
var entityId = Entities.addEntity({
|
||||||
type: "Sphere",
|
type: "Sphere",
|
||||||
position: position,
|
position: position,
|
||||||
dimensions: { x: BIRD_SIZE, y: BIRD_SIZE, z: BIRD_SIZE },
|
dimensions: { x: BIRD_SIZE, y: BIRD_SIZE, z: BIRD_SIZE },
|
||||||
color: birds[whichBird].color,
|
color: birds[whichBird].color,
|
||||||
lifetime: 10
|
lifetime: 10
|
||||||
});
|
});
|
||||||
|
|
||||||
if (useLights) {
|
if (useLights) {
|
||||||
var lightId = Entities.addEntity({
|
var lightId = Entities.addEntity({
|
||||||
|
|
Loading…
Reference in a new issue