Fixed problem on OBV where alternately loaded plugins (CreateInterface_MMS) could be incorrectly told they were on the OB engine (
bug 4491, r=dvander).
This only happened when there was more than one plugin that loaded this way. And the first plugin to load had to fail on OBV first so that OB could be tried. It was being permanently set to OB for future plugin loads and this caused problems.
2 // Different compilation unit
4 #include "sourcehook.h"
5 #include "sourcehook_test.h"
9 int EatYams_Handler2(int a)
11 ADD_STATE(State_EatYams_Handler2_Called(a));
12 RETURN_META_VALUE_NEWPARAMS(MRES_OVERRIDE, 6, &IGaben::EatYams, (0xBEEF));
15 int EatYams_Handler3(int a)
17 ADD_STATE(State_EatYams_Handler3_Called(a));
18 RETURN_META_VALUE(MRES_IGNORED, 0);
23 bool TestBail2(std::string &error)
27 SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler2), false);
28 SH_ADD_HOOK(IGaben, EatYams, g_Gabgab, SH_STATIC(EatYams_Handler3), false);
30 int ret = g_Gabgab->EatYams(0xDEAD);
32 CHECK_COND(ret == 6, "Part 2.1");