Facepunch / garrysmod-issues

Garry's Mod issue tracker
145 stars 56 forks source link

EntityRemoved fullupdate parameter is falsely true in some cases #5884

Open thegrb93 opened 5 months ago

thegrb93 commented 5 months ago

Deleting entities on the same command as other commands can cause fullupdate to be true when it shouldn't be. record fix;stop;gmod_undo

robotboy655 commented 5 months ago

I don't see how this would be avoidable. When client receives a full update, it just deletes all entities clientside. There's no real distinction whether it was deleted on the server first or not.

The argument is just that - whether the entity was deleted during a full update or not - not whether the entity was deleted on server or not. The server does not even write deletions of server entities if it is a full update, which would be processed after full update deletions are.

thegrb93 commented 5 months ago

So you're saying, when a fullupdate happens, any entities deleted at the same time serverside will just not be included in the fullupdate, and the client won't know the entity is actually deleted.

robotboy655 commented 5 months ago

No.

During full update all entities are re-networked, so there's no logical reason for the delta deletions to be written to the client. The client then simply deletes all entities clientside, and respawns the full list of them as necessary.

Obviously the entity data is processed after deleting them all first.

thegrb93 commented 5 months ago

Is it possible to call the hook a second time with the fullupdate set to false? Otherwise, I can just revert my code to how I had it before that parameter was added.

robotboy655 commented 5 months ago

That would just fuck up a lot of logic addons already have, wouldn't it?