]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - prvm_execprogram.h
nothing to see here, move along...
[xonotic/darkplaces.git] / prvm_execprogram.h
index 07ca7a16b5de532ab2de95355ef743b053e7a434..d125cd7eeb2266cfb294b2c1699e86b8d2c4f330 100644 (file)
                                        return;
                                }
 #endif
-                               /*if (OPA->edict == 0 && sv.state == ss_active)
+                               if (OPA->edict == 0 && !prog->allowworldwrites)
                                {
                                        prog->xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                        prog->xstatement = st - prog->statements;
-                                       Host_Error("assignment to world entity in %s", PRVM_NAME);
+                                       PRVM_ERROR("forbidden assignment to null/world entity in %s", PRVM_NAME);
                                        return;
-                               }*/
+                               }
                                ed = PRVM_PROG_TO_EDICT(OPA->edict);
                                OPC->_int = (qbyte *)((int *)ed->fields.vp + OPB->_int) - (qbyte *)prog->edictsfields;
                                break;
                                break;
 
                        case OP_STATE:
-                               if(prog->flag & PRVM_OP_STATE) 
+                               if(prog->flag & PRVM_OP_STATE)
                                {
                                        prog->xfunction->profile += profile - startprofile;
                                        startprofile = profile;
                                else
                                        PRVM_ERROR("OP_STATE not supported by %s\n", PRVM_NAME);
                                break;
-                               
+
 // LordHavoc: to be enabled when Progs version 7 (or whatever it will be numbered) is finalized
 /*
                        case OP_ADD_I: