@@ -97,9 +97,9 @@ void SvenBXT_FindEngineStuff()
9797 switch (pattern - patterns::engine::ClientDLL_Init.cbegin ())
9898 {
9999 default :
100- case 0 : // Sven-5.25
101- Sys_Printf (" Searching cl_enginefuncs in Sven-5.25 pattern...\n " );
102- g_lpEngfuncs = *reinterpret_cast <cl_enginefunc_t **>(reinterpret_cast <uintptr_t >(ClientDLL_Init) + 332 );
100+ case 0 : // Sven-5.23
101+ Sys_Printf (" Searching cl_enginefuncs in Sven-5.23 pattern...\n " );
102+ g_lpEngfuncs = *reinterpret_cast <cl_enginefunc_t **>(reinterpret_cast <uintptr_t >(ClientDLL_Init) + 1 );
103103
104104 if (g_lpEngfuncs)
105105 {
@@ -108,18 +108,18 @@ void SvenBXT_FindEngineStuff()
108108 }
109109 else
110110 Sys_Printf (" [Engine] Failed to find cl_enginefuncs. Can't hook client.\n " );
111+
111112 break ;
112- case 1 : // Sven-5.23
113- Sys_Printf (" Searching cl_enginefuncs in Sven-5.23 pattern...\n " );
114- g_lpEngfuncs = *reinterpret_cast <cl_enginefunc_t **>(reinterpret_cast <uintptr_t >(ClientDLL_Init) + 1 );
113+
114+ case 1 : // Sven-5.25
115+ Sys_Printf (" Searching cl_enginefuncs in Sven-5.25 pattern...\n " );
116+ g_lpEngfuncs = *reinterpret_cast <cl_enginefunc_t **>(reinterpret_cast <uintptr_t >(ClientDLL_Init) + 332 );
115117
116118 if (g_lpEngfuncs)
117119 {
118120 Sys_Printf (" [Engine] Found cl_enginefuncs at 0x%p.\n " , g_lpEngfuncs);
119121 SvenBXT_HookClient ();
120122 }
121- else
122- Sys_Printf (" [Engine] Failed to find cl_enginefuncs. Can't hook client.\n " );
123123 break ;
124124 case 2 : // Sven-5.26-rc1
125125 Sys_Printf (" Searching cl_enginefuncs in Sven-5.26-rc1 pattern...\n " );
@@ -130,9 +130,6 @@ void SvenBXT_FindEngineStuff()
130130 Sys_Printf (" [Engine] Found cl_enginefuncs at 0x%p.\n " , g_lpEngfuncs);
131131 SvenBXT_HookClient ();
132132 }
133- else
134- Sys_Printf (" [Engine] Failed to find cl_enginefuncs. Can't hook client.\n " );
135-
136133 break ;
137134 }
138135 });
@@ -190,13 +187,12 @@ void SvenBXT_FindEngineStuff()
190187 }
191188 });
192189
193- SPTEngineFind (GL_Begin2D);
194- SPTEngineFind (GL_Finish2D);
195-
196190 SPTEngineFind (LoadThisDll);
197191 SPTEngineFind (SCR_BeginLoadingPlaque);
198192 SPTEngineFind (SCR_EndLoadingPlaque);
199193 SPTEngineFind (GL_EndRendering);
194+ SPTEngineFind (GL_Finish2D);
195+ SPTEngineFind (GL_Begin2D);
200196#endif
201197
202198 CreateHook (Engine, LoadThisDll);
0 commit comments