2
0
mirror of https://github.com/rehlds/reapi.git synced 2024-12-28 15:45:31 +03:00

Merge pull request #201 from francoromaniello/rg_round_end

FIX `rg_round_end` WINSTATUS_NONE code
This commit is contained in:
Sergey Shorokhov 2021-06-26 17:41:02 +03:00 committed by GitHub
commit 5b4fc4f132
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -55,7 +55,8 @@
enum
{
WINSTATUS_CTS = 1,
WINSTATUS_NONE = 0,
WINSTATUS_CTS,
WINSTATUS_TERRORISTS,
WINSTATUS_DRAW,
};

View File

@ -421,8 +421,9 @@ cell AMX_NATIVE_CALL rg_round_end(AMX *amx, cell *params)
CHECK_GAMERULES();
auto winstatus = params[arg_win];
if (winstatus <= 0) {
AMXX_LogError(amx, AMX_ERR_NATIVE, "%s: unknown win status %i", __FUNCTION__, winstatus);
if (winstatus < WINSTATUS_NONE || winstatus > WINSTATUS_DRAW) {
AMXX_LogError(amx, AMX_ERR_NATIVE, "%s: invalid winstatus %i, bounds(%i, %i)", __FUNCTION__, winstatus, WINSTATUS_NONE, WINSTATUS_DRAW);
return FALSE;
}