From 8c514a0688c7e350de4113bf778ab3a5b028de9c Mon Sep 17 00:00:00 2001 From: Michael Stenberg Date: Wed, 14 Feb 2024 01:13:52 -0700 Subject: [PATCH] fix/add GC NTE ClassMaxes --- src/PlayerSubordinates.cc | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/PlayerSubordinates.cc b/src/PlayerSubordinates.cc index 2783906f..688f1994 100644 --- a/src/PlayerSubordinates.cc +++ b/src/PlayerSubordinates.cc @@ -90,7 +90,20 @@ void PlayerVisualConfig::enforce_lobby_join_limits_for_version(Version v) { {0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}; const ClassMaxes* maxes; - if (is_v1_or_v2(v)) { + if (v == Version::GC_NTE) { + // GC NTE has HUcaseal, FOmar, and RAmarl, but missing others + if (this->char_class >= 12) { + this->char_class = 0; // Invalid classes -> HUmar + } + + // GC NTE is basically v2, but uses v3 maxes + this->version = min(this->version, 2); + maxes = &v3_v4_class_maxes[this->char_class]; + + // Prevent GC NTE from crashing from extra models + this->extra_model = 0; + this->validation_flags &= 0xFD; + } else if (is_v1_or_v2(v)) { // V1/V2 have fewer classes, so we'll substitute some here switch (this->char_class) { case 0: // HUmar