FIX Central_position metod
This commit is contained in:
parent
99e637fc8b
commit
32dd6dfce7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user