From 93f00462b999221474cd3d7803ae19d74fc208f7 Mon Sep 17 00:00:00 2001 From: Ceikry Date: Sun, 11 Sep 2022 12:38:44 +0000 Subject: [PATCH] Fixed a potential exploit where pvp-specific behaviors were being taken into account for PvM, resulting in potential non-halberd melee safespots --- .../kotlin/rs09/game/node/entity/combat/CombatSwingHandler.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatSwingHandler.kt b/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatSwingHandler.kt index 98cc2f513..32295924a 100644 --- a/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatSwingHandler.kt +++ b/Server/src/main/kotlin/rs09/game/node/entity/combat/CombatSwingHandler.kt @@ -234,7 +234,7 @@ abstract class CombatSwingHandler(var type: CombatStyle?) { entity.debug("Adjusting attack style") } 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 } else InteractionType.NO_INTERACT }