set sv_clones 0 "number of clones a player may make (reset by the \"kill\" command)"
-set cl_handicap 1 "the higher, the more damage you will receive (client setting) NOTE: reconnect or use sendcvar command to update the choice."
+set cl_handicap 1 "multiplies damage received and divides damage dealt NOTE: reconnect or use 'sendcvar cl_handicap' to update the choice."
seta cl_clippedspectating 1 "movement collision for spectators so that you can't pass through walls and such. (client setting) NOTE: reconnect or use sendcvar command to update the choice."
// =================
// gamestart hooks
// =================
-seta cl_matchcount 0 // incremented by cl_hook_gameend and used by playerstats to know when to
+seta cl_matchcount 0 // incremented by cl_hook_gameend and used by playerstats to know when to
alias _cl_hook_gamestart "set _cl_hook_gametype $1; _cl_hook_gamestart_stage2"
alias _cl_hook_gamestart_stage2 "cl_hook_gamestart_all; cl_hook_gamestart_${_cl_hook_gametype}"
alias cl_hook_gamestart_all
set g_ctf_dropped_capture_radius 100 "allow dropped flags to be automatically captured by base flags if the dropped flag is within this radius of it"
set g_ctf_flag_damageforcescale 2
set g_ctf_portalteleport 0 "allow flag carriers to go through portals made in portal gun without dropping the flag"
-set g_ctf_reverse 0 "if enabled, flags positions are switched: you have to capture the enemy's flag from your own base by bringing it to your own flag in the enemy base"
+set g_ctf_reverse 0 "if enabled, you score by bringing your own flag to an enemy's flag in their base"
set g_ctf_flag_collect_delay 1
set g_ctf_flag_health 0
set g_ctf_flag_dropped_waypoint 2 "show dropped flag waypointsprite when a flag is lost. 1 = team only, 2 = for all players"
bool autocvar_g_breakablehook; // allow toggling mid match?
bool autocvar_g_breakablehook_owner;
-MUTATOR_HOOKFUNCTION(breakablehook, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(breakablehook, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
}
}
-MUTATOR_HOOKFUNCTION(buffs, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(buffs, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
Kill_Notification(NOTIF_ONE, frag_target, MSG_CENTER, CPID_CAMPCHECK);
}
-MUTATOR_HOOKFUNCTION(campcheck, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(campcheck, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
return true;
}
-MUTATOR_HOOKFUNCTION(mutator_instagib, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(mutator_instagib, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
.float midair_shieldtime;
-MUTATOR_HOOKFUNCTION(midair, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(midair, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
nades_RemoveBonus(frag_target);
}
-MUTATOR_HOOKFUNCTION(nades, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(nades, Damage_Calculate)
{
entity frag_inflictor = M_ARGV(0, entity);
entity frag_attacker = M_ARGV(1, entity);
return (ent.ammo_charge[wep] >= cvar(sprintf("g_overkill_ammo_decharge_%s", wepent.netname)));
}
-MUTATOR_HOOKFUNCTION(ok, PlayerDamage_Calculate, CBC_ORDER_LAST)
+MUTATOR_HOOKFUNCTION(ok, Damage_Calculate, CBC_ORDER_LAST)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
float frag_deathtype = M_ARGV(3, float);
- if(IS_PLAYER(frag_attacker) && IS_PLAYER(frag_target))
+ if(IS_PLAYER(frag_attacker) && (IS_PLAYER(frag_target) || IS_VEHICLE(frag_target) || IS_TURRET(frag_target)))
if(DEATH_ISWEAPON(frag_deathtype, WEP_BLASTER))
{
if(frag_attacker != frag_target)
- if(frag_target.health > 0)
- if(STAT(FROZEN, frag_target) == 0)
+ if(!STAT(FROZEN, frag_target))
if(!IS_DEAD(frag_target))
{
Send_Notification(NOTIF_ONE, frag_attacker, MSG_CENTER, CENTER_SECONDARY_NODAMAGE);
wep.nextthink = time + 0.1;
return true;
}
-
- if(ent.classname == "item_invincible")
+ else if(ent.classname == "item_invincible")
{
entity wep = new(weapon_rpc);
setorigin(wep, ent.origin);
REGISTER_MUTATOR(rm, cvar("g_instagib"));
-MUTATOR_HOOKFUNCTION(rm, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(rm, Damage_Calculate)
{
// we do it this way, so rm can be toggled during the match
if(!autocvar_g_rm) { return; }
}
// should this be changed at all? If so, in what way?
- MUTATOR_CALLHOOK(PlayerDamage_Calculate, inflictor, attacker, targ, deathtype, damage, mirrordamage, force);
+ MUTATOR_CALLHOOK(Damage_Calculate, inflictor, attacker, targ, deathtype, damage, mirrordamage, force);
damage = M_ARGV(4, float);
mirrordamage = M_ARGV(5, float);
force = M_ARGV(6, vector);
* called to adjust damage and force values which are applied to the player, used for e.g. strength damage/force multiplier
* i'm not sure if I should change this around slightly (Naming of the entities, and also how they're done in g_damage).
*/
-#define EV_PlayerDamage_Calculate(i, o) \
+#define EV_Damage_Calculate(i, o) \
/** inflictor */ i(entity, MUTATOR_ARGV_0_entity) \
/** attacker */ i(entity, MUTATOR_ARGV_1_entity) \
/** target */ i(entity, MUTATOR_ARGV_2_entity) \
/** force */ i(vector, MUTATOR_ARGV_6_vector) \
/** force */ o(vector, MUTATOR_ARGV_6_vector) \
/**/
-MUTATOR_HOOKABLE(PlayerDamage_Calculate, EV_PlayerDamage_Calculate);
+MUTATOR_HOOKABLE(Damage_Calculate, EV_Damage_Calculate);
/**
* Called when a player is damaged
start_ammo_fuel = warmup_start_ammo_fuel = cvar("g_lms_start_ammo_fuel");
}
-MUTATOR_HOOKFUNCTION(ca, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(ca, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
WaypointSprite_UpdateHealth(player.wps_flagcarrier, '1 0 0' * healtharmor_maxdamage(player.health, player.armorvalue, autocvar_g_balance_armor_blockpercent, DEATH_WEAPON.m_id));
}
-MUTATOR_HOOKFUNCTION(ctf, PlayerDamage_Calculate) // for changing damage and force values that are applied to players in g_damage.qc
+MUTATOR_HOOKFUNCTION(ctf, Damage_Calculate) // for changing damage and force values that are applied to players in g_damage.qc
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
return true;
}
-MUTATOR_HOOKFUNCTION(cts, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(cts, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
player.bot_attack = false;
}
-MUTATOR_HOOKFUNCTION(inv, PlayerDamage_Calculate)
+MUTATOR_HOOKFUNCTION(inv, Damage_Calculate)
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
}
}
-MUTATOR_HOOKFUNCTION(ka, PlayerDamage_Calculate) // for changing damage and force values that are applied to players in g_damage.qc
+MUTATOR_HOOKFUNCTION(ka, Damage_Calculate) // for changing damage and force values that are applied to players in g_damage.qc
{
entity frag_attacker = M_ARGV(1, entity);
entity frag_target = M_ARGV(2, entity);
if(!DEATH_ISSPECIAL(deathtype))
{
- damage *= sqrt(bound(1.0, this.cvar_cl_handicap, 100.0));
+ damage *= bound(1.0, this.cvar_cl_handicap, 10.0);
if(this != attacker)
- damage /= sqrt(bound(1.0, attacker.cvar_cl_handicap, 100.0));
+ damage /= bound(1.0, attacker.cvar_cl_handicap, 10.0);
}
if (time < this.spawnshieldtime && autocvar_g_spawnshield_blockdamage < 1)