1
0
forked from akanyan/mu3-mods

fix(MPO): don't tap into toRatingFloat

Cleaner, safer, and should fix collab play
This commit is contained in:
2024-12-28 21:10:31 +00:00
parent c84898cb78
commit 566d17c230
5 changed files with 21 additions and 25 deletions

View File

@ -21,15 +21,17 @@ class patch_UIResultBattlePoint: UIResultBattlePoint {
public extern void orig_initTechRating(PlayInfo playInfo);
public new void initTechRating(PlayInfo playInfo) {
counterScore_.isRatingDisplay = true;
if(!CustomRating.IsEnabled()) {
orig_initTechRating(playInfo);
return;
}
int prevRating = ((patch_SessionResult)playInfo.sessionResult).prevCustomRating;
int rating1 = CustomRating.Get();
hideScore_?.SetActive(false);
counterScore_.isDispSuffix = true;
counterScore_.Counter = (double)UserUtil.toRatingFloat(rating1);
int ratingPatternNo = UserUtil.toRatingPatternNo(rating1);
counterScore_.SpriteIndex = ratingPatternNo;
@ -42,15 +44,15 @@ class patch_UIResultBattlePoint: UIResultBattlePoint {
} else if(0 < rating2) {
disable(counterScoreMinus_);
if(counterScorePlus_ != null) {
counterScorePlus_.Counter = rating2 * 0.01f + 1E-05f;
counterScorePlus_.Counter = UserUtil.toRatingFloat(rating2);
}
animator_.SetInteger(Sys.Const.AnimatorID_State, 0);
} else {
disable(counterScorePlus_);
if(counterScoreMinus_ != null) {
counterScoreMinus_.Counter = rating2 * 0.01f + 1E-05f;
counterScoreMinus_.Counter = UserUtil.toRatingFloat(rating2);
}
animator_.SetInteger(MU3.Sys.Const.AnimatorID_State, 1);
animator_.SetInteger(Sys.Const.AnimatorID_State, 1);
}
animator_.SetTrigger(Sys.Const.AnimatorID_In);
}