mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-06 18:08:36 +00:00
Correction for sourcemod use the new teleportation check gamedata registry from now on. (#2235)
* - Fixes for OnPlayerTeleport hook for linux and linux64 systems - Changed signature call of `CanPlayerTeleport` for linux/linux64 to current used name - Applied fix at detour class CanPlayerBeTeleported to use standard parameter proceedings for linux * Created a new registry for Teleportation Checking, marking the old one obsolete for older Sourcemod versions. * Correction for sourcemod use the correct registry from now on.
This commit is contained in:
parent
52211de8e9
commit
3cd6ce9bb0
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "teleporter.h"
|
#include "teleporter.h"
|
||||||
|
|
||||||
CDetour *canPlayerTeleportDetour = NULL;
|
CDetour *canPlayerBeTeleportedDetour = NULL;
|
||||||
|
|
||||||
IForward *g_teleportForward = NULL;
|
IForward *g_teleportForward = NULL;
|
||||||
|
|
||||||
@ -84,11 +84,11 @@ DETOUR_DECL_MEMBER1(CanPlayerBeTeleported, bool, CTFPlayer *, pPlayer)
|
|||||||
|
|
||||||
bool InitialiseTeleporterDetour()
|
bool InitialiseTeleporterDetour()
|
||||||
{
|
{
|
||||||
canPlayerTeleportDetour = DETOUR_CREATE_MEMBER(CanPlayerBeTeleported, "CanPlayerTeleport");
|
canPlayerBeTeleportedDetour = DETOUR_CREATE_MEMBER(CanPlayerBeTeleported, "CanPlayerBeTeleported");
|
||||||
|
|
||||||
if (canPlayerTeleportDetour != NULL)
|
if (canPlayerBeTeleportedDetour != NULL)
|
||||||
{
|
{
|
||||||
canPlayerTeleportDetour->EnableDetour();
|
canPlayerBeTeleportedDetour->EnableDetour();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -99,9 +99,9 @@ bool InitialiseTeleporterDetour()
|
|||||||
|
|
||||||
void RemoveTeleporterDetour()
|
void RemoveTeleporterDetour()
|
||||||
{
|
{
|
||||||
if (canPlayerTeleportDetour != NULL)
|
if (canPlayerBeTeleportedDetour != NULL)
|
||||||
{
|
{
|
||||||
canPlayerTeleportDetour->Destroy();
|
canPlayerBeTeleportedDetour->Destroy();
|
||||||
canPlayerTeleportDetour = NULL;
|
canPlayerBeTeleportedDetour = NULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user