Some improvements
This commit is contained in:
parent
7ce3d81583
commit
ef989ae192
@ -114,11 +114,14 @@ namespace logger
|
||||
// lua stuff
|
||||
utils::hook::jump(SELECT_VALUE(0x106010_b, 0x27CBB0_b), print_dev); // debug
|
||||
utils::hook::jump(SELECT_VALUE(0x107680_b, 0x27E210_b), print_error); // error
|
||||
utils::hook::jump(SELECT_VALUE(0x0E6E30_b, 0x1F6140_b), printf); // print
|
||||
utils::hook::jump(SELECT_VALUE(0x0E6E30_b, 0x1F6140_b), print); // print
|
||||
|
||||
if (game::environment::is_mp())
|
||||
{
|
||||
utils::hook::call(0x6BBB81_b, r_warn_once_per_frame_vsnprintf_stub);
|
||||
|
||||
utils::hook::jump(0x498BD0_b, print_warning); // dmWarn
|
||||
utils::hook::jump(0x498AD0_b, print); // dmLog
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -92,7 +92,7 @@ namespace mapents
|
||||
|
||||
std::regex expr(R"~((.+) "(.*)")~");
|
||||
std::smatch match{};
|
||||
if (!std::regex_search(line, match, expr))
|
||||
if (!std::regex_search(line, match, expr) && !line.empty())
|
||||
{
|
||||
console::warn("[map_ents parser] Failed to parse line %i (%s)\n", i, line.data());
|
||||
continue;
|
||||
|
@ -112,7 +112,7 @@ namespace movement
|
||||
|
||||
const auto ps = pm->ps;
|
||||
|
||||
ps->sprintButtonUpRequired = 1;
|
||||
ps->sprintState.sprintButtonUpRequired = 1;
|
||||
|
||||
float fmove{}, smove{}, wishspeed{};
|
||||
game::vec3_t wishvel{}, wishdir{};
|
||||
|
@ -1976,6 +1976,15 @@ namespace game
|
||||
|
||||
static_assert(sizeof(gentity_s) == 736);
|
||||
|
||||
struct SprintState
|
||||
{
|
||||
int sprintButtonUpRequired;
|
||||
int sprintDelay;
|
||||
int lastSprintStart;
|
||||
int lastSprintEnd;
|
||||
int sprintStartMaxLength;
|
||||
};
|
||||
|
||||
struct playerState_s
|
||||
{
|
||||
char clientNum;
|
||||
@ -1992,7 +2001,11 @@ namespace game
|
||||
vec3_t origin;
|
||||
vec3_t velocity;
|
||||
char __pad4[312];
|
||||
int sprintButtonUpRequired;
|
||||
SprintState sprintState;
|
||||
char __pad5[88];
|
||||
int weaponState0;
|
||||
char __pad6[7040];
|
||||
int perks[2];
|
||||
};
|
||||
|
||||
static_assert(offsetof(playerState_s, pm_type) == 2);
|
||||
@ -2004,7 +2017,9 @@ namespace game
|
||||
static_assert(offsetof(playerState_s, linkFlags) == 92);
|
||||
static_assert(offsetof(playerState_s, origin) == 120);
|
||||
static_assert(offsetof(playerState_s, velocity) == 132);
|
||||
static_assert(offsetof(playerState_s, sprintButtonUpRequired) == 456);
|
||||
static_assert(offsetof(playerState_s, sprintState) == 456);
|
||||
static_assert(offsetof(playerState_s, weaponState0) == 564);
|
||||
static_assert(offsetof(playerState_s, perks) == 7608);
|
||||
|
||||
struct snapshot_s
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user