From 32dd6dfce7d009acbc26b2d455a148a4d7ec6171 Mon Sep 17 00:00:00 2001 From: PoliEcho Date: Wed, 19 Feb 2025 10:28:20 +0100 Subject: [PATCH] FIX Central_position metod --- src/types.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.hpp b/src/types.hpp index f6c8fa1..0d5210b 100644 --- a/src/types.hpp +++ b/src/types.hpp @@ -66,10 +66,10 @@ struct Entity { basic_cords Central_position(std::optional x = std::nullopt, std::optional y = std::nullopt) { - if (x != NULL) { + if (x != std::nullopt) { position.x = *x - position.w / 2; } - if (y != NULL) { + if (y != std::nullopt) { position.y = *y - position.h / 2; }