refactor(TakeControlOfEnt): Return true if has control

This commit is contained in:
Yimura 2021-01-13 16:54:49 +01:00
parent d00094de96
commit c84c5ae428
No known key found for this signature in database
GPG Key ID: 3D8FF4397E768682

View File

@ -123,7 +123,8 @@ namespace big::features::functions
bool take_control_of_entity(Entity ent)
{
for (uint8_t i = 0; !NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent) && i < 3; i++)
if (NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent)) return true;
for (uint8_t i = 0; !NETWORK::NETWORK_HAS_CONTROL_OF_ENTITY(ent) && i < 5; i++)
{
NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(ent);