1
0
mirror of https://github.com/XProger/OpenLara.git synced 2025-08-10 07:06:52 +02:00

fix lava particles horizontal speed

This commit is contained in:
XProger
2019-01-21 11:19:24 +03:00
parent b9dee42ae3
commit 50eb488319

View File

@@ -362,9 +362,13 @@ struct TrapLavaEmitter : Controller {
if (isActive() && max(d.x, d.z) < LAVA_EMITTER_RANGE) {
if (timer <= 0.0f) {
vec2 d;
sincos(PI * 2.0f * randf(), &d.x, &d.y);
d *= randf() * LAVA_H_SPEED;
Particle part;
part.pos = pos;
part.velocity = vec3((randf() * 2.0f - 1.0f) * LAVA_H_SPEED, randf() * LAVA_V_SPEED, (randf() * 2.0f - 1.0f) * LAVA_H_SPEED);
part.velocity = vec3(d.x, randf() * LAVA_V_SPEED, d.y);
part.roomIndex = getRoomIndex();
part.frame = rand() % level->spriteSequences[-(spriteIndex + 1)].sCount;
particles.push(part);