From 2ede006109124b8495a5bc39d009ddc8e7eeb2ee Mon Sep 17 00:00:00 2001 From: Samual Lenks Date: Fri, 7 Sep 2012 03:07:42 -0400 Subject: [PATCH] Remove useless entity... also ADD STRENGTH MULTIPLIER FOR FLAG THROWING! --- gamemodes.cfg | 1 + qcsrc/server/autocvars.qh | 1 + qcsrc/server/mutators/gamemode_ctf.qc | 8 +++----- qcsrc/server/mutators/gamemode_ctf.qh | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gamemodes.cfg b/gamemodes.cfg index 5be357029..3b8a646fd 100644 --- a/gamemodes.cfg +++ b/gamemodes.cfg @@ -194,6 +194,7 @@ set g_ctf_flag_dropped_waypoint 2 "show dropped flag waypointsprite when a flag set g_ctf_flag_dropped_floatinwater 200 "move upwards while in water at this velocity" set g_ctf_flag_pickup_verbosename 0 "show the name of the person who picked up the flag too" set g_ctf_drop 1 "dropping allows circumventing carrierkill score, so enable this with care!" +set g_ctf_drop_strengthmultiplier 3 "multiplier for velocity when you have the strength... essentially, throw the flag REALLY hard when you have the strength :D" set g_ctf_drop_velocity 500 "how fast or far a player can throw the flag" set g_ctf_pass 1 "allow passing of flags to nearby team mates" set g_ctf_pass_radius 500 "maximum radius that you can pass to a team mate in" diff --git a/qcsrc/server/autocvars.qh b/qcsrc/server/autocvars.qh index b5d370843..d1f644c2e 100644 --- a/qcsrc/server/autocvars.qh +++ b/qcsrc/server/autocvars.qh @@ -762,6 +762,7 @@ float autocvar_g_chat_nospectators; float autocvar_g_chat_teamcolors; float autocvar_g_ctf_allow_vehicle_touch; float autocvar_g_ctf_drop; +float autocvar_g_ctf_drop_strengthmultiplier; float autocvar_g_ctf_drop_velocity; float autocvar_g_ctf_portalteleport; float autocvar_g_ctf_pass; diff --git a/qcsrc/server/mutators/gamemode_ctf.qc b/qcsrc/server/mutators/gamemode_ctf.qc index 3c756f4de..fef968985 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qc +++ b/qcsrc/server/mutators/gamemode_ctf.qc @@ -213,7 +213,6 @@ void ctf_Handle_Retrieve(entity flag, entity player) flag.movetype = MOVETYPE_NONE; flag.takedamage = DAMAGE_NO; flag.solid = SOLID_NOT; - flag.ctf_carrier = player; flag.ctf_status = FLAG_CARRY; // messages and sounds @@ -243,7 +242,7 @@ void ctf_Handle_Retrieve(entity flag, entity player) void ctf_Handle_Throw(entity player, entity receiver, float droptype) { entity flag = player.flagcarried; - vector targ_origin; + vector targ_origin, flag_velocity; if(!flag) { return; } if((droptype == DROP_PASS) && !receiver) { return; } @@ -274,7 +273,8 @@ void ctf_Handle_Throw(entity player, entity receiver, float droptype) case DROP_THROW: { makevectors((player.v_angle_y * '0 1 0') + (player.v_angle_x * '0.5 0 0')); - flag.velocity = W_CalculateProjectileVelocity(player.velocity, ('0 0 200' + (v_forward * autocvar_g_ctf_drop_velocity)), FALSE); + flag_velocity = (('0 0 200' + (v_forward * autocvar_g_ctf_drop_velocity)) * ((player.items & IT_STRENGTH) ? autocvar_g_ctf_drop_strengthmultiplier : 1)); + flag.velocity = W_CalculateProjectileVelocity(player.velocity, flag_velocity, FALSE); break; } @@ -434,7 +434,6 @@ void ctf_Handle_Pickup(entity flag, entity player, float pickuptype) flag.takedamage = DAMAGE_NO; flag.solid = SOLID_NOT; flag.angles = '0 0 0'; - flag.ctf_carrier = player; flag.ctf_status = FLAG_CARRY; switch(pickuptype) @@ -852,7 +851,6 @@ void ctf_RespawnFlag(entity flag) flag.owner = world; flag.pass_sender = world; flag.pass_target = world; - flag.ctf_carrier = world; flag.ctf_dropper = world; flag.ctf_pickuptime = 0; flag.ctf_droptime = 0; diff --git a/qcsrc/server/mutators/gamemode_ctf.qh b/qcsrc/server/mutators/gamemode_ctf.qh index a5b8b24f0..a8cfa2237 100644 --- a/qcsrc/server/mutators/gamemode_ctf.qh +++ b/qcsrc/server/mutators/gamemode_ctf.qh @@ -94,7 +94,6 @@ float ctf_captimerecord; // record time for capturing the flag .float ctf_pickuptime; .float ctf_droptime; .float ctf_status; // status of the flag (FLAG_BASE, FLAG_DROPPED, FLAG_CARRY declared globally) -.entity ctf_carrier; .entity ctf_dropper; // don't allow spam of dropping the flag .float max_flag_health; .float next_take_time; -- 2.39.2