]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
a few more PRVM_EDICTFIELDVALUE/PRVM_GLOBALFIELDVALUE uses fixed
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 8 May 2011 18:37:26 +0000 (18:37 +0000)
committerRudolf Polzer <divVerent@xonotic.org>
Mon, 9 May 2011 08:50:17 +0000 (10:50 +0200)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11129 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::merge=ab5ec6e843efaaa298f6661cf398ac9ed79f61b0

gl_rmain.c
prvm_exec.c
sv_user.c

index b7364feceb960c10b766ebbf69f3bd6143a45478..996fd2d9eb976ab828bca401870667ec0bd9aae8 100644 (file)
@@ -7046,9 +7046,9 @@ static void R_DrawEntityBBoxes(void)
                if (edict->priv.server->free)
                        continue;
                // exclude the following for now, as they don't live in world coordinate space and can't be solid:
-               if(PRVM_EDICTFIELDVALUE(edict, prog->fieldoffsets.tag_entity)->edict != 0)
+               if(PRVM_EDICTFIELDEDICT(edict, prog->fieldoffsets.tag_entity) != 0)
                        continue;
-               if(PRVM_EDICTFIELDVALUE(edict, prog->fieldoffsets.viewmodelforclient)->edict != 0)
+               if(PRVM_EDICTFIELDEDICT(edict, prog->fieldoffsets.viewmodelforclient) != 0)
                        continue;
                VectorLerp(edict->priv.server->areamins, 0.5f, edict->priv.server->areamaxs, center);
                R_MeshQueue_AddTransparent(center, R_DrawEntityBBoxes_Callback, (entity_render_t *)NULL, i, (rtlight_t *)NULL);
index 6deb4d95a0c2a24d8ffca5953a6cea0044e4382d..d53b2139f3162fd6af983daa8779445ad04538b7 100644 (file)
@@ -694,8 +694,8 @@ void MVM_ExecuteProgram (func_t fnum, const char *errormessage)
 
        if (!fnum || fnum >= (unsigned int)prog->numfunctions)
        {
-               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict)
-                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict), NULL);
+               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self))
+                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self)), NULL);
                PRVM_ERROR ("MVM_ExecuteProgram: %s", errormessage);
        }
 
@@ -783,8 +783,8 @@ void CLVM_ExecuteProgram (func_t fnum, const char *errormessage)
 
        if (!fnum || fnum >= (unsigned int)prog->numfunctions)
        {
-               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict)
-                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict), NULL);
+               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self))
+                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self)), NULL);
                PRVM_ERROR ("CLVM_ExecuteProgram: %s", errormessage);
        }
 
@@ -873,8 +873,8 @@ void SVVM_ExecuteProgram (func_t fnum, const char *errormessage)
 
        if (!fnum || fnum >= (unsigned int)prog->numfunctions)
        {
-               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict)
-                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDVALUE(prog->globaloffsets.self)->edict), NULL);
+               if (prog->globaloffsets.self >= 0 && PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self))
+                       PRVM_ED_Print(PRVM_PROG_TO_EDICT(PRVM_GLOBALFIELDEDICT(prog->globaloffsets.self)), NULL);
                PRVM_ERROR ("SVVM_ExecuteProgram: %s", errormessage);
        }
 
index f8b666ad1f44fb01ed0d1d116c6e969fc8c1d2bc..4a70f1a6d57ea87e4aef2eadd80f64ca5331ac5a 100644 (file)
--- a/sv_user.c
+++ b/sv_user.c
@@ -759,7 +759,7 @@ void SV_ApplyClientMove (void)
        VectorCopy(move->cursor_screen, PRVM_EDICTFIELDVECTOR(host_client->edict, prog->fieldoffsets.cursor_screen));
        VectorCopy(move->cursor_start, PRVM_EDICTFIELDVECTOR(host_client->edict, prog->fieldoffsets.cursor_trace_start));
        VectorCopy(move->cursor_impact, PRVM_EDICTFIELDVECTOR(host_client->edict, prog->fieldoffsets.cursor_trace_endpos));
-       PRVM_EDICTFIELDVALUE(host_client->edict, prog->fieldoffsets.cursor_trace_ent)->edict = PRVM_EDICT_TO_PROG(PRVM_EDICT_NUM(move->cursor_entitynumber));
+       PRVM_EDICTFIELDEDICT(host_client->edict, prog->fieldoffsets.cursor_trace_ent) = PRVM_EDICT_TO_PROG(PRVM_EDICT_NUM(move->cursor_entitynumber));
        PRVM_EDICTFIELDFLOAT(host_client->edict, prog->fieldoffsets.ping) = host_client->ping * 1000.0;
        PRVM_EDICTFIELDFLOAT(host_client->edict, prog->fieldoffsets.ping_packetloss) = packetloss / (float) NETGRAPH_PACKETS;
        PRVM_EDICTFIELDFLOAT(host_client->edict, prog->fieldoffsets.ping_movementloss) = movementloss / (float) NETGRAPH_PACKETS;