projects
/
xonotic
/
xonotic-data.pk3dir.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7d3af1
)
Reset active weapon field of the current PlayerState and update the relative STAT...
337/head
author
terencehill <piuntn@gmail.com>
Wed, 13 Jul 2016 18:17:01 +0000
(20:17 +0200)
committer
terencehill <piuntn@gmail.com>
Thu, 14 Jul 2016 09:24:42 +0000
(11:24 +0200)
qcsrc/common/state.qc
patch
|
blob
|
history
diff --git
a/qcsrc/common/state.qc
b/qcsrc/common/state.qc
index 0ffe55eb4fa50ba77a3c0c22ddb5c2b4defa2812..7c6882088dba4a604998fe824b866a66a16f2d68 100644
(file)
--- a/
qcsrc/common/state.qc
+++ b/
qcsrc/common/state.qc
@@
-15,6
+15,12
@@
void PlayerState_detach(entity this)
PlayerState ps = PS(this);
if (!ps) return; // initial connect
PS(this) = NULL;
+
+ ps.m_switchweapon = WEP_Null;
+ ps.m_weapon = WEP_Null;
+ ps.m_switchingweapon = WEP_Null;
+ ps.ps_push(ps, this);
+
if (ps.m_client != this) return; // don't own state, spectator
FOREACH_CLIENT(PS(it) == ps, { PS(it) = NULL; });
remove(ps);