* Correct serverProcessReplacement code.

* Remove the python.lib dependency from TSExtension.
This commit is contained in:
Robert MacGregor 2019-07-13 17:54:20 -07:00
parent 6cff6d2dda
commit a104302468
4 changed files with 39 additions and 42 deletions

View file

@ -1430,15 +1430,15 @@ __declspec(dllexport) void ServerProcess(unsigned int deltaTime)
}
static unsigned int gboaptr =(unsigned int ) &GameBaseOnAddHook;
extern "C"
{
TSEXTENSION_API unsigned int getModLoaderVersion(void)
{
return 0;
}
TSEXTENSION_API void ModInitialize(void)
{
extern "C"
{
TSEXTENSION_API unsigned int getModLoaderVersion(void)
{
return 0;
}
TSEXTENSION_API void ModInitialize(void)
{
// Init WSA
WSADATA wsadata;
WSAStartup(0x0202, &wsadata);
@ -1457,8 +1457,8 @@ extern "C"
//Con::addMethodB(NULL,"setAITrigger", &consetTrigger, "setAITrigger(%aicon,triggerid,value);",2,6);
Con::addMethodS("GrenadeProjectile", "getposition", &conGrenadeProjectileGetPosition,"Accurately gets the position of the GrenadeProjectile", 2, 2);
Con::addMethodS("GrenadeProjectile", "getvelocity", &conGrenadeProjectileGetVelocity,"Gets the velocity of the GrenadeProjectile", 2, 2);
Con::addMethodB("Projectile", "makeNerf", &conProjectileMakeNerf,"Makes the Projectile deal no damage", 2, 2);
Con::addMethodB("Projectile", "makeNerf", &conProjectileMakeNerf,"Makes the Projectile deal no damage", 2, 2);
// TCPObject
#ifdef ENABLE_TCPOBJECT
/*
@ -1540,22 +1540,22 @@ extern "C"
DX::memPatch(0x438415,(unsigned char *)dbpatch3,7);
DX::memPatch(0x5E29F0,(unsigned char *)gboaonadd,7);
#endif
return;
}
TSEXTENSION_API const char* getManagementName(void)
{
return "TSExtension";
}
TSEXTENSION_API ModLoader::ModLoaderCallables* getModCallables(void)
{
ModLoader::ModLoaderCallables* result = new ModLoader::ModLoaderCallables();
result->mInitializeModPointer = ModInitialize;
result->mGetManagementName = getManagementName;
return result;
}
return;
}
TSEXTENSION_API const char* getManagementName(void)
{
return "TSExtension";
}
TSEXTENSION_API ModLoader::ModLoaderCallables* getModCallables(void)
{
ModLoader::ModLoaderCallables* result = new ModLoader::ModLoaderCallables();
result->mInitializeModPointer = ModInitialize;
result->mGetManagementName = getManagementName;
return result;
}
}