From: Mario Date: Tue, 3 Jan 2017 12:31:48 +0000 (+1000) Subject: Restore ps_push X-Git-Tag: xonotic-v0.8.2~326^2~2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cd76ea221e10e17adeac494ef906b6dd85c97cc0;p=xonotic%2Fxonotic-data.pk3dir.git Restore ps_push --- 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;