mirror of
https://github.com/rehlds/reapi.git
synced 2025-01-16 00:28:17 +03:00
Minor refactoring rg_round_end
This commit is contained in:
parent
396e15a81d
commit
b9f817a5ae
@ -4280,7 +4280,7 @@ enum CWeaponBox_Members
|
||||
{
|
||||
/*
|
||||
* Description: -
|
||||
* Member type: class CBasePlayerItem *[6]
|
||||
* Member type: class CBasePlayerItem *[MAX_ITEM_TYPES]
|
||||
* Get params: get_member(index, member, element);
|
||||
* Set params: set_member(index, member, value, element);
|
||||
*/
|
||||
@ -4288,15 +4288,15 @@ enum CWeaponBox_Members
|
||||
|
||||
/*
|
||||
* Description: -
|
||||
* Member type: string_t [32]
|
||||
* Get params: get_member(index, member, dest[], const lenght);
|
||||
* Set params: set_member(index, member, const source[]);
|
||||
* Member type: string_t [MAX_AMMO_SLOTS]
|
||||
* Get params: get_member(index, member, dest[], const lenght, element);
|
||||
* Set params: set_member(index, member, const source[], element);
|
||||
*/
|
||||
m_WeaponBox_rgiszAmmo,
|
||||
|
||||
/*
|
||||
* Description: -
|
||||
* Member type: int [32]
|
||||
* Member type: int [MAX_AMMO_SLOTS]
|
||||
* Get params: get_member(index, member, element);
|
||||
* Set params: set_member(index, member, value, element);
|
||||
*/
|
||||
|
@ -400,22 +400,25 @@ cell AMX_NATIVE_CALL rg_round_end(AMX *amx, cell *params)
|
||||
|
||||
char sentence[190], message[190];
|
||||
Q_strlcpy(sentence, getAmxString(amx, params[arg_sentence]));
|
||||
Q_strlcpy(message, getAmxString(amx, params[arg_message]));
|
||||
Q_strlcpy(message, getAmxString(amx, params[arg_message]));
|
||||
|
||||
const char *_sentence = sentence;
|
||||
const char *_message = message;
|
||||
|
||||
if (event != ROUND_NONE) {
|
||||
auto& lst = msg_sentence_list[event];
|
||||
if (strcmp(sentence, "default") == 0)
|
||||
Q_strlcpy(sentence, lst.sentence);
|
||||
if (strcmp(_sentence, "default") == 0)
|
||||
_sentence = lst.sentence;
|
||||
if (strcmp(message, "default") == 0)
|
||||
Q_strlcpy(message, lst.msg);
|
||||
_message = lst.msg;
|
||||
}
|
||||
|
||||
if (sentence[0] != '\0')
|
||||
if (_sentence[0] != '\0')
|
||||
{
|
||||
Broadcast(sentence);
|
||||
Broadcast(_sentence);
|
||||
}
|
||||
|
||||
CSGameRules()->EndRoundMessage(message, event);
|
||||
CSGameRules()->EndRoundMessage(_message, event);
|
||||
CSGameRules()->TerminateRound(CAmxArg(amx, params[arg_delay]), winstatus);
|
||||
return TRUE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user