From: Mario Date: Sat, 29 Aug 2015 05:26:46 +0000 (+1000) Subject: Add a hook for customizing player model X-Git-Tag: xonotic-v0.8.2~2003 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2e9414561b834fe00251adc940ec0b884d8c6e72;p=xonotic%2Fxonotic-data.pk3dir.git Add a hook for customizing player model --- diff --git a/qcsrc/server/cl_client.qc b/qcsrc/server/cl_client.qc index 40775abee..2b51728f8 100644 --- a/qcsrc/server/cl_client.qc +++ b/qcsrc/server/cl_client.qc @@ -362,6 +362,9 @@ void FixPlayermodel() } } + MUTATOR_CALLHOOK(FixPlayermodel, defaultmodel); + defaultmodel = ret_string; + if(defaultmodel != "") { if (defaultmodel != self.model) diff --git a/qcsrc/server/mutators/events.qh b/qcsrc/server/mutators/events.qh index ad493f4f6..3db532022 100644 --- a/qcsrc/server/mutators/events.qh +++ b/qcsrc/server/mutators/events.qh @@ -577,4 +577,10 @@ vector bullet_startpos; vector bullet_endpos; //float frag_damage; MUTATOR_HOOKABLE(FireBullet_Hit, EV_FireBullet_Hit); + +#define EV_FixPlayermodel(i, o) \ + /**/ i(string, ret_string) \ + /**/ o(string, ret_string) \ + /**/ +MUTATOR_HOOKABLE(FixPlayermodel, EV_FixPlayermodel); #endif