Fix RSP scaling for NPC values.

This commit is contained in:
Ottermandias 2024-06-20 14:24:35 +02:00
parent f686a0ff09
commit 8cd8efa723

View file

@ -29,6 +29,12 @@ public class RspHeightHook : FastHook<RspHeightHook.Delegate>, IDisposable
&& _metaState.RspCollection.TryPeek(out var collection)
&& collection is { Valid: true, ModCollection.MetaCache: { } cache })
{
// Special cases.
if (height == 0xFF)
return 1.0f;
if (height > 100)
height = 0;
var clan = (SubRace)(((int)race - 1) * 2 + 1 + isSecondSubRace);
var (minIdent, maxIdent) = gender == 0
? (new RspIdentifier(clan, RspAttribute.MaleMinSize), new RspIdentifier(clan, RspAttribute.MaleMaxSize))