- 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;
+ OPC->_int = ((prvm_eval_t *)(ed->fields.ip + OPB->_int))->_int;
+ // refresh the garbage collection on the string - this guards
+ // against a certain sort of repeated migration to earlier
+ // points in the scan that could otherwise result in the string
+ // being freed for being unused
+ if(prvm_garbagecollection_enable.integer)
+ PRVM_GetString(prog, OPC->_int);
+ DISPATCH_OPCODE();
+
+ HANDLE_OPCODE(OP_LOAD_V):
+ if ((prvm_uint_t)OPA->edict >= cached_max_edicts)
+ {
+ PRE_ERROR();
+ prog->error_cmd("%s Progs attempted to read an out of bounds edict number", prog->name);
+ goto cleanup;
+ }
+ if ((prvm_uint_t)OPB->_int > cached_entityfields_3)
+ {
+ PRE_ERROR();
+ prog->error_cmd("%s attempted to read an invalid field in an edict (%i)", prog->name, (int)OPB->_int);
+ goto cleanup;
+ }
+ ed = PRVM_PROG_TO_EDICT(OPA->edict);
+ ptr = (prvm_eval_t *)(ed->fields.ip + OPB->_int);
+ OPC->ivector[0] = ptr->ivector[0];
+ OPC->ivector[1] = ptr->ivector[1];
+ OPC->ivector[2] = ptr->ivector[2];
+ DISPATCH_OPCODE();