mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-24 13:55:36 +03:00
Fixed bug am42097 (FM disabling hooks too early)
This commit is contained in:
parent
ed0312567d
commit
a8b4ebbe70
@ -27,7 +27,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||
{
|
||||
for(int i = 1; i <= gpGlobals->maxClients;i++)
|
||||
g_player_edicts[i]=pEdictList + i;
|
||||
g_pFunctionTable->pfnServerDeactivate = FMH_ServerDeactivate;
|
||||
g_pFunctionTable_Post->pfnServerDeactivate = FMH_ServerDeactivate_Post;
|
||||
RETURN_META(MRES_IGNORED);
|
||||
}
|
||||
#define RESETD(tcall) \
|
||||
@ -48,7 +48,7 @@ void ServerActivate(edict_t *pEdictList, int edictCount, int clientMax)
|
||||
Engine[FM_##call].clear(); \
|
||||
EnginePost[FM_##call].clear();
|
||||
|
||||
void FMH_ServerDeactivate()
|
||||
void FMH_ServerDeactivate_Post()
|
||||
{
|
||||
// Reset all call lists here.
|
||||
// NULL all function tables
|
||||
|
@ -105,7 +105,7 @@
|
||||
// #define FN_ClientCommand ClientCommand /* pfnClientCommand() (wd) Player has sent a command (typed or from a bind) */
|
||||
// #define FN_ClientUserInfoChanged ClientUserInfoChanged /* pfnClientUserInfoChanged() (wd) Client has updated their setinfo structure */
|
||||
#define FN_ServerActivate ServerActivate /* pfnServerActivate() (wd) Server is starting a new map */
|
||||
#define FN_ServerDeactivate FMH_ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */
|
||||
// #define FN_ServerDeactivate ServerDeactivate /* pfnServerDeactivate() (wd) Server is leaving the map (shutdown or changelevel); SDK2 */
|
||||
// #define FN_PlayerPreThink PlayerPreThink /* pfnPlayerPreThink() */
|
||||
// #define FN_PlayerPostThink PlayerPostThink /* pfnPlayerPostThink() */
|
||||
// #define FN_StartFrame StartFrame /* pfnStartFrame() */
|
||||
@ -157,7 +157,7 @@
|
||||
// #define FN_ClientCommand_Post ClientCommand_Post
|
||||
// #define FN_ClientUserInfoChanged_Post ClientUserInfoChanged_Post
|
||||
// #define FN_ServerActivate_Post ServerActivate_Post
|
||||
// #define FN_ServerDeactivate_Post ServerDeactivate_Post
|
||||
#define FN_ServerDeactivate_Post FMH_ServerDeactivate_Post
|
||||
// #define FN_PlayerPreThink_Post PlayerPreThink_Post
|
||||
// #define FN_PlayerPostThink_Post PlayerPostThink_Post
|
||||
// #define FN_StartFrame_Post StartFrame_Post
|
||||
|
18
plugins/testsuite/fakemeta_tests.sma
Normal file
18
plugins/testsuite/fakemeta_tests.sma
Normal file
@ -0,0 +1,18 @@
|
||||
#include <amxmodx>
|
||||
#include <fakemeta>
|
||||
|
||||
public plugin_init()
|
||||
{
|
||||
register_plugin("Fakemeta Tests", "1.0", "BAILOPAN")
|
||||
register_forward(FM_ServerDeactivate, "Hook_ServerDeactivate")
|
||||
}
|
||||
|
||||
public Hook_ServerDeactivate()
|
||||
{
|
||||
server_print("[FAKEMETA TEST] ServerDeactivate() at %f", get_gametime())
|
||||
}
|
||||
|
||||
public plugin_end()
|
||||
{
|
||||
server_print("[FAKEMETA TEST] plugin_end() at %f", get_gametime())
|
||||
}
|
Loading…
Reference in New Issue
Block a user