1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-21 06:42:54 +08:00

Simplify naming

This commit is contained in:
Dean Herbert 2021-05-26 16:44:44 +09:00
parent ad3e4287cd
commit d6c4be207b

View File

@ -60,7 +60,7 @@ namespace osu.Game.Rulesets.Osu.Mods
rng = new Random((int)Seed.Value); rng = new Random((int)Seed.Value);
RandomObjectInfo prevObjectInfo = null; RandomObjectInfo previous = null;
float rateOfChangeMultiplier = 0; float rateOfChangeMultiplier = 0;
@ -68,7 +68,7 @@ namespace osu.Game.Rulesets.Osu.Mods
{ {
var hitObject = hitObjects[i]; var hitObject = hitObjects[i];
var currentObjectInfo = new RandomObjectInfo(hitObject); var current = new RandomObjectInfo(hitObject);
// rateOfChangeMultiplier only changes every i iterations to prevent shaky-line-shaped streams // rateOfChangeMultiplier only changes every i iterations to prevent shaky-line-shaped streams
if (i % 3 == 0) if (i % 3 == 0)
@ -76,27 +76,27 @@ namespace osu.Game.Rulesets.Osu.Mods
if (hitObject is Spinner) if (hitObject is Spinner)
{ {
prevObjectInfo = null; previous = null;
continue; continue;
} }
applyRandomisation(rateOfChangeMultiplier, prevObjectInfo, currentObjectInfo); applyRandomisation(rateOfChangeMultiplier, previous, current);
hitObject.Position = currentObjectInfo.PositionRandomised; hitObject.Position = current.PositionRandomised;
// update end position as it may have changed as a result of the position update. // update end position as it may have changed as a result of the position update.
currentObjectInfo.EndPositionRandomised = currentObjectInfo.PositionRandomised; current.EndPositionRandomised = current.PositionRandomised;
switch (hitObject) switch (hitObject)
{ {
case Slider slider: case Slider slider:
shiftNestedObjects(slider, Vector2.Subtract(slider.Position, currentObjectInfo.PositionOriginal)); shiftNestedObjects(slider, Vector2.Subtract(slider.Position, current.PositionOriginal));
moveSliderIntoPlayfield(slider, currentObjectInfo); moveSliderIntoPlayfield(slider, current);
break; break;
} }
prevObjectInfo = currentObjectInfo; previous = current;
} }
} }