fix: update immediately on player connect and disconnect

This commit is contained in:
jeefo 2023-09-10 13:08:18 +03:00
commit 4d82de8375
No known key found for this signature in database
GPG key ID: 927BCA0779BEA8ED

View file

@ -157,6 +157,9 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
} }
} }
// refresh clients immediately
util.updateClients ();
if (game.is (GameFlags::Metamod)) { if (game.is (GameFlags::Metamod)) {
RETURN_META_VALUE (MRES_IGNORED, 0); RETURN_META_VALUE (MRES_IGNORED, 0);
} }
@ -183,6 +186,9 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
} }
} }
// refresh clients immediately
util.updateClients ();
// clear the graph editor upon disconnect // clear the graph editor upon disconnect
if (ent == graph.getEditor ()) { if (ent == graph.getEditor ()) {
graph.setEditor (nullptr); graph.setEditor (nullptr);