X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fweapons%2Fweapon%2Fporto.qc;h=e2ac5ee796b3d51a1520fd9170a1369effe08bb9;hb=2f215c603bf1b4dd44b9d166180f535c88602e9f;hp=eaa56e50cd276d0311f6d58ba2327f94d32c9a23;hpb=62b183277ee958dbf27d096f6a9bfb322d392bbe;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/weapons/weapon/porto.qc b/qcsrc/common/weapons/weapon/porto.qc index eaa56e50c..e2ac5ee79 100644 --- a/qcsrc/common/weapons/weapon/porto.qc +++ b/qcsrc/common/weapons/weapon/porto.qc @@ -134,7 +134,8 @@ void W_Porto_Touch(entity this, entity toucher) norm = trace_plane_normal; if(trace_ent.iscreature) { - traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * STAT(PL_MIN, NULL).z, MOVE_WORLDONLY, this); + // TODO: why not use entity size? + traceline(trace_ent.origin, trace_ent.origin + '0 0 2' * PL_MIN_CONST.z, MOVE_WORLDONLY, this); if(trace_fraction >= 1) return; if(trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK || trace_dphitcontents & DPCONTENTS_PLAYERCLIP) @@ -150,7 +151,7 @@ void W_Porto_Touch(entity this, entity toucher) } else if((trace_dphitq3surfaceflags & Q3SURFACEFLAG_SLICK) || (trace_dphitcontents & DPCONTENTS_PLAYERCLIP)) { - spamsound(this, CH_SHOTS, SND(PORTO_BOUNCE), VOL_BASE, ATTEN_NORM); + spamsound(this, CH_SHOTS, SND_PORTO_BOUNCE, VOL_BASE, ATTEN_NORM); // just reflect this.right_vector = this.right_vector - 2 * trace_plane_normal * (this.right_vector * trace_plane_normal); this.angles = vectoangles(this.velocity - 2 * trace_plane_normal * (this.velocity * trace_plane_normal)); @@ -330,27 +331,21 @@ METHOD(PortoLaunch, wr_think, void(entity thiswep, entity actor, .entity weapone } else { - if(actor.porto_v_angle_held) + if(actor.(weaponentity).porto_v_angle_held) { if(!(fire & 2)) - { - actor.porto_v_angle_held = 0; - - ClientData_Touch(actor); - } + actor.(weaponentity).porto_v_angle_held = 0; } else { if(fire & 2) { - actor.porto_v_angle = actor.v_angle; - actor.porto_v_angle_held = 1; - - ClientData_Touch(actor); + actor.(weaponentity).porto_v_angle = actor.v_angle; + actor.(weaponentity).porto_v_angle_held = 1; } } - if(actor.porto_v_angle_held) - makevectors(actor.porto_v_angle); // override the previously set angles + if(actor.(weaponentity).porto_v_angle_held) + makevectors(actor.(weaponentity).porto_v_angle); // override the previously set angles if(fire & 1) if(!actor.porto_current)