Remove ABS in favor of Math::abs

This commit is contained in:
kobewi 2022-11-30 17:56:32 +01:00
parent 3d9b05ad4a
commit 10f6c01b9c
68 changed files with 142 additions and 146 deletions

View file

@ -301,7 +301,7 @@ void SceneRPCInterface::_send_rpc(Node *p_node, int p_to, uint16_t p_rpc_id, con
ERR_FAIL_COND_MSG(p_argcount > 255, "Too many arguments (>255).");
if (p_to != 0 && !multiplayer->get_connected_peers().has(ABS(p_to))) {
if (p_to != 0 && !multiplayer->get_connected_peers().has(Math::abs(p_to))) {
ERR_FAIL_COND_MSG(p_to == multiplayer->get_unique_id(), "Attempt to call RPC on yourself! Peer unique ID: " + itos(multiplayer->get_unique_id()) + ".");
ERR_FAIL_MSG("Attempt to call RPC with unknown peer ID: " + itos(p_to) + ".");