]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix severe bugs with the PRVM_64 support, which affected both modes of
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 19 Apr 2012 09:18:21 +0000 (09:18 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 19 Apr 2012 09:18:21 +0000 (09:18 +0000)
operation (PRVM_64 defined or not) - the OP_LOAD_ operations were
converting between float and int unintentionally

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11799 d7cf8633-e32d-0410-b094-e92efae38249

prvm_execprogram.h

index 82f09d1231fcfeec82209c198f8a9468bd7568be..c787e6fec3583613439091b48c401baa3db67408 100644 (file)
                                        goto cleanup;
                                }
                                ed = PRVM_PROG_TO_EDICT(OPA->edict);
-                               OPC->_int = ((prvm_eval_t *)(ed->fields.fp + OPB->_int))->_int;
+                               OPC->_int = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->_int;
                                break;
 
                        case OP_LOAD_V:
                                        goto cleanup;
                                }
                                ed = PRVM_PROG_TO_EDICT(OPA->edict);
-                               OPC->ivector[0] = ((prvm_eval_t *)(ed->fields.fp + OPB->_int))->ivector[0];
-                               OPC->ivector[1] = ((prvm_eval_t *)(ed->fields.fp + OPB->_int))->ivector[1];
-                               OPC->ivector[2] = ((prvm_eval_t *)(ed->fields.fp + OPB->_int))->ivector[2];
+                               OPC->ivector[0] = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->ivector[0];
+                               OPC->ivector[1] = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->ivector[1];
+                               OPC->ivector[2] = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->ivector[2];
                                break;
 
                //==================