feat: allow invalid outfits to be applied (#2501)

This commit is contained in:
gir489 2023-12-10 06:52:42 -05:00 committed by GitHub
parent a2eff686cb
commit 461ce57ac6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,8 @@
#include "pointers.hpp"
#include "services/outfit/outfit_service.hpp"
#include "gta/enums.hpp"
#include "core/scr_globals.hpp"
#include "services/tunables/tunables_service.hpp"
namespace big
{
@ -27,6 +29,11 @@ namespace big
void looped::self_persist_outfit()
{
//Disable clothing validation
*scr_globals::reset_clothing.as<PBOOL>() = FALSE;
if (auto tunable = g_tunables_service->get_tunable<PBOOL>(RAGE_JOAAT("DISABLE_CLOTHING_SAVE_SLOT_VALIDATION")))
*tunable = TRUE;
if (g.self.persist_outfit.empty())
return; //Off

View File

@ -66,6 +66,8 @@ namespace big::scr_globals
static inline const script_global property_names(1312228);
static inline const script_global pickups(2765084);
static inline const script_global reset_clothing(103377); // freemode 75, &iLocal_.*, 2\);
}
namespace big::scr_locals