Skip to content

Commit 74c1e4b

Browse files
Nerf telefrag damage to 4k if equipped with Eureka
1 parent 4b4a1e0 commit 74c1e4b

File tree

3 files changed

+33
-12
lines changed

3 files changed

+33
-12
lines changed

addons/sourcemod/configs/vsh/vsh.cfg

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,6 +1672,26 @@
16721672
"attrib" "353 ; 1.0 ; 344 ; 1.25 ; 345 ; 2.0"
16731673
}
16741674

1675+
"589" //Eureka Effect
1676+
{
1677+
"desp" "Eureka Effect: {negative}-50% damage penalty on telefrags"
1678+
1679+
"attackdamage"
1680+
{
1681+
"filter"
1682+
{
1683+
"victimuber" "0"
1684+
"damagecustom" "telefrag"
1685+
}
1686+
1687+
"params"
1688+
{
1689+
"passive" "1"
1690+
"multiply" "0.5"
1691+
}
1692+
}
1693+
}
1694+
16751695
// MEDIC
16761696

16771697
"17" //Syringe Gun

addons/sourcemod/scripting/saxtonhale.sp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1383,15 +1383,7 @@ public Action Client_OnTakeDamageAlive(int victim, int &attacker, int &inflictor
13831383
if (finalAction == Plugin_Stop)
13841384
return finalAction;
13851385

1386-
//Call damage tags
1387-
action = TagsDamage_OnTakeDamage(victim, attacker, inflictor, damage, damagetype, weapon, damageForce, damagePosition, damagecustom);
1388-
if (action > finalAction)
1389-
finalAction = action;
1390-
1391-
char sWeaponClass[64];
1392-
if (weapon > MaxClients)
1393-
GetEdictClassname(weapon, sWeaponClass, sizeof(sWeaponClass));
1394-
1386+
int iBuilder;
13951387
if (0 < attacker <= MaxClients && IsClientInGame(attacker))
13961388
{
13971389
if (!bossAttacker.bValid)
@@ -1406,7 +1398,6 @@ public Action Client_OnTakeDamageAlive(int victim, int &attacker, int &inflictor
14061398
PrintCenterText(victim, "TELEFRAG! Be careful around quantum tunneling devices!");
14071399

14081400
//Try to retrieve the entity under the player, and hopefully this is the teleporter
1409-
int iBuilder = 0;
14101401
int iGroundEntity = GetEntPropEnt(attacker, Prop_Send, "m_hGroundEntity");
14111402
if (iGroundEntity > MaxClients)
14121403
{
@@ -1417,8 +1408,8 @@ public Action Client_OnTakeDamageAlive(int victim, int &attacker, int &inflictor
14171408
iBuilder = GetEntPropEnt(iGroundEntity, Prop_Send, "m_hBuilder");
14181409
if (0 < iBuilder <= MaxClients && IsClientInGame(iBuilder))
14191410
{
1420-
if (attacker != iBuilder)
1421-
g_iPlayerAssistDamage[iBuilder] = iTelefragDamage;
1411+
if (attacker == iBuilder)
1412+
iBuilder = 0;
14221413
}
14231414
else
14241415
{
@@ -1433,6 +1424,15 @@ public Action Client_OnTakeDamageAlive(int victim, int &attacker, int &inflictor
14331424
}
14341425
}
14351426
}
1427+
1428+
//Call damage tags
1429+
action = TagsDamage_OnTakeDamage(victim, attacker, inflictor, damage, damagetype, weapon, damageForce, damagePosition, damagecustom);
1430+
if (action > finalAction)
1431+
finalAction = action;
1432+
1433+
// Give telefrag assists after tags modified it
1434+
if (iBuilder)
1435+
g_iPlayerAssistDamage[iBuilder] = RoundToNearest(damage);
14361436
}
14371437
return finalAction;
14381438
}

addons/sourcemod/scripting/vsh/tags/tags_damage.sp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ int TagsDamage_GetCustom(const char[] sDamageCustom)
142142
mDamageCustom.SetValue("noheadshot", -TF_CUSTOM_HEADSHOT); //Negative number to indicate we don't want this instead
143143
mDamageCustom.SetValue("backstab", TF_CUSTOM_BACKSTAB);
144144
mDamageCustom.SetValue("stomp", TF_CUSTOM_BOOTS_STOMP);
145+
mDamageCustom.SetValue("telefrag", TF_CUSTOM_TELEFRAG);
145146
}
146147

147148
int iDamageCustom = 0;

0 commit comments

Comments
 (0)