Fix racing against yourself

This commit is contained in:
Terry Hearst 2023-10-03 22:29:14 -04:00
parent 2c0fda0285
commit efd0696145

View file

@ -2,6 +2,7 @@
using MIU; using MIU;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using UnityEngine;
namespace CustomCosmeticLoader.Patches namespace CustomCosmeticLoader.Patches
{ {
@ -28,7 +29,13 @@ namespace CustomCosmeticLoader.Patches
if (Config.skinNameToHijack != "*") if (Config.skinNameToHijack != "*")
mHolder.SetMarble(Shared.SkinToHijack); mHolder.SetMarble(Shared.SkinToHijack);
Shared.ApplyCustomTexture(mHolder.currentMarble, Config.skins[Config.otherPlayers[replayName]]); Texture2D skin;
if (replayName == Player.Current.Name)
skin = Config.skins[Config.currentSkin];
else
skin = Config.skins[Config.otherPlayers[replayName]];
Shared.ApplyCustomTexture(mHolder.currentMarble, skin);
} }
} }
} }