]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Turrets: Register on startup
authorTimePath <andrew.hardaker1995@gmail.com>
Sun, 27 Sep 2015 07:05:34 +0000 (17:05 +1000)
committerTimePath <andrew.hardaker1995@gmail.com>
Sun, 27 Sep 2015 07:05:34 +0000 (17:05 +1000)
qcsrc/common/turrets/all.qh

index f91234b7399dddf8755fbfb8291fe50fcb34779c..4f8a728028074f31aabfc02b9ae586532d77ca2a 100644 (file)
@@ -150,9 +150,11 @@ float TUR_COUNT;
 
 #define _REGISTER_TURRET(id, func, turretflags, min_s, max_s, modelname, headmodelname, shortname, mname) \
        float func(float); \
-       REGISTER(RegisterTurrets, TUR, turret_info, TUR_COUNT, id, m_id, spawn()) { \
+       REGISTER(RegisterTurrets, TUR, turret_info, TUR_COUNT, id, m_id, NEW(Turret)) { \
                register_turret(this, func,turretflags,min_s,max_s,modelname,headmodelname,shortname,mname); \
        }
+void RegisterTurrets();
+REGISTER_REGISTRY(RegisterTurrets)
 
 #ifdef MENUQC
 #define REGISTER_TURRET(id,func,turretflags,min_s,max_s,modelname,headmodelname,shortname,mname) \