From adf68218c5ac2b215818c755fc78d0b315d56c46 Mon Sep 17 00:00:00 2001 From: terencehill Date: Fri, 24 Aug 2018 14:33:55 +0200 Subject: [PATCH] Turn 2 vectors into ints --- qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc | 4 ++-- qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc index 536e7cd77..efbbf94e7 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qc @@ -186,7 +186,7 @@ void ctf_CalculatePassVelocity(entity flag, vector to, vector from, float turnra { //print("normal arc line failed, trying to find new pos..."); WarpZone_TraceLine(to, targpos, MOVE_NOMONSTERS, flag); - targpos = (trace_endpos + FLAG_PASS_ARC_OFFSET); + targpos = (trace_endpos + eZ * FLAG_PASS_ARC_OFFSET_Z); WarpZone_TraceLine(flag.origin, targpos, MOVE_NOMONSTERS, flag); if(trace_fraction < 1) { targpos = to; /* print(" ^1FAILURE^7, reverting to original direction.\n"); */ } /*else { print(" ^3SUCCESS^7, using new arc line.\n"); } */ @@ -934,7 +934,7 @@ void ctf_FlagThink(entity this) { this.velocity = this.velocity * 0.5; - if(pointcontents(midpoint + FLAG_FLOAT_OFFSET) == CONTENT_WATER) + if (pointcontents(midpoint + eZ * FLAG_FLOAT_OFFSET_Z) == CONTENT_WATER) { this.velocity_z = autocvar_g_ctf_flag_dropped_floatinwater; } else { set_movetype(this, MOVETYPE_FLY); } diff --git a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh index 61dcb82ae..350ad8c4f 100644 --- a/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh +++ b/qcsrc/common/gamemodes/gamemode/ctf/sv_ctf.qh @@ -43,8 +43,8 @@ const vector FLAG_DROP_OFFSET = ('0 0 32'); const vector FLAG_CARRY_OFFSET = ('-16 0 8'); #define FLAG_SPAWN_OFFSET ('0 0 1' * (PL_MAX_CONST.z - 13)) const vector FLAG_WAYPOINT_OFFSET = ('0 0 64'); -const vector FLAG_FLOAT_OFFSET = ('0 0 32'); -const vector FLAG_PASS_ARC_OFFSET = ('0 0 -10'); +const int FLAG_FLOAT_OFFSET_Z = 32; +const int FLAG_PASS_ARC_OFFSET_Z = -10; const vector VEHICLE_FLAG_OFFSET = ('0 0 96'); const float VEHICLE_FLAG_SCALE = 1.0; -- 2.39.2