forked from Mirrors/openclonk
fixed slow-mo rain (#1958)
Yes, someone just had the "slow-mo" switch on. I also replaced the usage of the "RaindropSmall" particle (which was a stretched dot) with an actual stretched dot.install-platforms
parent
ca0e99e3ce
commit
f10b0854e8
|
@ -427,7 +427,7 @@ private func DropHit(string material_name, int color, int x_orig, int y_orig)
|
|||
{
|
||||
// Adjust position so that it's in the air.
|
||||
var x = AbsX(x_orig), y = AbsY(y_orig);
|
||||
while (GBackSemiSolid(x, y - 1)) y--;
|
||||
while (y > 0 && GBackSemiSolid(x, y - 1)) y--;
|
||||
|
||||
// Add material at impact
|
||||
if (rain_inserts_mat)
|
||||
|
@ -457,16 +457,16 @@ private func DropHit(string material_name, int color, int x_orig, int y_orig)
|
|||
{
|
||||
if( (material_name == "Acid" && GetMaterial(x,y) == Material("Earth")) || material_name == "Lava" || material_name == "DuroLava")
|
||||
Smoke(x, y, 3, RGB(150,160,150));
|
||||
CreateParticle("RaindropSplash", x, y-1, 0, 0, 5, Particles_Splash(color), 0);
|
||||
CreateParticle("RaindropSplash", x, y, 0, 0, 5, Particles_Splash(color), 0);
|
||||
if(material_name == "Ice")
|
||||
{
|
||||
particle_cache.hail = particle_cache.hail ?? Particles_Hail(color);
|
||||
CreateParticle("Hail", x, y, RandomX(-2,2), -Random(10), PV_Random(300, 300), particle_cache.hail, 0);
|
||||
CreateParticle("Hail", x, y - 1, RandomX(-2,2), -Random(10), PV_Random(300, 300), particle_cache.hail, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
particle_cache.small_rain = particle_cache.small_rain ?? Particles_RainSmall(color);
|
||||
CreateParticle("RaindropSmall", x, y, RandomX(-4, 4), -Random(10), PV_Random(300, 300), particle_cache.small_rain, 0);
|
||||
CreateParticle("SphereSpark", x, y - 1, PV_Random(-10, 10), PV_Random(-30, -10), PV_Random(200, 300), particle_cache.small_rain, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ global func Particles_Rain(int color)
|
|||
{
|
||||
CollisionVertex = 0,
|
||||
OnCollision = PC_Die(),
|
||||
ForceY = PV_Gravity(100),
|
||||
ForceY = PV_Gravity(1000),
|
||||
Size = PV_Random(10, 30),
|
||||
R = GetRGBaValue(color, 1),
|
||||
G = GetRGBaValue(color, 2),
|
||||
|
@ -415,18 +415,19 @@ global func Particles_Snow(int color)
|
|||
|
||||
global func Particles_RainSmall(int color)
|
||||
{
|
||||
return
|
||||
return
|
||||
{
|
||||
CollisionVertex = 0,
|
||||
OnCollision = PC_Die(),
|
||||
ForceY = PV_Gravity(60),
|
||||
Size = 20,
|
||||
ForceY = PV_Gravity(1000),
|
||||
Size = 1,
|
||||
R = GetRGBaValue(color, 1),
|
||||
G = GetRGBaValue(color, 2),
|
||||
B = GetRGBaValue(color, 3),
|
||||
Alpha = 200,
|
||||
Rotation = PV_Direction(),
|
||||
CollisionDensity = 25,
|
||||
Stretch = PV_KeyFrames(0, 0, 1000, 500, 1000, 1000, 0),
|
||||
CollisionDensity = 25,
|
||||
Stretch = PV_Speed(4000),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -466,7 +467,7 @@ global func Particles_Hail(int color)
|
|||
return
|
||||
{
|
||||
CollisionVertex = 0,
|
||||
ForceY = PV_Gravity(60),
|
||||
ForceY = PV_Gravity(1000),
|
||||
OnCollision = PC_Stop(),
|
||||
Size = 2,
|
||||
Alpha = PV_KeyFrames(255, 0, 255, 500, 255, 1000, 0),
|
||||
|
|
Loading…
Reference in New Issue