mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-07 08:21:59 +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++) {
|
for (op = pr_opcodes; op->name; op++) {
|
||||||
if (op->min_version > options.code.progsversion)
|
if (op->min_version > options.code.progsversion)
|
||||||
continue;
|
continue;
|
||||||
if (options.code.progsversion == PROG_ID_VERSION
|
if (options.code.progsversion == PROG_ID_VERSION) {
|
||||||
&& op->type_c == ev_integer)
|
// v6 progs have no concept of integer, but the QF engine
|
||||||
op->type_c = ev_float;
|
// 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);
|
Hash_AddElement (opcode_type_table, op);
|
||||||
if (!strcmp (op->name, "<DONE>")) {
|
if (!strcmp (op->name, "<DONE>")) {
|
||||||
op_done = op;
|
op_done = op;
|
||||||
|
|
Loading…
Reference in a new issue