FIX Central_position metod

This commit is contained in:
PoliEcho 2025-02-19 10:28:20 +01:00
parent 99e637fc8b
commit 32dd6dfce7

View File

@ -66,10 +66,10 @@ struct Entity {
basic_cords Central_position(std::optional<float> x = std::nullopt,
std::optional<float> 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;
}