RDR-Classes/script/globals/PlayerStatusSyncData.hpp
2024-07-27 22:24:50 -04:00

649 lines
20 KiB
C++

#pragma once
#include "script/types.hpp"
#include "unordered_map"
enum class PlayerStatus
{
INITIALIZATION,
PLAYING,
JUST_DIED,
DEAD,
RESPAWN,
POST_RESPAWN,
RESPAWN_INIT,
RESPAWN_FADE_WAIT,
RESPAWN_INVENTORY_OVERRIDE_WAIT,
RESPAWN_FIND_DESIRED_SPAWN,
RESPAWN_RESURRECT,
RESPAWN_UPDATE_TELEPORT,
RESPAWN_STREAM_LOCATION,
RESPAWN_REGION_RESET,
RESPAWN_REGION_WAIT_FOR_RESET,
RESPAWN_CREATE_PERSONAL_TRANSPORT,
RESPAWN_INITIALIZE_PLAYER,
RESPAWN_STREAM_WEAPONS,
RESPAWN_ALLOW_WEAPONS_TO_EQUIP,
RESPAWN_ON_SOMETHING,
RESPAWN_VALIDATE_SCENARIO,
RESPAWN_ARBITRARY_STREAM_WAIT,
RESPAWN_EXIT,
DEAD_INIT,
DEAD_SHOW_DEATH,
DEAD_EXIT,
INVALID,
CLEANUP
};
enum class ParentStatus
{
INITIALIZATION,
PLAYING,
JUST_DIED,
DEAD,
RESPAWN,
POST_RESPAWN
};
enum class ScanState
{
INIT,
FIND_DESIRED_SPAWN,
START_SPAWN_SEARCH,
PROCESS_SPAWN_SEARCH,
VERIFY_SPAWN_LOCATION,
CLEANUP,
COMPLETE
};
// TODO
enum class PlayerFlags
{
SPECTATING = 5,
DEAD_EYE_ACTIVE = 9,
IN_JAIL = 20
};
enum class PlayerStatusFlags
{
FORCE_RESPAWN,
IN_RESPAWN_SEQUENCE,
BYPASS_RESSURRECT_AND_TELEPORT,
FORCE_RESPAWN_DESIRED,
FORCE_RESPAWN_ABSOLUTE,
FORCE_RESPAWN_AT_CAMP,
FORCE_RESPAWN_IN_MOONSHINE,
FORCE_RESPAWN_JAIL,
FORCE_RESPAWN_FAST_TRAVEL_STATION,
FORCE_RESPAWN_TRADE,
FORCE_RESPAWN_DEBUG,
FORCE_RESPAWN_ASAP,
SCRIPT_CONTROL_OVERRIDE,
MODE_OVERRIDE,
MISSION_OVERRIDE,
VERSUS_OVERRIDE,
GENERIC_SPAWN_FAR_ONCE,
PAUSE_RESPAWN_FADE_UP,
SKIP_RESPAWN_FADE_IN,
SKIP_RESPAWN_FADE_OUT,
SKIP_LOADING_SCREEN_SHUTDOWN,
DISABLE_POST_FX,
DISABLE_POST_FX_ONCE,
CLEANUP_MATCHMAKING_POST_FX,
RESPAWN_INVISIBLE_ONCE,
RESPAWN_WITHOUT_CONTROL_ONCE,
REQUEST_SCRIPT_CONTROL_INFO,
PREVENT_REGION_RESET,
HIDE_SPECTATOR_UI,
SKIP_SPECTATOR_MODE_ON_DEATH,
DISABLE_SPECTATOR_MODE_ON_DEATH,
INVISIBLE_TO_SPECTATOR_CAM,
DISABLE_DEATH_CAM_HOLD_TIME,
MAINTAIN_DEATH_CAM_ON_RESPAWN,
DISABLE_LOCKON,
DISABLE_FIRING,
SECURITY_CLIENT,
PREVENT_RESPAWN_INVINCIBILITY,
CAMP_RELOAD,
RESPAWN_GHOSTTOWN,
FAKE_GAMER_TAG,
REQUEST_CUSTOM_INVENTORY_CONFIG,
RESPAWN_USE_CUSTOM_INVENTORY_CONFIG,
REQUEST_CUSTOM_AMMO_UI_CONFIG,
RESPAWN_USE_CUSTOM_AMMO_UI_CONFIG,
DISABLE_DROP_WEAPONS_ON_DEATH,
DISABLE_LOOTING,
ACTIVATE_CUSTOM_CAM_ON_RESPAWN,
REQUEST_CUSTOM_SPAWN_CONFIG,
RESPAWN_USE_CUSTOM_SPAWN_CONFIG,
USE_CUSTOM_POSITION_WITH_MOUNT,
RESPAWN_WITH_COUPON,
RESPAWN_WITH_COUPON_ONCE,
RESPAWN_WITH_HUB,
RESPAWN_WITH_HUB_ONCE,
RESPAWN_WITH_HANDHELD = 59,
RESPAWN_WITH_HANDHELD_ONCE,
RESPAWN_WITH_BLACKBOARD,
RESPAWN_WITH_BLACKBOARD_ONCE,
RESPAWN_WITH_ANIMATION,
RESPAWN_WITH_ANIMATION_ONCE,
RESPAWN_WITH_MOUNT,
RESPAWN_WITH_MOUNT_ONCE,
RESPAWN_WITH_RESPOT_DISABLED,
RESPAWN_WITH_RESPOT_DISABLED_ONCE,
RESPAWN_ON_MOUNT,
RESPAWN_ON_MOUNT_ONCE,
RESPAWN_ON_TARGET_MOUNT,
RESPAWN_ON_TARGET_MOUNT_ONCE,
DESTROY_MOUNT_ON_RESPAWN,
RESPAWN_ON_VEHICLE,
RESPAWN_ON_VEHICLE_ONCE,
DESTROY_VEHICLE_ON_RESPAWN,
RESPAWN_WITH_VEHICLE,
RESPAWN_WITH_VEHICLE_ONCE,
RESPAWN_ON_VEHICLE_NAVMESH,
RESPAWN_ON_VEHICLE_NAVMESH_ONCE,
RESPAWN_ON_TRAIN,
RESPAWN_ON_TRAIN_ONCE,
RESPAWN_ON_TARGET_TRAIN,
RESPAWN_ON_TARGET_TRAIN_ONCE,
RESPAWN_ON_TARGET_VEHICLE,
RESPAWN_ON_TARGET_VEHICLE_ONCE,
RESPAWN_USE_ADJUSTED_OFFSET_FOR_TRANSPORT,
RESPAWN_USE_ADJUSTED_OFFSET_FOR_TRANSPORT_ONCE,
RESPAWN_DISABLE_WATER_FAILSAFE,
RESPAWN_SPAWN_IN_WATER,
RESPAWN_SPAWN_IN_WATER_ONCE,
RESPAWN_WITH_RANDOM_SEED,
RESPAWN_SPAWN_NEAR_LOCATION_ONCE,
DONT_RESPAWN_IN_VOLUME_LOCKS_ONCE,
REGENERATE_PEDSHOT_ONCE,
RESPAWN_WITH_DESIRED_WEAPON_IN_HAND,
RESPAWN_WITH_DESIRED_WEAPON_IN_HAND_ONCE,
RESPAWN_WITH_BEST_WEAPON_IN_HAND,
RESPAWN_WITH_BEST_WEAPON_IN_HAND_ONCE,
RESPAWN_WITH_LAST_WEAPON_IN_HAND,
RESPAWN_WITH_LAST_WEAPON_IN_HAND_ONCE,
RESPAWN_WITH_NO_WEAPON_IN_HAND,
RESPAWN_WITH_NO_WEAPON_IN_HAND_ONCE,
RESPAWN_WITH_NO_WEAPON_PROCESSING,
RESPAWN_WITH_NO_WEAPON_PROCESSING_ONCE,
RESPAWN_WITH_NO_ANIMAL_INVULNERABILITY,
RESPAWN_WITH_NO_ANIMAL_INVULNERABILITY_ONCE,
PREVENT_MOUNT_RELEASE,
DONT_USE_ALPHA_FADE_ON_RESPAWN,
DONT_USE_ALPHA_FADE_ON_RESPAWN_ONCE,
RESPAWN_LEAVES_ALIVE_PED_ONCE,
FORCE_COLLISION_WHEN_RESPOT_TIMER_FINISHED,
ALLOW_INCAPACITATION,
STORE_DAMAGE_EVENT,
PAY_BOUNTY_ON_RESPAWN,
RESPAWN_PRESERVE_DEADEYE,
RESPAWN_PRESERVE_HEALTH,
RESPAWN_SANS_WEAPONS,
REGISTER_LOADOUT_OVERRIDE_ON_RESPAWN,
REQUEST_LOADOUT_OVERRIDE_REGISTRATION,
CLEAR_LOADOUT_OVERRIDE_ON_RESPAWN,
REFRESH_WEAPONS_IN_HAND,
REFRESH_LOADOUT,
REFRESH_INVENTORY_OVERRIDE,
REFRESH_OUTFIT_OVERRIDE,
REFRESH_AMMO_TYPE_UNLOCKS,
SPECIAL_ABILITY_OVERRIDE_DEACTIVATION,
SPECIAL_ABILITY_DEACTIVATE_ON_CANCEL,
RESPAWN_NO_COMPONENT_LOAD,
RESPAWN_NO_EXPRESSION_LOAD,
RESPAWN_BLOCK_TEAM_RESET,
PAUSE_RELATIONSHIP_UPDATE,
DONT_PROCESS_FAST_INSTANCING,
RESPAWN_INTO_FAST_INSTANCE,
GANG_FEUDS_ARE_UNLOCKED,
OVERRIDE_PLAYER_ABILITIES,
DESTROY_CORPSE_ON_RESPAWN_ONCE,
DESTROY_CORPSE_ON_RESPAWN,
KEEP_CORPSE_ON_RESPAWN_ONCE,
KEEP_CORPSE_ON_RESPAWN,
CANNOT_BE_CARRIED_WHEN_DEAD,
CLEANUP_TRANSITION_SETTINGS,
DONT_CLEAR_DRUNK_FOR_SPAWNING_OR_CUTSCENES = 144,
DONT_SESSION_ON_RESPAWN_ONCE,
MAX
};
// TODO: move this somewhere else
enum class Region
{
INVALID = -1,
BAY_CRAWDADWILLIES,
BAY_MACOMBS_END,
BAY_MERKINSWALLER,
BAY_LAGRAS,
BAY_LAKAY,
BAY_SAINT_DENIS,
BAY_ORANGE_PLANTATION,
BAY_SERIAL_KILLER,
BAY_SERENDIPITY,
BAY_SHADYBELLE,
BAY_SILTWATERSTRAND,
BGV_APPLESEEDTIMBER,
BGV_BERYLS_DREAM,
BGV_BLACKBONEFOREST_TRAPPER,
BGV_DAKOTARIVER_TRAPPER,
BGV_FORTRIGGS,
BGV_HANGINGDOG,
BGV_LONEMULESTEAD,
BGV_MISSING_HUSBAND,
BGV_MONTO_REST,
BGV_OWANJILA_DAM,
BGV_PAINTEDSKY,
BGV_PRONGHORN,
BGV_RIGGS_STATION,
BGV_SHACK,
BGV_SHEPHERDS_RISE,
BGV_STRAWBERRY,
BGV_VALLEY_VIEW,
BGV_WALLACE_STATION,
BGV_OLD_MAN_JONES,
BGV_WATSONSCABIN,
BLU_CANEBREAK_MANOR,
BLU_COPPERHEAD,
BLU_SISIKA,
BLU_TRAVELLING_SALESMAN,
CML_BACCHUSBRIDGE,
CML_DINO_LADY,
CML_OLDFORTWALLACE,
CML_SIXPOINTCABIN,
GRT_BEECHERS,
GRT_BLACKWATER,
GRT_QUAKERS_COVE,
GRZ_ADLERRANCH,
GRZ_DEAD_RIVAL,
GRZ_CHEZPORTER,
GRZ_COLTER,
GRZ_FROZEN_EXPLORER,
GRZ_MILLESANI_CLAIM,
GRZ_MOUNTAIN_MAN,
GRZ_MOUNT_HAGEN_PEAK,
GRZ_STARVING_CHILDREN,
GRZ_TEMPEST_RIM,
GRZ_WINTERMINING_TOWN,
GRZ_CALUMETRAVINE,
GRE_CIVIL_WAR_BRIDE,
GRZ_COHUTTA,
GRZ_COTORRA_SPRINGS,
GRZ_GUNFIGHT,
GRZ_THELOFT,
GRE_VETERAN,
GRZ_WAPITI,
GRZ_TRAVELLING_SALESMAN,
GUA_AGUASDULCES,
GUA_CAMP,
GUA_CINCOTORRES,
GUA_LACAPILLA,
GUA_MANICATO,
HRT_ABANDONED_MILL,
ROA_BEECHERS_C,
HRT_CARMODYDELL,
HRT_CORNWALLKEROSENE,
HRT_CROP_FARM,
HRT_CUMBERLANDFALLS,
HRT_DOWNSRANCH,
HRT_EMERALDRANCH,
HRT_GRANGERS_HOGGERY,
HRT_HORSESHOEOVERLOOK,
HRT_LARNEDSOD,
HRT_LOONY_CULT,
HRT_LUCKYSCABIN,
HRT_SWANSONS_STATION,
HRT_VALENTINE,
ROA_ABERDEENPIGFARM,
ROA_ANNESBURG,
ROA_BEAVERHOLLOW,
ROA_BLACK_BALSAM_RISE,
ROA_BRANDYWINE_DROP,
ROA_BUTCHERCREEK,
ROA_DOVERHILL,
ROA_HAPPY_FAMILY,
ROA_ISOLATIONIST,
ROA_MACLEANSHOUSE,
ROA_MOSSY_FLATS,
ROA_ROANOKE_VALLEY,
ROA_ROCKYSEVEN,
ROA_TRAPPER,
ROA_OLD_MAN_JONES,
ROA_VANHORNMANSION,
ROA_VANHORNPOST,
SCM_BRAITHWAITEMANOR,
SCM_BULGERGLADE,
SCM_CALIGAHALL,
SCM_CATFISHJACKSONS,
SCM_CLEMENSCOVE,
SCM_CLEMENSPOINT,
SCM_COMPSONS_STEAD,
SCM_DAIRY_FARM,
SCM_HORSE_SHOP,
SCM_LONNIESSHACK,
SCM_LOVE_TRIANGLE,
SCM_RADLEYS_PASTURE,
SCM_RHODES,
SCM_SLAVE_PEN,
TAL_AURORA_BASIN,
TAL_DEAD_SETTLER,
TAL_COCHINAY,
TAL_MANZANITAPOST,
TAL_PACIFICUNIONRR,
TAL_TANNERSREACH,
TAL_TRAPPER,
GAP_GAPTOOTH_BREACH,
GAP_TUMBLEWEED,
GAP_RATHSKELLER_FORK,
RIO_BENEDICT_POINT,
RIO_FORT_MERCER,
RIO_PLAIN_VIEW,
RIO_TRAVELLING_SALESMAN,
CHO_ARMADILLO,
CHO_COOTS_CHAPEL,
CHO_DON_JULIO_HOUSE,
CHO_RILEYS_CHARGE,
CHO_RIDGEWOOD_FARM,
CHO_TWIN_ROCKS,
CHO_TRAVELLING_SALESMAN,
CHO_TRAPPER,
HEN_MACFARLANES_RANCH,
HEN_THIEVES_LANDING,
HEN_TRAVELLING_SALESMAN,
HEN_HARRIET,
CENTRALUNIONRR,
MAX
};
inline std::unordered_map<Region, std::string> g_RegionMap = {
{ Region::INVALID, "Invalid" },
{ Region::BAY_CRAWDADWILLIES, "Crawdad Willies" },
{ Region::BAY_MACOMBS_END, "Macomb's End" },
{ Region::BAY_MERKINSWALLER, "Merkins Waller" },
{ Region::BAY_LAGRAS, "Lagras" },
{ Region::BAY_LAKAY, "Lakay" },
{ Region::BAY_SAINT_DENIS, "Saint Denis" },
{ Region::BAY_ORANGE_PLANTATION, "Orange Plantation" },
{ Region::BAY_SERIAL_KILLER, "Serial Killer" },
{ Region::BAY_SERENDIPITY, "Serendipity" },
{ Region::BAY_SHADYBELLE, "Shady Belle" },
{ Region::BAY_SILTWATERSTRAND, "Siltwater Strand" },
{ Region::BGV_APPLESEEDTIMBER, "Appleseed Timber" },
{ Region::BGV_BERYLS_DREAM, "Beryl's Dream" },
{ Region::BGV_BLACKBONEFOREST_TRAPPER, "Blackbone Forest Trapper" },
{ Region::BGV_DAKOTARIVER_TRAPPER, "Dakota River Trapper" },
{ Region::BGV_FORTRIGGS, "Fort Riggs" },
{ Region::BGV_HANGINGDOG, "Hanging Dog" },
{ Region::BGV_LONEMULESTEAD, "Lone Mule Stead" },
{ Region::BGV_MISSING_HUSBAND, "Missing Husband" },
{ Region::BGV_MONTO_REST, "Monto Rest" },
{ Region::BGV_OWANJILA_DAM, "Owanjila Dam" },
{ Region::BGV_PAINTEDSKY, "Painted Sky" },
{ Region::BGV_PRONGHORN, "Pronghorn" },
{ Region::BGV_RIGGS_STATION, "Riggs Station" },
{ Region::BGV_SHACK, "Shack" },
{ Region::BGV_SHEPHERDS_RISE, "Shepherd's Rise" },
{ Region::BGV_STRAWBERRY, "Strawberry" },
{ Region::BGV_VALLEY_VIEW, "Valley View" },
{ Region::BGV_WALLACE_STATION, "Wallace Station" },
{ Region::BGV_OLD_MAN_JONES, "Old Man Jones" },
{ Region::BGV_WATSONSCABIN, "Watson's Cabin" },
{ Region::BLU_CANEBREAK_MANOR, "Canebreak Manor" },
{ Region::BLU_COPPERHEAD, "Copperhead" },
{ Region::BLU_SISIKA, "Sisika" },
{ Region::BLU_TRAVELLING_SALESMAN, "Travelling Salesman" },
{ Region::CML_BACCHUSBRIDGE, "Bacchus Bridge" },
{ Region::CML_DINO_LADY, "Dino Lady" },
{ Region::CML_OLDFORTWALLACE, "Old Fort Wallace" },
{ Region::CML_SIXPOINTCABIN, "Six Point Cabin" },
{ Region::GRT_BEECHERS, "Beechers" },
{ Region::GRT_BLACKWATER, "Blackwater" },
{ Region::GRT_QUAKERS_COVE, "Quakers Cove" },
{ Region::GRZ_ADLERRANCH, "Adler Ranch" },
{ Region::GRZ_DEAD_RIVAL, "Dead Rival" },
{ Region::GRZ_CHEZPORTER, "Chez Porter" },
{ Region::GRZ_COLTER, "Colter" },
{ Region::GRZ_FROZEN_EXPLORER, "Frozen Explorer" },
{ Region::GRZ_MILLESANI_CLAIM, "Millesani Claim" },
{ Region::GRZ_MOUNTAIN_MAN, "Mountain Man" },
{ Region::GRZ_MOUNT_HAGEN_PEAK, "Mount Hagen Peak" },
{ Region::GRZ_STARVING_CHILDREN, "Starving Children" },
{ Region::GRZ_TEMPEST_RIM, "Tempest Rim" },
{ Region::GRZ_WINTERMINING_TOWN, "Winter Mining Town" },
{ Region::GRZ_CALUMETRAVINE, "Calumet Ravine" },
{ Region::GRE_CIVIL_WAR_BRIDE, "Gre Civil War Bride" },
{ Region::GRZ_COHUTTA, "Cohutta" },
{ Region::GRZ_COTORRA_SPRINGS, "Cotorra Springs" },
{ Region::GRZ_GUNFIGHT, "Gunfight" },
{ Region::GRZ_THELOFT, "The Loft" },
{ Region::GRE_VETERAN, "Gre Veteran" },
{ Region::GRZ_WAPITI, "Wapiti" },
{ Region::GRZ_TRAVELLING_SALESMAN, "Travelling Salesman" },
{ Region::GUA_AGUASDULCES, "Aguas Dulces" },
{ Region::GUA_CAMP, "Camp" },
{ Region::GUA_CINCOTORRES, "Cinco Torres" },
{ Region::GUA_LACAPILLA, "La Capilla" },
{ Region::GUA_MANICATO, "Manicato" },
{ Region::HRT_ABANDONED_MILL, "Abandoned Mill" },
{ Region::ROA_BEECHERS_C, "Beecher's C" },
{ Region::HRT_CARMODYDELL, "Carmody Dell" },
{ Region::HRT_CORNWALLKEROSENE, "Cornwall Kerosene" },
{ Region::HRT_CROP_FARM, "Crop Farm" },
{ Region::HRT_CUMBERLANDFALLS, "Cumberland Falls" },
{ Region::HRT_DOWNSRANCH, "Downs Ranch" },
{ Region::HRT_EMERALDRANCH, "Emerald Ranch" },
{ Region::HRT_GRANGERS_HOGGERY, "Granger's Hoggery" },
{ Region::HRT_HORSESHOEOVERLOOK, "Horseshoe Overlook" },
{ Region::HRT_LARNEDSOD, "Larned Sod" },
{ Region::HRT_LOONY_CULT, "Loony Cult" },
{ Region::HRT_LUCKYSCABIN, "Lucky's Cabin" },
{ Region::HRT_SWANSONS_STATION, "Swanson's Station" },
{ Region::HRT_VALENTINE, "Valentine" },
{ Region::ROA_ABERDEENPIGFARM, "Aberdeen Pig Farm" },
{ Region::ROA_ANNESBURG, "Annesburg" },
{ Region::ROA_BEAVERHOLLOW, "Beaver Hollow" },
{ Region::ROA_BLACK_BALSAM_RISE, "Black Balsam Rise" },
{ Region::ROA_BRANDYWINE_DROP, "Brandywine Drop" },
{ Region::ROA_BUTCHERCREEK, "Butcher Creek" },
{ Region::ROA_DOVERHILL, "Dover Hill" },
{ Region::ROA_HAPPY_FAMILY, "Happy Family" },
{ Region::ROA_ISOLATIONIST, "Isolationist" },
{ Region::ROA_MACLEANSHOUSE, "Maclean's House" },
{ Region::ROA_MOSSY_FLATS, "Mossy Flats" },
{ Region::ROA_ROANOKE_VALLEY, "Roanoke Valley" },
{ Region::ROA_ROCKYSEVEN, "Rocky Seven" },
{ Region::ROA_TRAPPER, "Trapper" },
{ Region::ROA_OLD_MAN_JONES, "Old Man Jones" },
{ Region::ROA_VANHORNMANSION, "Van Horn Mansion" },
{ Region::ROA_VANHORNPOST, "Van Horn Post" },
{ Region::SCM_BRAITHWAITEMANOR, "Braithwaite Manor" },
{ Region::SCM_BULGERGLADE, "Bulger Glade" },
{ Region::SCM_CALIGAHALL, "Caligahall" },
{ Region::SCM_CATFISHJACKSONS, "Catfish Jacksons" },
{ Region::SCM_CLEMENSCOVE, "Clemens Cove" },
{ Region::SCM_CLEMENSPOINT, "Clemens Point" },
{ Region::SCM_COMPSONS_STEAD, "Compsons Stead" },
{ Region::SCM_DAIRY_FARM, "Dairy Farm" },
{ Region::SCM_HORSE_SHOP, "Horse Shop" },
{ Region::SCM_LONNIESSHACK, "Lonnie's Shack" },
{ Region::SCM_LOVE_TRIANGLE, "Love Triangle" },
{ Region::SCM_RADLEYS_PASTURE, "Radley's Pasture" },
{ Region::SCM_RHODES, "Rhodes" },
{ Region::SCM_SLAVE_PEN, "Slave Pen" },
{ Region::TAL_AURORA_BASIN, "Aurora Basin" },
{ Region::TAL_DEAD_SETTLER, "Dead Settler" },
{ Region::TAL_COCHINAY, "Cochinay" },
{ Region::TAL_MANZANITAPOST, "Manzanita Post" },
{ Region::TAL_PACIFICUNIONRR, "Pacific Union RR" },
{ Region::TAL_TANNERSREACH, "Tanner's Reach" },
{ Region::TAL_TRAPPER, "Trapper" },
{ Region::GAP_GAPTOOTH_BREACH, "Gaptooth Breach" },
{ Region::GAP_TUMBLEWEED, "Tumbleweed" },
{ Region::GAP_RATHSKELLER_FORK, "Rathskeller Fork" },
{ Region::RIO_BENEDICT_POINT, "Benedict Point" },
{ Region::RIO_FORT_MERCER, "Fort Mercer" },
{ Region::RIO_PLAIN_VIEW, "Plain View" },
{ Region::RIO_TRAVELLING_SALESMAN, "Travelling Salesman" },
{ Region::CHO_ARMADILLO, "Armadillo" },
{ Region::CHO_COOTS_CHAPEL, "Coots Chapel" },
{ Region::CHO_DON_JULIO_HOUSE, "Don Julio House" },
{ Region::CHO_RILEYS_CHARGE, "Riley's Charge" },
{ Region::CHO_RIDGEWOOD_FARM, "Ridgewood Farm" },
{ Region::CHO_TWIN_ROCKS, "Twin Rocks" },
{ Region::CHO_TRAVELLING_SALESMAN, "Travelling Salesman" },
{ Region::CHO_TRAPPER, "Trapper" },
{ Region::HEN_MACFARLANES_RANCH, "Macfarlane's Ranch" },
{ Region::HEN_THIEVES_LANDING, "Thieves Landing" },
{ Region::HEN_TRAVELLING_SALESMAN, "Travelling Salesman" },
{ Region::HEN_HARRIET, "Harriet" },
{ Region::CENTRALUNIONRR, "Central Union RR" },
{ Region::MAX, "Max" }
};
enum class District
{
INVALID = -1,
BAYOU_NWA,
BIG_VALLEY,
BLUEGILL_MARSH,
CUMBERLAND_FOREST,
GREAT_PLAINS,
GRIZZLIES,
GRIZZLIES_EAST,
GRIZZLIES_WEST,
GUAMA,
HEARTLAND,
ROANOKE_RIDGE,
SCARLETT_MEADOWS,
TALL_TREES,
GAPTOOTH_RIDGE,
RIO_BRAVO,
CHOLLA_SPRINGS,
HENNIGANS_STEAD
};
inline std::unordered_map<District, std::string> g_DistrictMap = {
{ District::INVALID, "Invalid" },
{ District::BAYOU_NWA, "Bayou Nwa" },
{ District::BIG_VALLEY, "Big Valley" },
{ District::BLUEGILL_MARSH, "Bluegill Marsh" },
{ District::CUMBERLAND_FOREST, "Cumberland Forest" },
{ District::GREAT_PLAINS, "Great Plains" },
{ District::GRIZZLIES, "Grizzlies" },
{ District::GRIZZLIES_EAST, "Grizzlies East" },
{ District::GRIZZLIES_WEST, "Grizzlies West" },
{ District::GUAMA, "Guama" },
{ District::HEARTLAND, "Heartland" },
{ District::ROANOKE_RIDGE, "Roanoke Ridge" },
{ District::SCARLETT_MEADOWS, "Scarlett Meadows" },
{ District::TALL_TREES, "Tall Trees" },
{ District::GAPTOOTH_RIDGE, "Gaptooth Ridge" },
{ District::RIO_BRAVO, "Rio Bravo" },
{ District::CHOLLA_SPRINGS, "Cholla Springs" },
{ District::HENNIGANS_STEAD, "Hennigan's Stead" }
};
// seriously move this somewhere else
enum class Language
{
UNDEFINED = -1,
ENGLISH,
FRENCH,
GERMAN,
ITALIAN,
SPANISH,
PORTUGESE,
POLISH,
RUSSIAN,
KOREAN,
CHINESE_TRAD,
JAPANESE,
MEXICAN,
CHINESE_SIMP
};
inline std::unordered_map<Language, std::string> g_LanguageMap = {
{ Language::UNDEFINED, "Undefined" },
{ Language::ENGLISH, "English" },
{ Language::FRENCH, "French" },
{ Language::GERMAN, "German" },
{ Language::ITALIAN, "Italian" },
{ Language::SPANISH, "Spanish" },
{ Language::PORTUGESE, "Portuguese" },
{ Language::POLISH, "Polish" },
{ Language::RUSSIAN, "Russian" },
{ Language::KOREAN, "Korean" },
{ Language::CHINESE_TRAD, "Chinese Traditional" },
{ Language::JAPANESE, "Japanese" },
{ Language::MEXICAN, "Mexican" },
{ Language::CHINESE_SIMP, "Chinese Simplified" }
};
enum class PassiveState
{
NOT_PASSIVE,
WAITING_FOR_PASSIVE,
PASSIVE,
WAITING_FOR_NOT_PASSIVE,
FORCED_FROM_PASSIVE
};
inline std::unordered_map<PassiveState, std::string> g_PassiveStateMap = {
{PassiveState::NOT_PASSIVE, "Not Passive"},
{PassiveState::WAITING_FOR_PASSIVE, "Waiting for Passive"},
{PassiveState::PASSIVE, "Passive"},
{PassiveState::WAITING_FOR_NOT_PASSIVE, "Waiting to Leave Passive"},
{PassiveState::FORCED_FROM_PASSIVE, "Forced from Passive"}
};
enum class AnimalTransformationFlag
{
IS_ANIMAL,
PENDING_TRANSFORMATION_TO_HUMAN
};
struct ANIMAL_TRANSFORMATION_DATA
{
SCR_INT TransitionTimestamp;
SCR_BITSET<AnimalTransformationFlag> Flags;
};
// WARNING: the first 20 fields of this struct are overwritten every tick from another global
struct PLAYER_STATUS_SYNC_DATA_ENTRY
{
alignas(8) PlayerStatus Status;
alignas(8) ParentStatus ParentStatus; // essentially a condensed version of Status
alignas(8) ScanState ScanState;
SCR_BITSET<PlayerFlags> Flags;
SCR_BITSET_LARGE<PlayerStatusFlags, static_cast<int>(PlayerStatusFlags::MAX)> StatusFlags;
alignas(8) Region CurrentRegion;
alignas(8) District CurrentDistrict;
TEXT_LABEL_31 FakeGamerTag;
SCR_BOOL CompletedFirstRespawn;
alignas(8) Language PlayerLanguage; // can't name this Language because GCC
SCR_FLOAT GangNotoriety;
PLAYER_INDEX SpectateTarget;
// ----------------------------------------------------------------------------------------------
GAMER_HANDLE LastPlayerKilledHandle;
SCR_INT LastPlayerKilledTime;
PLAYER_INDEX LastPlayerKilled;
GAMER_HANDLE LastPlayerKilledByHandle;
GAMER_HANDLE LastPlayerKilledByHandle2; // seemingly the same thing
SCR_INT LastPlayerKilledByTime;
PLAYER_INDEX LastPlayerKilledBy;
SCR_FLOAT Notoriety;
SCR_INT PassiveRequestTime;
SCR_INT PassiveUpdateTime;
alignas(8) PassiveState PassiveState;
SCR_BOOL PassivePenaltyApplied;
SCR_INT NotorietyFlags;
ANIMAL_TRANSFORMATION_DATA AnimalTransformationData;
};
static_assert(sizeof(PLAYER_STATUS_SYNC_DATA_ENTRY) == 38 * 8);
struct PLAYER_STATUS_SYNC_DATA
{
SCR_ARRAY<PLAYER_STATUS_SYNC_DATA_ENTRY, 32> Entries;
};
static_assert(sizeof(PLAYER_STATUS_SYNC_DATA) == 1217 * 8);