mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 23:32:09 +00:00
Convert all integer operands to float for v6 progs.
Converting only opc is no longer enough.
This commit is contained in:
parent
1ed1efbdfb
commit
f532fbc6df
1 changed files with 12 additions and 3 deletions
|
@ -116,9 +116,18 @@ opcode_init (void)
|
|||
for (op = pr_opcodes; op->name; op++) {
|
||||
if (op->min_version > options.code.progsversion)
|
||||
continue;
|
||||
if (options.code.progsversion == PROG_ID_VERSION
|
||||
&& op->type_c == ev_integer)
|
||||
op->type_c = ev_float;
|
||||
if (options.code.progsversion == PROG_ID_VERSION) {
|
||||
// v6 progs have no concept of integer, but the QF engine
|
||||
// treats the operands of certain operands as integers
|
||||
// irrespective the progs version, so convert the engine's
|
||||
// view of the operands to the prog's view.
|
||||
if (op->type_a == ev_integer)
|
||||
op->type_a = ev_float;
|
||||
if (op->type_b == ev_integer)
|
||||
op->type_b = ev_float;
|
||||
if (op->type_c == ev_integer)
|
||||
op->type_c = ev_float;
|
||||
}
|
||||
Hash_AddElement (opcode_type_table, op);
|
||||
if (!strcmp (op->name, "<DONE>")) {
|
||||
op_done = op;
|
||||
|
|
Loading…
Reference in a new issue