refactor(TakeControlOfEnt): Return true if has control

This commit is contained in:
Yimura
2021-01-13 16:54:49 +01:00
parent ff6a72405b
commit 05d890653c

View File

@ -123,7 +123,8 @@ namespace big::features::functions
bool take_control_of_entity(Entity ent) 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); NETWORK::NETWORK_REQUEST_CONTROL_OF_ENTITY(ent);