From 72b3489362fa9bbed5f9d97d5c537a7046d04a25 Mon Sep 17 00:00:00 2001 From: Syntriax Date: Fri, 2 Dec 2022 00:09:54 +0300 Subject: [PATCH] Impovement --- Bases/MovementBase.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Bases/MovementBase.cs b/Bases/MovementBase.cs index 2181431..6b88214 100644 --- a/Bases/MovementBase.cs +++ b/Bases/MovementBase.cs @@ -19,12 +19,11 @@ namespace Syntriax.Modules.Movement get => _canTakeOver; protected set { - bool oldValue = _canTakeOver; + if (value == _canTakeOver) + return; _canTakeOver = value; - - if (oldValue != value) - OnTakeOverStateChanged?.Invoke(value); + OnTakeOverStateChanged?.Invoke(value); } }