mirror of
https://github.com/rehlds/reapi.git
synced 2025-07-26 23:21:44 +03:00
host_pause
This commit is contained in:
parent
27b8e66d2f
commit
719f2f8f55
@ -293,7 +293,7 @@ native bool:rh_is_paused();
|
|||||||
*
|
*
|
||||||
* @noreturn
|
* @noreturn
|
||||||
*/
|
*/
|
||||||
native rh_set_paused(const bool:st);
|
native rh_set_paused(const bool:st, const bool:host);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Checks if a specific entity is fully packed in a given frame for a host client.
|
* Checks if a specific entity is fully packed in a given frame for a host client.
|
||||||
|
@ -382,6 +382,7 @@ struct RehldsFuncs_t {
|
|||||||
void(*RemoveExtDll)(void *hModule);
|
void(*RemoveExtDll)(void *hModule);
|
||||||
void(*RemoveCvarListener)(const char *var_name, cvar_callback_t func);
|
void(*RemoveCvarListener)(const char *var_name, cvar_callback_t func);
|
||||||
ENTITYINIT(*GetEntityInit)(char *pszClassName);
|
ENTITYINIT(*GetEntityInit)(char *pszClassName);
|
||||||
|
void(*Host_Pause)(bool setPause);
|
||||||
|
|
||||||
// Read functions
|
// Read functions
|
||||||
int(*MSG_ReadChar)();
|
int(*MSG_ReadChar)();
|
||||||
|
@ -3743,11 +3743,16 @@ cell AMX_NATIVE_CALL rh_is_paused(AMX *amx, cell *params)
|
|||||||
*
|
*
|
||||||
* native rh_set_paused(const bool:st);
|
* native rh_set_paused(const bool:st);
|
||||||
*/
|
*/
|
||||||
cell AMX_NATIVE_CALL rh_set_paused(AMX *amx, cell *params)
|
cell AMX_NATIVE_CALL rh_set_pause(AMX *amx, cell *params)
|
||||||
{
|
{
|
||||||
enum { arg_count, arg_st };
|
enum { arg_count, arg_st, arg_host };
|
||||||
g_RehldsData->SetPaused(params[arg_st] != 0);
|
bool isPause = params[arg_st] != 0;
|
||||||
|
|
||||||
|
g_RehldsData->SetPaused(isPause);
|
||||||
|
if (params[arg_host] != 0)
|
||||||
|
{
|
||||||
|
g_RehldsFuncs->Host_Pause(isPause);
|
||||||
|
}
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3764,7 +3769,7 @@ AMX_NATIVE_INFO Misc_Natives_RH[] =
|
|||||||
{ "rh_is_entity_fullpacked", rh_is_entity_fullpacked },
|
{ "rh_is_entity_fullpacked", rh_is_entity_fullpacked },
|
||||||
{ "rh_get_client_connect_time", rh_get_client_connect_time },
|
{ "rh_get_client_connect_time", rh_get_client_connect_time },
|
||||||
{ "rh_is_paused", rh_is_paused },
|
{ "rh_is_paused", rh_is_paused },
|
||||||
{ "rh_set_paused", rh_set_paused },
|
{ "rh_set_paused", rh_set_pause },
|
||||||
|
|
||||||
{ nullptr, nullptr }
|
{ nullptr, nullptr }
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user