mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
[qfcc] Use float for v6 comparisons
While simple types used floats, functions, vectors and entities used ints. This doesn't go so well when compiling for v6 progs.
This commit is contained in:
parent
67eb38173b
commit
b7ad02c71d
1 changed files with 9 additions and 0 deletions
|
@ -796,6 +796,9 @@ func_compare (int op, expr_t *e1, expr_t *e2)
|
|||
new_alias_expr (&type_int, e2));
|
||||
}
|
||||
e->e.expr.type = &type_int;
|
||||
if (options.code.progsversion == PROG_ID_VERSION) {
|
||||
e->e.expr.type = &type_float;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
|
@ -814,6 +817,9 @@ vector_compare (int op, expr_t *e1, expr_t *e2)
|
|||
if (options.code.progsversion < PROG_VERSION) {
|
||||
expr_t *e = new_binary_expr (op, e1, e2);
|
||||
e->e.expr.type = &type_int;
|
||||
if (options.code.progsversion == PROG_ID_VERSION) {
|
||||
e->e.expr.type = &type_float;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
int hop = op == EQ ? '&' : '|';
|
||||
|
@ -903,6 +909,9 @@ entity_compare (int op, expr_t *e1, expr_t *e2)
|
|||
}
|
||||
expr_t *e = new_binary_expr (op, e1, e2);
|
||||
e->e.expr.type = &type_int;
|
||||
if (options.code.progsversion == PROG_ID_VERSION) {
|
||||
e->e.expr.type = &type_float;
|
||||
}
|
||||
return e;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue