chore: change C-style casts to dynamic_cast (#1299)

This commit is contained in:
Rxann
2023-04-27 04:11:05 -04:00
committed by GitHub
parent d56af95cbf
commit c1da23fb05
6 changed files with 68 additions and 62 deletions

View File

@ -39,10 +39,10 @@ namespace big
if (kick)
{
g_fiber_pool->queue_job([player] {
((player_command*)command::get(RAGE_JOAAT("bailkick")))->call(player, {});
((player_command*)command::get(RAGE_JOAAT("nfkick")))->call(player, {});
dynamic_cast<player_command*>(command::get(RAGE_JOAAT("bailkick")))->call(player, {});
dynamic_cast<player_command*>(command::get(RAGE_JOAAT("nfkick")))->call(player, {});
script::get_current()->yield(700ms);
((player_command*)command::get(RAGE_JOAAT("breakup")))->call(player, {});
dynamic_cast<player_command*>(command::get(RAGE_JOAAT("breakup")))->call(player, {});
});
}
}
@ -71,7 +71,7 @@ namespace big
if (notify)
{
char notification[500]{};// I don't like using sprintf but there isn't an alternative afaik
char notification[500]{}; // I don't like using sprintf but there isn't an alternative afaik
snprintf(notification, sizeof(notification), m_notify_message, player->get_name());
g_notification_service->push_warning("Protections", notification);
}