]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/porto.qc
Makefile: use `-I.`
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / porto.qc
index f992e31bda17a915172665ee8250635c5acf1647..59731c95429d3a816f00b43c9912d128d51ee381 100644 (file)
@@ -44,15 +44,13 @@ REGISTER_WEAPON(PORTO, porto, NEW(PortoLaunch));
 #endif
 #ifdef IMPLEMENTATION
 #ifdef SVQC
-#include "../../triggers/trigger/jumppads.qh"
+#include <common/triggers/trigger/jumppads.qh>
 
 spawnfunc(weapon_porto) { weapon_defaultspawnfunc(this, WEP_PORTO); }
 
 REGISTER_MUTATOR(porto_ticker, true);
 MUTATOR_HOOKFUNCTION(porto_ticker, SV_StartFrame) {
-       entity e;
-       FOR_EACH_PLAYER(e)
-               e.porto_forbidden = max(0, e.porto_forbidden - 1);
+       FOREACH_CLIENT(IS_PLAYER(it), LAMBDA(it.porto_forbidden = max(0, it.porto_forbidden - 1)));
 }
 
 void W_Porto_Success()
@@ -133,7 +131,7 @@ void W_Porto_Touch()
        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' * STAT(PL_MIN, NULL).z, MOVE_WORLDONLY, self);
                if(trace_fraction >= 1)
                        return;
                if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP)