From: black Date: Sun, 14 Nov 2004 18:34:55 +0000 (+0000) Subject: -Fixed a stupid bug in the VM_findchain* functions. X-Git-Tag: xonotic-v0.1.0preview~5384 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=93fbb1493301ac5b4a77a56be9911638487ae58a;p=xonotic%2Fdarkplaces.git -Fixed a stupid bug in the VM_findchain* functions. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4751 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/progsvm.h b/progsvm.h index f9c1666a..56b832d6 100644 --- 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])) diff --git a/prvm_cmds.c b/prvm_cmds.c index 40a1646d..2ee88b1c 100644 --- a/prvm_cmds.c +++ b/prvm_cmds.c @@ -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; }