From: Mario Date: Mon, 6 Mar 2017 10:00:05 +0000 (+1000) Subject: Make for_whom accessible to the CheckAllowedTeams mutator hook X-Git-Tag: xonotic-v0.8.2~128 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b3ab82082c3eb59a452cf42958d6bbdf686f66a;p=xonotic%2Fxonotic-data.pk3dir.git Make for_whom accessible to the CheckAllowedTeams mutator hook --- diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index 729106057..7523b3aac 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -128,6 +128,7 @@ MUTATOR_HOOKABLE(MatchEnd, EV_NO_ARGS); /**/ o(float, MUTATOR_ARGV_0_float) \ /** team entity name */ i(string, MUTATOR_ARGV_1_string) \ /**/ o(string, MUTATOR_ARGV_1_string) \ + /** player checked */ i(entity, MUTATOR_ARGV_2_entity) \ /**/ MUTATOR_HOOKABLE(CheckAllowedTeams, EV_CheckAllowedTeams); diff --git a/qcsrc/server/teamplay.qc b/qcsrc/server/teamplay.qc index 702376821..d8bf72cd6 100644 --- a/qcsrc/server/teamplay.qc +++ b/qcsrc/server/teamplay.qc @@ -224,7 +224,7 @@ void CheckAllowedTeams (entity for_whom) string teament_name = string_null; - bool mutator_returnvalue = MUTATOR_CALLHOOK(CheckAllowedTeams, teams_mask, teament_name); + bool mutator_returnvalue = MUTATOR_CALLHOOK(CheckAllowedTeams, teams_mask, teament_name, for_whom); teams_mask = M_ARGV(0, float); teament_name = M_ARGV(1, string);