Support for Post calls added
Now resets functions on map change
This commit is contained in:
@ -17,3 +17,128 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||
g_player_edicts[i]=pEdictList + i;
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
#define RESETD(call) \
|
||||
g_pFunctionTable->pfn##call = NULL; \
|
||||
g_pFunctionTable_Post->pfn##call = NULL; \
|
||||
Engine[FM_##call].clear(); \
|
||||
EnginePost[FM_##call].clear();
|
||||
|
||||
#define RESETE(call) \
|
||||
g_pengfuncsTable->pfn##call = NULL; \
|
||||
g_pengfuncsTable_Post->pfn##call = NULL; \
|
||||
Engine[FM_##call].clear(); \
|
||||
EnginePost[FM_##call].clear();
|
||||
|
||||
void OnPluginsLoaded()
|
||||
{
|
||||
// Reset all call lists here.
|
||||
// NULL all function tables
|
||||
RESETE(PrecacheModel);
|
||||
RESETE(PrecacheSound);
|
||||
RESETE(SetModel);
|
||||
RESETE(ModelIndex);
|
||||
RESETE(ModelFrames);
|
||||
RESETE(SetSize);
|
||||
RESETE(ChangeLevel);
|
||||
RESETE(VecToYaw);
|
||||
RESETE(VecToAngles);
|
||||
RESETE(MoveToOrigin);
|
||||
RESETE(ChangeYaw);
|
||||
RESETE(ChangePitch);
|
||||
RESETE(FindEntityByString);
|
||||
RESETE(GetEntityIllum);
|
||||
RESETE(FindEntityInSphere);
|
||||
RESETE(FindClientInPVS);
|
||||
RESETE(EntitiesInPVS);
|
||||
RESETE(MakeVectors);
|
||||
RESETE(AngleVectors);
|
||||
RESETE(CreateEntity);
|
||||
RESETE(RemoveEntity);
|
||||
RESETE(CreateNamedEntity);
|
||||
RESETE(MakeStatic);
|
||||
RESETE(EntIsOnFloor);
|
||||
RESETE(DropToFloor);
|
||||
RESETE(WalkMove);
|
||||
RESETE(SetOrigin);
|
||||
RESETE(EmitSound);
|
||||
RESETE(EmitAmbientSound);
|
||||
RESETE(TraceLine);
|
||||
RESETE(TraceToss);
|
||||
RESETE(TraceMonsterHull);
|
||||
RESETE(TraceHull);
|
||||
RESETE(TraceModel);
|
||||
RESETE(TraceTexture);
|
||||
RESETE(TraceSphere);
|
||||
RESETE(GetAimVector);
|
||||
RESETE(ParticleEffect);
|
||||
RESETE(LightStyle);
|
||||
RESETE(DecalIndex);
|
||||
RESETE(PointContents);
|
||||
RESETE(FreeEntPrivateData);
|
||||
RESETE(SzFromIndex);
|
||||
RESETE(AllocString);
|
||||
RESETE(RegUserMsg);
|
||||
RESETE(AnimationAutomove);
|
||||
RESETE(GetBonePosition);
|
||||
RESETE(GetAttachment);
|
||||
RESETE(SetView);
|
||||
RESETE(Time);
|
||||
RESETE(CrosshairAngle);
|
||||
RESETE(FadeClientVolume);
|
||||
RESETE(SetClientMaxspeed);
|
||||
RESETE(CreateFakeClient);
|
||||
RESETE(RunPlayerMove);
|
||||
RESETE(NumberOfEntities);
|
||||
RESETE(StaticDecal);
|
||||
RESETE(PrecacheGeneric);
|
||||
RESETE(BuildSoundMsg);
|
||||
RESETE(GetPhysicsKeyValue);
|
||||
RESETE(SetPhysicsKeyValue);
|
||||
RESETE(GetPhysicsInfoString);
|
||||
RESETE(PrecacheEvent);
|
||||
RESETE(PlaybackEvent);
|
||||
RESETE(CheckVisibility);
|
||||
RESETE(GetCurrentPlayer);
|
||||
RESETE(CanSkipPlayer);
|
||||
RESETE(SetGroupMask);
|
||||
RESETE(Voice_GetClientListening);
|
||||
RESETE(Voice_SetClientListening);
|
||||
RESETE(MessageBegin);
|
||||
RESETE(WriteCoord);
|
||||
RESETE(WriteAngle);
|
||||
RESETE(InfoKeyValue);
|
||||
RESETE(SetKeyValue);
|
||||
RESETE(SetClientKeyValue);
|
||||
|
||||
RESETD(GameInit);
|
||||
RESETD(Spawn);
|
||||
RESETD(Think);
|
||||
RESETD(Use);
|
||||
RESETD(Touch);
|
||||
RESETD(Blocked);
|
||||
RESETD(KeyValue);
|
||||
RESETD(SetAbsBox);
|
||||
RESETD(ClientConnect);
|
||||
RESETD(ClientDisconnect);
|
||||
RESETD(ClientKill);
|
||||
RESETD(ClientPutInServer);
|
||||
RESETD(ClientCommand);
|
||||
RESETD(ServerDeactivate);
|
||||
RESETD(PlayerPreThink);
|
||||
RESETD(PlayerPostThink);
|
||||
RESETD(StartFrame);
|
||||
RESETD(ParmsNewLevel);
|
||||
RESETD(ParmsChangeLevel);
|
||||
RESETD(GetGameDescription);
|
||||
RESETD(SpectatorConnect);
|
||||
RESETD(SpectatorDisconnect);
|
||||
RESETD(SpectatorThink);
|
||||
RESETD(Sys_Error);
|
||||
RESETD(PM_FindTextureType);
|
||||
RESETD(RegisterEncoders);
|
||||
RESETD(GetHullBounds);
|
||||
RESETD(CreateInstancedBaselines);
|
||||
RESETD(AllowLagCompensation);
|
||||
|
||||
g_pFunctionTable->pfnServerActivate = ServerActivate;
|
||||
}
|
Reference in New Issue
Block a user