]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Add a hook for customizing player model
authorMario <zacjardine@y7mail.com>
Sat, 29 Aug 2015 05:26:46 +0000 (15:26 +1000)
committerMario <zacjardine@y7mail.com>
Sat, 29 Aug 2015 05:26:46 +0000 (15:26 +1000)
qcsrc/server/cl_client.qc
qcsrc/server/mutators/events.qh

index 40775abee330a29a25ae781017f49e27aaec92dc..2b51728f8807781864dcaa6198ddf29f4a0a54c0 100644 (file)
@@ -362,6 +362,9 @@ void FixPlayermodel()
                }
        }
 
+       MUTATOR_CALLHOOK(FixPlayermodel, defaultmodel);
+       defaultmodel = ret_string;
+
        if(defaultmodel != "")
        {
                if (defaultmodel != self.model)
index ad493f4f68fd180e4eb63fe29c1574ef5d447ae8..3db53202275238ffeb7bb855891f17964365cc85 100644 (file)
@@ -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