Fixed SDKHooks thinking a hook type was supported when gamedata missing (r=voided).
authorNicholas Hastings <skamonkey@gmail.com>
Thu Aug 22 21:45:19 2013 -0400 (2013-08-22)
changeset 403524784617e0dd
parent 4034 2526f3a76ddc
child 4036 646b27d3d64a
Fixed SDKHooks thinking a hook type was supported when gamedata missing (r=voided).
extensions/sdkhooks/macros.h
     1.1 --- a/extensions/sdkhooks/macros.h	Thu Aug 22 18:03:00 2013 -0700
     1.2 +++ b/extensions/sdkhooks/macros.h	Thu Aug 22 21:45:19 2013 -0400
     1.3 @@ -39,17 +39,21 @@
     1.4  	offset = 0; \
     1.5  	g_pGameConf->GetOffset(#gamedataname, &offset); \
     1.6  	if (offset > 0) \
     1.7 +	{ \
     1.8  		SH_MANUALHOOK_RECONFIGURE(gamedataname, offset, 0, 0); \
     1.9  		SET_PRE_##supportsPre(gamedataname) \
    1.10 -		SET_POST_##supportsPost(gamedataname)
    1.11 +		SET_POST_##supportsPost(gamedataname) \
    1.12 +	}
    1.13  
    1.14  #define CHECKOFFSET_W(gamedataname, supportsPre, supportsPost) \
    1.15  	offset = 0; \
    1.16  	g_pGameConf->GetOffset("Weapon_"#gamedataname, &offset); \
    1.17  	if (offset > 0) \
    1.18 +	{ \
    1.19  		SH_MANUALHOOK_RECONFIGURE(Weapon_##gamedataname, offset, 0, 0); \
    1.20  		SET_PRE_##supportsPre(Weapon##gamedataname) \
    1.21 -		SET_POST_##supportsPost(Weapon##gamedataname)
    1.22 +		SET_POST_##supportsPost(Weapon##gamedataname) \
    1.23 +	}
    1.24  
    1.25  #define HOOKLOOP \
    1.26  	for(int i = g_HookList.Count() - 1; i >= 0; i--)