Skip to content

Commit ab829e1

Browse files
author
nitrocaster
committed
Delete parental control check.
1 parent 706fce4 commit ab829e1

File tree

1 file changed

+0
-64
lines changed

1 file changed

+0
-64
lines changed

src/xrEngine/x_ray.cpp

Lines changed: 0 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -688,11 +688,6 @@ void foo()
688688

689689
ENGINE_API bool g_dedicated_server = false;
690690

691-
#ifndef DEDICATED_SERVER
692-
// forward declaration for Parental Control checks
693-
BOOL IsPCAccessAllowed();
694-
#endif // DEDICATED_SERVER
695-
696691
int APIENTRY WinMain_impl(HINSTANCE hInstance,
697692
HINSTANCE hPrevInstance,
698693
char* lpCmdLine,
@@ -735,14 +730,6 @@ int APIENTRY WinMain_impl(HINSTANCE hInstance,
735730
// Check for virtual memory
736731
if ((strstr(lpCmdLine, "--skipmemcheck") == NULL) && IsOutOfVirtualMemory())
737732
return 0;
738-
739-
// Parental Control for Vista and upper
740-
if (!IsPCAccessAllowed())
741-
{
742-
MessageBox(NULL, "Access restricted", "Parental Control", MB_OK | MB_ICONERROR);
743-
return 1;
744-
}
745-
746733
// Check for another instance
747734
#ifdef NO_MULTI_INSTANCES
748735
#define STALKER_PRESENCE_MUTEX "Local\\STALKER-COP"
@@ -1440,57 +1427,6 @@ void CApplication::LoadAllArchives()
14401427
}
14411428
}
14421429

1443-
#ifndef DEDICATED_SERVER
1444-
// Parential control for Vista and upper
1445-
typedef BOOL(*PCCPROC)(CHAR*);
1446-
1447-
BOOL IsPCAccessAllowed()
1448-
{
1449-
CHAR szPCtrlChk[MAX_PATH], szGDF[MAX_PATH], *pszLastSlash;
1450-
HINSTANCE hPCtrlChk = NULL;
1451-
PCCPROC pctrlchk = NULL;
1452-
BOOL bAllowed = TRUE;
1453-
1454-
if (!GetModuleFileName(NULL, szPCtrlChk, MAX_PATH))
1455-
return TRUE;
1456-
1457-
if ((pszLastSlash = strrchr(szPCtrlChk, '\\')) == NULL)
1458-
return TRUE;
1459-
1460-
*pszLastSlash = '\0';
1461-
1462-
strcpy_s(szGDF, szPCtrlChk);
1463-
1464-
strcat_s(szPCtrlChk, "\\pctrlchk.dll");
1465-
if (GetFileAttributes(szPCtrlChk) == INVALID_FILE_ATTRIBUTES)
1466-
return TRUE;
1467-
1468-
if ((pszLastSlash = strrchr(szGDF, '\\')) == NULL)
1469-
return TRUE;
1470-
1471-
*pszLastSlash = '\0';
1472-
1473-
strcat_s(szGDF, "\\Stalker-COP.exe");
1474-
if (GetFileAttributes(szGDF) == INVALID_FILE_ATTRIBUTES)
1475-
return TRUE;
1476-
1477-
if ((hPCtrlChk = LoadLibrary(szPCtrlChk)) == NULL)
1478-
return TRUE;
1479-
1480-
if ((pctrlchk = (PCCPROC)GetProcAddress(hPCtrlChk, "pctrlchk")) == NULL)
1481-
{
1482-
FreeLibrary(hPCtrlChk);
1483-
return TRUE;
1484-
}
1485-
1486-
bAllowed = pctrlchk(szGDF);
1487-
1488-
FreeLibrary(hPCtrlChk);
1489-
1490-
return bAllowed;
1491-
}
1492-
#endif // DEDICATED_SERVER
1493-
14941430
//launcher stuff----------------------------
14951431
extern "C" {
14961432
typedef int __cdecl LauncherFunc(int);

0 commit comments

Comments
 (0)