From: TimePath Date: Sun, 27 Sep 2015 07:05:34 +0000 (+1000) Subject: Turrets: Register on startup X-Git-Tag: xonotic-v0.8.2~1902 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=869cafeb2d4a3bb0856e2f428ea971cc71661797;p=xonotic%2Fxonotic-data.pk3dir.git Turrets: Register on startup --- diff --git a/qcsrc/common/turrets/all.qh b/qcsrc/common/turrets/all.qh index f91234b73..4f8a72802 100644 --- a/qcsrc/common/turrets/all.qh +++ b/qcsrc/common/turrets/all.qh @@ -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) \