From 2e9414561b834fe00251adc940ec0b884d8c6e72 Mon Sep 17 00:00:00 2001 From: Mario Date: Sat, 29 Aug 2015 15:26:46 +1000 Subject: [PATCH] Add a hook for customizing player model --- qcsrc/server/cl_client.qc | 3 +++ qcsrc/server/mutators/events.qh | 6 ++++++ 2 files changed, 9 insertions(+) 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 -- 2.39.2