]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
-Fixed a stupid bug in the VM_findchain* functions.
authorblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 14 Nov 2004 18:34:55 +0000 (18:34 +0000)
committerblack <black@d7cf8633-e32d-0410-b094-e92efae38249>
Sun, 14 Nov 2004 18:34:55 +0000 (18:34 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4751 d7cf8633-e32d-0410-b094-e92efae38249

progsvm.h
prvm_cmds.c

index f9c1666a803a2139a77ef20c3c6b6ceff26aa1de..56b832d6f8523803af338988c3b4870153772b48 100644 (file)
--- a/progsvm.h
+++ b/progsvm.h
@@ -430,7 +430,7 @@ prvm_edict_t *PRVM_EDICT_NUM_ERROR(int n, char *filename, int fileline);
 
 // FIXME: make these go away?
 #define        PRVM_E_FLOAT(e,o) (((float*)e->v)[o])
-//#define      PRVM_E_INT(e,o) (((int*)e->v)[o])
+#define        PRVM_E_INT(e,o) (((int*)e->v)[o])
 //#define      PRVM_E_VECTOR(e,o) (&((float*)e->v)[o])
 #define        PRVM_E_STRING(e,o) (PRVM_GetString(*(string_t *)&((float*)e->v)[o]))
 
index 40a1646dd4b22d6e4aa17d887e4da191a9aeb895..2ee88b1c3d5031727b9f48500f8190b04188ade3 100644 (file)
@@ -1040,7 +1040,7 @@ void VM_findchain (void)
                if (strcmp(t,s))
                        continue;
 
-               PRVM_E_FLOAT(ent,chain_of) = PRVM_NUM_FOR_EDICT(chain);
+               PRVM_E_INT(ent,chain_of) = PRVM_NUM_FOR_EDICT(chain);
                chain = ent;
        }
 
@@ -1083,10 +1083,10 @@ void VM_findchainfloat (void)
                prog->xfunction->builtinsprofile++;
                if (ent->p.e->free)
                        continue;
-               if (E_FLOAT(ent,f) != s)
+               if (PRVM_E_FLOAT(ent,f) != s)
                        continue;
 
-               PRVM_E_FLOAT(ent,chain_of) = PRVM_NUM_FOR_EDICT(chain);
+               PRVM_E_INT(ent,chain_of) = PRVM_EDICT_TO_PROG(chain);
                chain = ent;
        }