Fixed a potential exploit where pvp-specific behaviors were being taken into account for PvM, resulting in potential non-halberd melee safespots

This commit is contained in:
Ceikry 2022-09-11 12:38:44 +00:00 committed by Ryan
parent 17ec82d852
commit 93f00462b9

View file

@ -234,7 +234,7 @@ abstract class CombatSwingHandler(var type: CombatStyle?) {
entity.debug("Adjusting attack style") entity.debug("Adjusting attack style")
} }
if (entity.location == victim.location) { if (entity.location == victim.location) {
return if (entity.index < victim.index && victim.properties.combatPulse.getVictim() === entity) { return if (entity is Player && victim is Player && entity.clientIndex < victim.clientIndex && victim.properties.combatPulse.getVictim() === entity) {
InteractionType.STILL_INTERACT InteractionType.STILL_INTERACT
} else InteractionType.NO_INTERACT } else InteractionType.NO_INTERACT
} }