]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_fireball.qc
On second thought, undo all that shit... this system is WAYYY too hacky to
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_fireball.qc
index 9269488f9d1f9b94773ae8bd92434367d346128c..ab90c38b773ba36fd7f1a7315f5cb08ce1cf7887 100644 (file)
@@ -1,14 +1,17 @@
 #ifdef REGISTER_WEAPON
 REGISTER_WEAPON(
-/* WEP_##id */ FIREBALL,
-/* function */ w_fireball,
-/* ammotype */ ammo_none,
-/* impulse  */ 9,
-/* flags    */ WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH,
-/* rating   */ BOT_PICKUP_RATING_MID,
-/* model    */ "fireball",
-/* netname  */ "fireball",
-/* fullname */ _("Fireball")
+/* WEP_##id  */ FIREBALL,
+/* function  */ W_Fireball,
+/* ammotype  */ ammo_none,
+/* impulse   */ 9,
+/* flags     */ WEP_FLAG_SUPERWEAPON | WEP_TYPE_SPLASH,
+/* rating    */ BOT_PICKUP_RATING_MID,
+/* color     */ '1 0.5 0',
+/* modelname */ "fireball",
+/* simplemdl */ "foobar",
+/* crosshair */ "gfx/crosshairfireball",
+/* refname   */ "fireball",
+/* wepname   */ _("Fireball")
 );
 
 #define FIREBALL_SETTINGS(w_cvar,w_prop) FIREBALL_SETTINGS_LIST(w_cvar, w_prop, FIREBALL, fireball)
@@ -199,7 +202,7 @@ void W_Fireball_Attack1()
        setorigin(proj, w_shotorg);
 
        proj.movetype = MOVETYPE_FLY;
-       WEP_SETUPPROJVELOCITY_PRI(proj, fireball);
+       W_SetupProjVelocity_PRI(proj, fireball);
        proj.angles = vectoangles(proj.velocity);
        proj.touch = W_Fireball_TouchExplode;
        setsize(proj, '-16 -16 -16', '16 16 16');
@@ -249,7 +252,7 @@ void W_Fireball_Attack1_Frame0()
        weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(fireball, animtime), W_Fireball_Attack1_Frame1);
 }
 
-void W_Firemine_Think()
+void W_Fireball_Firemine_Think()
 {
        if(time > self.pushltime)
        {
@@ -275,7 +278,7 @@ void W_Firemine_Think()
        self.nextthink = time + 0.1;
 }
 
-void W_Firemine_Touch (void)
+void W_Fireball_Firemine_Touch (void)
 {
        PROJECTILE_TOUCH;
        if (other.takedamage == DAMAGE_AIM)
@@ -323,15 +326,15 @@ void W_Fireball_Attack2()
        proj.bot_dodgerating = WEP_CVAR_SEC(fireball, damage);
        proj.movetype = MOVETYPE_BOUNCE;
        proj.projectiledeathtype = WEP_FIREBALL | HITTYPE_SECONDARY;
-       proj.touch = W_Firemine_Touch;
+       proj.touch = W_Fireball_Firemine_Touch;
        PROJECTILE_MAKETRIGGER(proj);
        setsize(proj, '-4 -4 -4', '4 4 4');
        setorigin(proj, w_shotorg);
-       proj.think = W_Firemine_Think;
+       proj.think = W_Fireball_Firemine_Think;
        proj.nextthink = time;
        proj.damageforcescale = WEP_CVAR_SEC(fireball, damageforcescale);
        proj.pushltime = time + WEP_CVAR_SEC(fireball, lifetime);
-       WEP_SETUPPROJVELOCITY_UP_SEC(proj, fireball);
+       W_SetupProjVelocity_UP_SEC(proj, fireball);
 
        proj.angles = vectoangles(proj.velocity);
        proj.flags = FL_PROJECTILE;
@@ -342,7 +345,7 @@ void W_Fireball_Attack2()
        other = proj; MUTATOR_CALLHOOK(EditProjectile);
 }
 
-float w_fireball(float req)
+float W_Fireball(float req)
 {
        switch(req)
        {
@@ -400,12 +403,12 @@ float w_fireball(float req)
                        precache_sound ("weapons/fireball_fire.wav");
                        precache_sound ("weapons/fireball_fire2.wav");
                        precache_sound ("weapons/fireball_prefire2.wav");
-                       FIREBALL_SETTINGS(WEP_SKIPCVAR, WEP_SET_PROP)
+                       FIREBALL_SETTINGS(WEP_SKIP_CVAR, WEP_SET_PROP)
                        return TRUE;
                }
                case WR_SETUP:
                {
-                       self.current_ammo = ammo_none;
+                       self.ammo_field = ammo_none;
                        return TRUE;
                }
                case WR_CHECKAMMO1:
@@ -442,7 +445,7 @@ float w_fireball(float req)
 }
 #endif
 #ifdef CSQC
-float w_fireball(float req)
+float W_Fireball(float req)
 {
        switch(req)
        {
@@ -468,6 +471,11 @@ float w_fireball(float req)
                        precache_sound("weapons/fireball_impact2.wav");
                        return TRUE;
                }
+               case WR_ZOOMRETICLE:
+               {
+                       // no weapon specific image for this weapon
+                       return FALSE;
+               }
        }
 
        return TRUE;