float autocvar_g_ctf_flag_returntime;
float autocvar_g_ctf_flag_return_when_unreachable;
float autocvar_g_ctf_flag_take_damage;
-float autocvar_g_ctf_flagcarrier_selfdamage;
-float autocvar_g_ctf_flagcarrier_selfforce;
+float autocvar_g_ctf_flagcarrier_selfdamagefactor;
+float autocvar_g_ctf_flagcarrier_selfforcefactor;
+float autocvar_g_ctf_flagcarrier_damagefactor;
+float autocvar_g_ctf_flagcarrier_forcefactor;
float autocvar_g_ctf_fullbrightflags;
float autocvar_g_ctf_ignore_frags;
float autocvar_g_ctf_shield_force;
void ctf_Handle_Pickup_Dropped(entity flag, entity player)
{
// declarations
- float returnscore = (autocvar_g_ctf_flag_returntime ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_returntime) - time) / autocvar_g_ctf_flag_returntime, 1) : 0);
+ float returnscore = (autocvar_g_ctf_flag_returntime ? bound(0, ((flag.ctf_droptime + autocvar_g_ctf_flag_returntime) - time) / autocvar_g_ctf_flag_returntime, 1) : 1);
entity tmp_player; // temporary entity which the FOR_EACH_PLAYER loop uses to scan players
string verbosename; // holds the name of the player OR no name at all for printing in the centerprints
// Hook Functions
// ==============
-MUTATOR_HOOKFUNCTION(ctf_RemovePlayer)
+MUTATOR_HOOKFUNCTION(ctf_HookedDrop)
{
if(self.flagcarried) { ctf_Handle_Drop(self, DROPTYPE_NORMAL); }
return 0;
}
MUTATOR_HOOKFUNCTION(ctf_PlayerDamage) // for changing damage and force values that are applied to players in g_damage.qc
-{ /*
+{
if(frag_attacker.flagcarried) // if the attacker is a flagcarrier
{
if(frag_target == frag_attacker) // damage done to yourself
frag_damage *= autocvar_g_ctf_flagcarrier_selfdamagefactor;
frag_force *= autocvar_g_ctf_flagcarrier_selfforcefactor;
}
- else // damage done to noncarriers
+ else // damage done everyone else
{
frag_damage *= autocvar_g_ctf_flagcarrier_damagefactor;
frag_force *= autocvar_g_ctf_flagcarrier_forcefactor;
}
- }*/
+ }
return 0;
}
ctf_captureshield_min_negscore = autocvar_g_ctf_shield_min_negscore;
ctf_captureshield_max_ratio = autocvar_g_ctf_shield_max_ratio;
ctf_captureshield_force = autocvar_g_ctf_shield_force;
-
- //g_ctf_win_mode = cvar("g_ctf_win_mode");
InitializeEntity(world, ctf_DelayedInit, INITPRIO_GAMETYPE);
}
MUTATOR_DEFINITION(gamemode_ctf)
{
- MUTATOR_HOOK(MakePlayerObserver, ctf_RemovePlayer, CBC_ORDER_ANY);
- MUTATOR_HOOK(ClientDisconnect, ctf_RemovePlayer, CBC_ORDER_ANY);
- MUTATOR_HOOK(PlayerDies, ctf_RemovePlayer, CBC_ORDER_ANY);
+ MUTATOR_HOOK(MakePlayerObserver, ctf_HookedDrop, CBC_ORDER_ANY);
+ MUTATOR_HOOK(ClientDisconnect, ctf_HookedDrop, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PlayerDies, ctf_HookedDrop, CBC_ORDER_ANY);
+ MUTATOR_HOOK(PortalTeleport, ctf_HookedDrop, CBC_ORDER_ANY);
MUTATOR_HOOK(GiveFragsForKill, ctf_GiveFragsForKill, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerPreThink, ctf_PlayerPreThink, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerDamage_Calculate, ctf_PlayerDamage, CBC_ORDER_ANY);
MUTATOR_HOOK(PlayerUseKey, ctf_PlayerUseKey, CBC_ORDER_ANY);
- //MUTATOR_HOOK(PlayerPowerups, ctf_PlayerPowerups, CBC_ORDER_ANY);
MUTATOR_ONADD
{