]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
don't print PRVM_NAME in each dprint call, it looks terrible (prints multiple times...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 3 Jul 2005 07:07:34 +0000 (07:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 3 Jul 2005 07:07:34 +0000 (07:07 +0000)
fix fatal bug in findchain and findchainfloat which were using FindFieldOffset (which returns a byte array index) to get an offset to feed to PRVM_E_INT (which takes an integer array index)

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5482 d7cf8633-e32d-0410-b094-e92efae38249

prvm_cmds.c

index e06c23f75a94a13390c4c05defba8f4864362633..388ea5b26a9f9a24cea44f9394b0288098571a19 100644 (file)
@@ -564,7 +564,11 @@ void VM_dprint (void)
        if (developer.integer)
        {
                VM_VarString(0, string, sizeof(string));
+#if 1
+               Con_Printf("%s", string);
+#else
                Con_Printf("%s: %s", PRVM_NAME, string);
+#endif
        }
 }
 
@@ -849,7 +853,7 @@ void VM_findchain (void)
        if(!prog->flag & PRVM_FE_CHAIN)
                PRVM_ERROR("VM_findchain: %s doesnt have a chain field !\n", PRVM_NAME);
 
-       chain_of = PRVM_ED_FindFieldOffset ("chain");
+       chain_of = PRVM_ED_FindField("chain")->ofs;
 
        chain = prog->edicts;
 
@@ -903,7 +907,7 @@ void VM_findchainfloat (void)
        if(!prog->flag & PRVM_FE_CHAIN)
                PRVM_ERROR("VM_findchainfloat: %s doesnt have a chain field !\n", PRVM_NAME);
 
-       chain_of = PRVM_ED_FindFieldOffset ("chain");
+       chain_of = PRVM_ED_FindField("chain")->ofs;
 
        chain = (prvm_edict_t *)prog->edicts;