tiny addition to a stub in script
This commit is contained in:
parent
a38a148582
commit
1f7c0476dd
@ -63,7 +63,8 @@ namespace script
|
|||||||
}
|
}
|
||||||
|
|
||||||
auto* raw_file = allocator.allocate<game::RawFile>();
|
auto* raw_file = allocator.allocate<game::RawFile>();
|
||||||
raw_file->name = allocator.duplicate_string(name); // use script name with .gsc suffix for FindXAssetHeader hook
|
// use script name with .gsc suffix for DB_FindXAssetHeader hook
|
||||||
|
raw_file->name = allocator.duplicate_string(name);
|
||||||
raw_file->buffer = allocator.duplicate_string(data);
|
raw_file->buffer = allocator.duplicate_string(data);
|
||||||
raw_file->len = static_cast<int>(data.length());
|
raw_file->len = static_cast<int>(data.length());
|
||||||
|
|
||||||
@ -152,7 +153,7 @@ namespace script
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gscr_get_bgb_remaining_stub(game::scriptInstance_t inst, void* entref)
|
void scr_loot_get_utem_quantity_stub(game::scriptInstance_t inst, game::scr_entref_t entref)
|
||||||
{
|
{
|
||||||
game::Scr_AddInt(game::SCRIPTINSTANCE_SERVER, 255);
|
game::Scr_AddInt(game::SCRIPTINSTANCE_SERVER, 255);
|
||||||
}
|
}
|
||||||
@ -175,7 +176,8 @@ namespace script
|
|||||||
utils::hook::call(game::select(0x1408F2E5D, 0x1400E2D22), server_script_checksum_stub);
|
utils::hook::call(game::select(0x1408F2E5D, 0x1400E2D22), server_script_checksum_stub);
|
||||||
|
|
||||||
// Workaround for "Out of X" gobblegum
|
// Workaround for "Out of X" gobblegum
|
||||||
gscr_get_bgb_remaining_hook.create(game::select(0x141A8CAB0, 0x1402D2310), gscr_get_bgb_remaining_stub);
|
gscr_get_bgb_remaining_hook.create(game::select(0x141A8CAB0, 0x1402D2310),
|
||||||
|
scr_loot_get_utem_quantity_stub);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -19,6 +19,18 @@ namespace game
|
|||||||
CONTROLLER_INDEX_COUNT = 0x4,
|
CONTROLLER_INDEX_COUNT = 0x4,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum LocalClientNum_t
|
||||||
|
{
|
||||||
|
INVALID_LOCAL_CLIENT = -1,
|
||||||
|
LOCAL_CLIENT_0 = 0x0,
|
||||||
|
LOCAL_CLIENT_FIRST = 0x0,
|
||||||
|
LOCAL_CLIENT_KEYBOARD_AND_MOUSE = 0x0,
|
||||||
|
LOCAL_CLIENT_1 = 0x1,
|
||||||
|
LOCAL_CLIENT_2 = 0x2,
|
||||||
|
LOCAL_CLIENT_3 = 0x3,
|
||||||
|
LOCAL_CLIENT_COUNT = 0x4,
|
||||||
|
};
|
||||||
|
|
||||||
enum eGameModes
|
enum eGameModes
|
||||||
{
|
{
|
||||||
MODE_GAME_MATCHMAKING_PLAYLIST = 0x0,
|
MODE_GAME_MATCHMAKING_PLAYLIST = 0x0,
|
||||||
@ -1636,6 +1648,44 @@ namespace game
|
|||||||
static_assert(sizeof(client_s_cl) == 0xE5170);
|
static_assert(sizeof(client_s_cl) == 0xE5170);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
union Weapon
|
||||||
|
{
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
unsigned __int64 weaponIdx : 9;
|
||||||
|
unsigned __int64 attachment1 : 6;
|
||||||
|
unsigned __int64 attachment2 : 6;
|
||||||
|
unsigned __int64 attachment3 : 6;
|
||||||
|
unsigned __int64 attachment4 : 6;
|
||||||
|
unsigned __int64 attachment5 : 6;
|
||||||
|
unsigned __int64 attachment6 : 6;
|
||||||
|
unsigned __int64 attachment7 : 6;
|
||||||
|
unsigned __int64 attachment8 : 6;
|
||||||
|
unsigned __int64 padding : 7;
|
||||||
|
} _anon_0;
|
||||||
|
uint64_t weaponData;
|
||||||
|
};
|
||||||
|
|
||||||
|
union EntRefUnion
|
||||||
|
{
|
||||||
|
int32_t entnum;
|
||||||
|
uint32_t hudElemIndex;
|
||||||
|
uint32_t pathNodeIndex;
|
||||||
|
__int16 vehicleNodeIndex;
|
||||||
|
unsigned __int16 absDynEntIndex;
|
||||||
|
Weapon weapon;
|
||||||
|
uint64_t val;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct scr_entref_t
|
||||||
|
{
|
||||||
|
EntRefUnion u;
|
||||||
|
unsigned __int16 classnum;
|
||||||
|
LocalClientNum_t client;
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(scr_entref_t) == 0x10);
|
||||||
|
|
||||||
enum scriptInstance_t
|
enum scriptInstance_t
|
||||||
{
|
{
|
||||||
SCRIPTINSTANCE_SERVER = 0x0,
|
SCRIPTINSTANCE_SERVER = 0x0,
|
||||||
|
Loading…
Reference in New Issue
Block a user