Fixes: GDscript min and max are inverted
This commit is contained in:
parent
187be733aa
commit
7c6506e028
1 changed files with 2 additions and 2 deletions
|
@ -291,7 +291,7 @@ struct VariantUtilityFunctions {
|
|||
Variant ret;
|
||||
for (int i = 1; i < p_argcount; i++) {
|
||||
bool valid;
|
||||
Variant::evaluate(Variant::OP_GREATER, base, *p_args[i], ret, valid);
|
||||
Variant::evaluate(Variant::OP_LESS, base, *p_args[i], ret, valid);
|
||||
if (!valid) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.expected = base.get_type();
|
||||
|
@ -324,7 +324,7 @@ struct VariantUtilityFunctions {
|
|||
Variant ret;
|
||||
for (int i = 1; i < p_argcount; i++) {
|
||||
bool valid;
|
||||
Variant::evaluate(Variant::OP_LESS, base, *p_args[i], ret, valid);
|
||||
Variant::evaluate(Variant::OP_GREATER, base, *p_args[i], ret, valid);
|
||||
if (!valid) {
|
||||
r_error.error = Callable::CallError::CALL_ERROR_INVALID_ARGUMENT;
|
||||
r_error.expected = base.get_type();
|
||||
|
|
Loading…
Reference in a new issue