garrysmod-issues icon indicating copy to clipboard operation
garrysmod-issues copied to clipboard

Some entities are removed without calling hooks.

Open zohart75 opened this issue 11 months ago • 8 comments

Details

We've been working on some GLua optimizations when we saw that NetworkEntityCreated is called for some entities: Player [NULL] and Weapon [NULL].

EntityRemoved is not called for these. IsValid returns true.

Steps to reproduce

  1. I don't fucking know. We're still trying to figure this out.

zohart75 avatar Mar 13 '24 17:03 zohart75

@robotboy655, found the issue - x64 branch with Chromium. Even ents.GetAll() returns invalid entity.

zohart75 avatar Mar 13 '24 17:03 zohart75

Also, we need any function to check if Entity exists only on CLIENT.

zohart75 avatar Mar 13 '24 17:03 zohart75

Update: ents.GetAll works fine, but EntityRemoved isn't called for Weapon [NULL] or Player [NULL]

zohart75 avatar Mar 13 '24 17:03 zohart75

I cannot reproduce anything of the sort.

Here's me joining a dedicated server: image

Clientside only entities always have EntIndex of -1. Same for serverside only entities.

robotboy655 avatar Mar 13 '24 19:03 robotboy655

I don't know how. But there ARE entities that are called with NetworkEntityCreated multiple times and are NOT called with EntityRemoved

zohart75 avatar Mar 14 '24 11:03 zohart75

Uh i had sth like this before. I think it was caused by somehow invalidating the entities without removing them. But i cannot for my life remeber what caused it in detail

Does this happen in Singleplayer without any addons loaded? If yes what addon causes it?

oninoni avatar Mar 18 '24 16:03 oninoni

Uh i had sth like this before.

I think it was caused by somehow invalidating the entities without removing them.

But i cannot for my life remeber what caused it in detail

Does this happen in Singleplayer without any addons loaded?

If yes what addon causes it?

That's happening in the multiplayer, haven't tested it in singleplayer yet.

zohart75 avatar Mar 19 '24 12:03 zohart75

gmod_hands is one of these entities which are created but not removed.

zohart75 avatar Mar 19 '24 12:03 zohart75