CloseHandle -> delete

This commit is contained in:
neon
2019-07-07 22:44:43 +02:00
parent 4dd4ff521b
commit eeba405984
18 changed files with 258 additions and 292 deletions
+6 -6
View File
@@ -61,19 +61,19 @@ public void OnPluginStart()
}
if(GameConfGetOffset(hGameConf, "GetSlot") == -1)
{
CloseHandle(hGameConf);
delete hGameConf;
SetFailState("Couldn't get GetSlot offset from game config!");
return;
}
if(GameConfGetOffset(hGameConf, "BumpWeapon") == -1)
{
CloseHandle(hGameConf);
delete hGameConf;
SetFailState("Couldn't get BumpWeapon offset from game config!");
return;
}
if(GameConfGetOffset(hGameConf, "OnPickedUp") == -1)
{
CloseHandle(hGameConf);
delete hGameConf;
SetFailState("Couldn't get OnPickedUp offset from game config!");
return;
}
@@ -82,7 +82,7 @@ public void OnPluginStart()
StartPrepSDKCall(SDKCall_Entity);
if(!PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "GetSlot"))
{
CloseHandle(hGameConf);
delete hGameConf;
SetFailState("PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, \"GetSlot\" failed!");
return;
}
@@ -93,7 +93,7 @@ public void OnPluginStart()
StartPrepSDKCall(SDKCall_Player);
if(!PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "BumpWeapon"))
{
CloseHandle(hGameConf);
delete hGameConf;
SetFailState("PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, \"BumpWeapon\" failed!");
return;
}
@@ -105,7 +105,7 @@ public void OnPluginStart()
StartPrepSDKCall(SDKCall_Entity);
if(!PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, "OnPickedUp"))
{
CloseHandle(hGameConf);
delete hGameConf;
SetFailState("PrepSDKCall_SetFromConf(hGameConf, SDKConf_Virtual, \"OnPickedUp\" failed!");
return;
}