mirror of
https://github.com/rehlds/reapi.git
synced 2025-01-16 00:28:17 +03:00
Fix rg_round_end winstatus none
winstatus 0 is a valid status
This commit is contained in:
parent
10332fecbb
commit
3db74f943d
@ -55,7 +55,8 @@
|
||||
|
||||
enum
|
||||
{
|
||||
WINSTATUS_CTS = 1,
|
||||
WINSTATUS_NONE = 0,
|
||||
WINSTATUS_CTS,
|
||||
WINSTATUS_TERRORISTS,
|
||||
WINSTATUS_DRAW,
|
||||
};
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user