Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hzqst committed Oct 8, 2024
1 parent 9b8260f commit 49ee582
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions fallguys/meta_api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
#include "physics.h"
#include "soundengine.h"

#ifndef _WIN32//for debugging
#include <unistd.h>
#endif

IMPORT_ASEXT_API_DEFINE();

// Must provide at least one of these..
Expand Down Expand Up @@ -243,7 +247,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
}

auto engineSize = gpMetaUtilFuncs->pfnGetImageSize(engineBase);
auto engineEnd = (char *)engineBase + engineSize;
auto engineEnd = (char*)engineBase + engineSize;

LOG_MESSAGE(PLID, "Current engine dll range: %p ~ %p!", engineBase, engineEnd);

Expand All @@ -267,7 +271,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,

LOG_MESSAGE(PLID, "Current server dll range: %p ~ %p!", serverBase, serverEnd);

void *asextHandle = NULL;
void* asextHandle = NULL;

#ifdef _WIN32
LOAD_PLUGIN(PLID, "addons/metamod/dlls/asext.dll", PLUG_LOADTIME::PT_ANYTIME, &asextHandle);
Expand All @@ -289,7 +293,7 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,
LOG_ERROR(PLID, "CreateInterface not found!");
return FALSE;
}

LOG_MESSAGE(PLID, "Current engine type: %s!", gpMetaUtilFuncs->pfnGetEngineType());

#ifdef _WIN32
Expand Down Expand Up @@ -625,6 +629,11 @@ C_DLLEXPORT int Meta_Attach(PLUG_LOADTIME /* now */,

#endif


#ifndef _WIN32//for debugging
sleep(15);
#endif

LoadFMOD();
InstallEngineHooks();
InstallServerHooks();
Expand Down

0 comments on commit 49ee582

Please sign in to comment.