From cd76ea221e10e17adeac494ef906b6dd85c97cc0 Mon Sep 17 00:00:00 2001 From: Mario Date: Tue, 3 Jan 2017 22:31:48 +1000 Subject: [PATCH] Restore ps_push --- qcsrc/common/state.qc | 3 ++- qcsrc/common/state.qh | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/qcsrc/common/state.qc b/qcsrc/common/state.qc index a9bc3e5e3..a47188422 100644 --- a/qcsrc/common/state.qc +++ b/qcsrc/common/state.qc @@ -17,7 +17,8 @@ void PlayerState_detach(entity this) PS(this) = NULL; if (ps.m_client != this) return; // don't own state, spectator - + ps.ps_push(ps, this); + FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; }); delete(ps); diff --git a/qcsrc/common/state.qh b/qcsrc/common/state.qh index 850e7ac9d..42fc450c4 100644 --- a/qcsrc/common/state.qh +++ b/qcsrc/common/state.qh @@ -33,6 +33,10 @@ CLASS(ClientState, Object) CONSTRUCT(ClientState); this.m_client = client; } + METHOD(PlayerState, ps_push, void(PlayerState this, entity cl)) + { + TC(PlayerState, this); + } ENDCLASS(ClientState) .ClientState _cs; -- 2.39.2