-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 f9c1666..56b832d 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 40a1646..2ee88b1 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;
        }