From: Mario Date: Mon, 27 Jun 2016 21:21:41 +0000 (+1000) Subject: Fix up the Spectate mutator hooks for CA X-Git-Tag: xonotic-v0.8.2~700^2~120 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=30ab4a9fd884625a23239d86761b9fe489f9cac5;p=xonotic%2Fxonotic-data.pk3dir.git Fix up the Spectate mutator hooks for CA --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 733b09355..f2f0f4a35 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -1735,7 +1735,6 @@ bool SpectatePrev(entity this) ent = M_ARGV(1, entity); break; case MUT_SPECPREV_RETURN: - ent = M_ARGV(1, entity); return true; case MUT_SPECPREV_CONTINUE: default: diff --git a/qcsrc/server/mutators/mutator/gamemode_ca.qc b/qcsrc/server/mutators/mutator/gamemode_ca.qc index 2a8da29c2..a581d0fa8 100644 --- a/qcsrc/server/mutators/mutator/gamemode_ca.qc +++ b/qcsrc/server/mutators/mutator/gamemode_ca.qc @@ -439,11 +439,11 @@ MUTATOR_HOOKFUNCTION(ca, SpectateSet) MUTATOR_HOOKFUNCTION(ca, SpectateNext) { entity client = M_ARGV(0, entity); - entity targ = M_ARGV(1, entity); if (!autocvar_g_ca_spectate_enemies && client.caplayer) { - targ = CA_SpectateNext(client, targ); + entity targ = M_ARGV(1, entity); + M_ARGV(1, entity) = CA_SpectateNext(client, targ); return true; } } @@ -468,6 +468,8 @@ MUTATOR_HOOKFUNCTION(ca, SpectatePrev) } } + M_ARGV(1, entity) = targ; + return MUT_SPECPREV_FOUND; }