]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/w_porto.qc
Merge branch 'maint' (early part before Transifex)
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / w_porto.qc
index a5c95aa403e6c8f86b3b073d6c2efdb615a49ca0..40964891d2bdcf849702533fd893214fc9c63b9e 100644 (file)
@@ -38,6 +38,8 @@ PORTO_SETTINGS(WEP_ADD_CVAR, WEP_ADD_PROP)
 #endif
 #else
 #ifdef SVQC
+#include "../triggers/trigger/jumppads.qh"
+
 void spawnfunc_weapon_porto(void) { weapon_defaultspawnfunc(WEP_PORTO); }
 
 void W_Porto_Success(void)
@@ -122,7 +124,7 @@ void W_Porto_Touch(void)
        norm = trace_plane_normal;
        if(trace_ent.iscreature)
        {
-               traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN_z, MOVE_WORLDONLY, self);
+               traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN.z, MOVE_WORLDONLY, self);
                if(trace_fraction >= 1)
                        return;
                if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)
@@ -255,11 +257,11 @@ void W_Porto_Attack(float type)
        gren.scale = 4;
        setorigin(gren, w_shotorg);
        setsize(gren, '0 0 0', '0 0 0');
-       
+
        gren.nextthink = time + WEP_CVAR_BOTH(porto, (type <= 0), lifetime);
        gren.think = W_Porto_Think;
        gren.touch = W_Porto_Touch;
-       
+
        if(self.items & IT_STRENGTH)
                W_SetupProjVelocity_Basic(gren, WEP_CVAR_BOTH(porto, (type <= 0), speed) * autocvar_g_balance_powerup_strength_force, 0);
        else
@@ -281,16 +283,16 @@ void W_Porto_Attack(float type)
        else
                CSQCProjectile(gren, true, PROJECTILE_PORTO_RED, true);
 
-       other = gren; MUTATOR_CALLHOOK(EditProjectile);
+       MUTATOR_CALLHOOK(EditProjectile, self, gren);
 }
 
-float w_nexball_weapon(float req); // WEAPONTODO
-float W_Porto(float req)
+bool w_nexball_weapon(int req); // WEAPONTODO
+bool W_Porto(int req)
 {
        //vector v_angle_save;
 
        if(g_nexball) { return w_nexball_weapon(req); }
-       
+
        switch(req)
        {
                case WR_AIM:
@@ -300,7 +302,7 @@ float W_Porto(float req)
                        if(!WEP_CVAR(porto, secondary))
                                if(bot_aim(WEP_CVAR_PRI(porto, speed), 0, WEP_CVAR_PRI(porto, lifetime), false))
                                        self.BUTTON_ATCK = true;
-                                       
+
                        return true;
                }
                case WR_CONFIG:
@@ -363,7 +365,7 @@ float W_Porto(float req)
                                        weapon_thinkf(WFRAME_FIRE1, WEP_CVAR_PRI(porto, animtime), w_ready);
                                }
                        }
-                       
+
                        return true;
                }
                case WR_INIT:
@@ -396,7 +398,7 @@ float W_Porto(float req)
 }
 #endif
 #ifdef CSQC
-float W_Porto(float req)
+bool W_Porto(int req)
 {
        switch(req)
        {