- prog->xstatement = st - cached_statements;
- VM_Warning(prog, "assignment to world.%s (field %i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
+ PRE_ERROR();
+ VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);
+ }
+ }
+ ptr = (prvm_eval_t *)(cached_edictsfields + OPB->_int);
+ ptr->_int = OPA->_int;
+ DISPATCH_OPCODE();
+ HANDLE_OPCODE(OP_STOREP_S):
+ if ((prvm_uint_t)OPB->_int - cached_entityfields >= cached_entityfieldsarea_entityfields)
+ {
+ if ((prvm_uint_t)OPB->_int >= cached_entityfieldsarea)
+ {
+ PRE_ERROR();
+ prog->error_cmd("%s attempted to write to an out of bounds edict (%i)", prog->name, (int)OPB->_int);
+ goto cleanup;
+ }
+ if ((prvm_uint_t)OPB->_int < cached_entityfields && !cached_allowworldwrites)
+ {
+ PRE_ERROR();
+ VM_Warning(prog, "Attempted assignment to NULL entity field .%s (%i) in %s\n", PRVM_GetString(prog, PRVM_ED_FieldAtOfs(prog, OPB->_int)->s_name), (int)OPB->_int, prog->name);