Convert ParticleDensityFactor from a float to an int

This commit is contained in:
abcdefg30
2016-06-25 19:04:59 +02:00
parent 4703497656
commit 3a8b2bda43

View File

@@ -19,8 +19,8 @@ namespace OpenRA.Mods.Common.Traits
[Desc("Adds a particle-based overlay.")]
public class WeatherOverlayInfo : ITraitInfo, ILobbyCustomRulesIgnore
{
[Desc("Factor for particle density. As higher as more particles will get spawned.")]
public readonly float ParticleDensityFactor = 0.0007625f;
[Desc("Average number of particles per 100x100 px square.")]
public readonly int ParticleDensityFactor = 8;
[Desc("Should the level of the wind change over time, or just stick to the first value of WindLevels?")]
public readonly bool ChangingWindLevel = true;
@@ -111,7 +111,7 @@ namespace OpenRA.Mods.Common.Traits
int CalculateParticleCount(int x, int y)
{
return (int)(x * y * info.ParticleDensityFactor);
return (int)(x * y * info.ParticleDensityFactor / 10000);
}
void SpawnParticles(int count, int rangeY, int spawnChancePercent)