File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -336,7 +336,9 @@ Memory::Patch *g_drawPortalGhostPatch;
336336// C_Prop_Portal::DrawPortal
337337extern Hook g_DrawPortalHook;
338338DETOUR (Client::DrawPortal, void *pRenderContext) {
339- if (sar_portalcolor_enable.GetBool ()) {
339+ if (sar_portalcolor_enable.GetBool () &&
340+ !(!strcmp (sar_portalcolor_sp_1.GetString (), sar_portalcolor_sp_1.ThisPtr ()->m_pszDefaultValue ) &&
341+ !strcmp (sar_portalcolor_sp_2.GetString (), sar_portalcolor_sp_2.ThisPtr ()->m_pszDefaultValue ))) {
340342 g_drawPortalPatch->Execute ();
341343 } else {
342344 g_drawPortalPatch->Restore ();
@@ -353,7 +355,9 @@ static void (*g_DrawPortalGhost)(void *pRenderContext);
353355// C_Prop_Portal::DrawPortalGhostLocations
354356extern Hook g_DrawPortalGhostHook;
355357static void DrawPortalGhost_Hook (void *pRenderContext) {
356- if (sar_portalcolor_enable.GetBool ()) {
358+ if (sar_portalcolor_enable.GetBool () &&
359+ !(!strcmp (sar_portalcolor_sp_1.GetString (), sar_portalcolor_sp_1.ThisPtr ()->m_pszDefaultValue ) &&
360+ !strcmp (sar_portalcolor_sp_2.GetString (), sar_portalcolor_sp_2.ThisPtr ()->m_pszDefaultValue ))) {
357361 g_drawPortalGhostPatch->Execute ();
358362 } else {
359363 g_drawPortalGhostPatch->Restore ();
You can’t perform that action at this time.
0 commit comments