X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=prvm_cmds.c;h=df5ea5eaf90a57d5db11d5e4373046359e747cdb;hb=1a606ca4c462e8a9a76cd5e7e085efbecbe90009;hp=5acc3eb2fb2d0631296de2de4fb182e70bab17ad;hpb=e660b4c0147da9f4b5db110a05cfbadcea6b1b64;p=xonotic%2Fdarkplaces.git diff --git a/prvm_cmds.c b/prvm_cmds.c index 5acc3eb2..df5ea5ea 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -5821,7 +5821,7 @@ static void uri_to_string_callback(int status, size_t length_received, unsigned PRVM_SetProg(handle->prognr); PRVM_Begin; - if((prog->starttime == handle->starttime) && (prog->funcoffsets.URI_Get_Callback)) + if((prog->starttime == handle->starttime) && (PRVM_allfunction(URI_Get_Callback))) { if(length_received >= sizeof(handle->buffer)) length_received = sizeof(handle->buffer) - 1; @@ -5830,7 +5830,7 @@ static void uri_to_string_callback(int status, size_t length_received, unsigned PRVM_G_FLOAT(OFS_PARM0) = handle->id; PRVM_G_FLOAT(OFS_PARM1) = status; PRVM_G_INT(OFS_PARM2) = PRVM_SetTempString(handle->buffer); - PRVM_ExecuteProgram(prog->funcoffsets.URI_Get_Callback, "QC function URI_Get_Callback is missing"); + PRVM_ExecuteProgram(PRVM_allfunction(URI_Get_Callback), "QC function URI_Get_Callback is missing"); } PRVM_End; @@ -5856,7 +5856,7 @@ void VM_uri_get (void) const char *query_string = NULL; size_t lq; - if(!prog->funcoffsets.URI_Get_Callback) + if(!PRVM_allfunction(URI_Get_Callback)) PRVM_ERROR("uri_get called by %s without URI_Get_Callback defined", PRVM_NAME); VM_SAFEPARMCOUNTRANGE(2, 6, VM_uri_get); @@ -6845,7 +6845,7 @@ void VM_getsurfaceclippedpoint(void) animatemodel(model, ed); applytransform_inverted(PRVM_G_VECTOR(OFS_PARM2), ed, p); clippointtosurface(ed, model, surface, p, out); - VectorAdd(out, ed->fields.server->origin, PRVM_G_VECTOR(OFS_RETURN)); + VectorAdd(out, PRVM_serveredictvector(ed, origin), PRVM_G_VECTOR(OFS_RETURN)); } //PF_getsurfacenumtriangles, // #??? float(entity e, float s) getsurfacenumtriangles = #???; @@ -6924,7 +6924,7 @@ void VM_physics_enable(void) return; } // entity should have MOVETYPE_PHYSICS already set, this can damage memory (making leaked allocation) so warn about this even if non-developer - if (ed->fields.server->movetype != MOVETYPE_PHYSICS) + if (PRVM_serveredictfloat(ed, movetype) != MOVETYPE_PHYSICS) { VM_Warning("VM_physics_enable: entity is not MOVETYPE_PHYSICS!\n"); return; @@ -6948,14 +6948,14 @@ void VM_physics_addforce(void) return; } // entity should have MOVETYPE_PHYSICS already set, this can damage memory (making leaked allocation) so warn about this even if non-developer - if (ed->fields.server->movetype != MOVETYPE_PHYSICS) + if (PRVM_serveredictfloat(ed, movetype) != MOVETYPE_PHYSICS) { VM_Warning("VM_physics_addforce: entity is not MOVETYPE_PHYSICS!\n"); return; } f.type = ODEFUNC_RELFORCEATPOS; VectorCopy(PRVM_G_VECTOR(OFS_PARM1), f.v1); - VectorSubtract(ed->fields.server->origin, PRVM_G_VECTOR(OFS_PARM2), f.v2); + VectorSubtract(PRVM_serveredictvector(ed, origin), PRVM_G_VECTOR(OFS_PARM2), f.v2); VM_physics_ApplyCmd(ed, &f); } @@ -6974,7 +6974,7 @@ void VM_physics_addtorque(void) return; } // entity should have MOVETYPE_PHYSICS already set, this can damage memory (making leaked allocation) so warn about this even if non-developer - if (ed->fields.server->movetype != MOVETYPE_PHYSICS) + if (PRVM_serveredictfloat(ed, movetype) != MOVETYPE_PHYSICS) { VM_Warning("VM_physics_addtorque: entity is not MOVETYPE_PHYSICS!\n"); return;