FIX: CBA_fnc_deleteEntity looping over network and kill dedicated server #940
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a unit is created inside a group, the group locality isn't immediately the same as the unit. It is
0
, which mean theCBA_fnc_deleteEntity
isremoteExecCall
to every client. So because the unit is only local to server or one client, all others clients willremeteExecCall
again theCBA_fnc_deleteEntity
to server becausegroupOwner
can only be tested on it. So the remote execution is starting to loop between all client and server, until thegroupOwner
return a real client (not0
).Code testing the
groupOwner
command (executed server side in debug console):Returned:
This loop can dramatically kill the network (>500kbits) and the dedicated server FPS.
When merged this pull request will:
CBA_fnc_deleteEntity
execution is waiting until thegroupOwner
is correct (not0
)groupOwner
isn't0
beforeremoteExecCall
groupOwner
is0
wait until it isn't. Then_group call CBA_fnc_deleteEntity;