fix: clear out graph editor upon player disconnect

This commit is contained in:
dmitry 2022-01-29 12:20:11 +03:00
commit 81a308de21
No known key found for this signature in database
GPG key ID: 8297CE728B7A7E37

View file

@ -239,6 +239,11 @@ CR_EXPORT int GetEntityAPI (gamefuncs_t *table, int) {
} }
} }
// clear the graph editor upon disconnect
if (ent == graph.getEditor ()) {
graph.setEditor (nullptr);
}
if (game.is (GameFlags::Metamod)) { if (game.is (GameFlags::Metamod)) {
RETURN_META (MRES_IGNORED); RETURN_META (MRES_IGNORED);
} }