Skip to content

Commit

Permalink
Fix missing var "sv_areanodes" in fallguys.so init procedure, which w…
Browse files Browse the repository at this point in the history
…as leading to crash under linux.
  • Loading branch information
hzqst committed Feb 21, 2023
1 parent 5d96572 commit 7fec72f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fallguys/engine_hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void SV_ClipToLinksEx(areanode_t *node, moveclip_t *clip)

if (pg_groupop)
{
if (touch->v.groupinfo != 0 && (clip->passedict && clip->passedict->v.groupinfo != 0))
if (touch->v.groupinfo != 0 && clip->passedict && clip->passedict->v.groupinfo != 0)
{
if ((*pg_groupop) == GROUP_OP_AND && (touch->v.groupinfo & clip->passedict->v.groupinfo) == 0)
continue;
Expand All @@ -104,7 +104,7 @@ void SV_ClipToLinksEx(areanode_t *node, moveclip_t *clip)
if (touch == clip->passedict)
continue;

if (gpNewDllFunctionsTable->pfnShouldCollide)
if (gpNewDllFunctionsTable && gpNewDllFunctionsTable->pfnShouldCollide)
{
if (gpNewDllFunctionsTable->pfnShouldCollide(touch, clip->passedict) == 0)
continue;
Expand Down
3 changes: 3 additions & 0 deletions fallguys/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
#ifdef _WIN32

VAR_FROM_SIGNATURE_FROM_START(engine, sv_models, 13);

VAR_FROM_SIGNATURE_FROM_END(engine, host_frametime, 0);
VAR_FROM_SIGNATURE_FROM_END(engine, pmovevars, 0);
VAR_FROM_SIGNATURE_FROM_START(engine, sv_areanodes, 9);
Expand All @@ -204,6 +205,8 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,

VAR_FROM_SIGNATURE(engine, host_frametime);
VAR_FROM_SIGNATURE(engine, pmovevars);
VAR_FROM_SIGNATURE(engine, sv_areanodes);

VAR_FROM_SIGNATURE(engine, pg_groupop);
VAR_FROM_SIGNATURE(engine, pg_groupmask);

Expand Down

0 comments on commit 7fec72f

Please sign in to comment.