From b609eead1be4343b3d7d1952dc52857d0f36b9dd Mon Sep 17 00:00:00 2001 From: Lukasz Wlasinksi Date: Wed, 1 Jun 2005 13:49:49 +0000 Subject: [PATCH] fixed get area function --- dlls/dod2/dodfun/dodfun.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/dlls/dod2/dodfun/dodfun.h b/dlls/dod2/dodfun/dodfun.h index a9c4b589..172196f2 100755 --- a/dlls/dod2/dodfun/dodfun.h +++ b/dlls/dod2/dodfun/dodfun.h @@ -113,13 +113,12 @@ edict_t *FindEntityByString(edict_t *pentStart, const char *szKeyword, const cha #define GET_CAPTURE_AREA(x) \ if ( mObjects.obj[x].areaflags == 0 ){\ - if ( (mObjects.obj[x].pAreaEdict = FindEntityByString(0,"target",STRING(mObjects.obj[x].pEdict->v.targetname)))\ - && (strcmp( STRING(mObjects.obj[x].pAreaEdict->v.classname),"dod_capture_area" )==0) ){\ - mObjects.obj[x].areaflags = 2;\ - }\ - else{\ - mObjects.obj[x].areaflags = 1;\ - }\ + mObjects.obj[x].areaflags = 1;\ + while ( mObjects.obj[x].pAreaEdict = FindEntityByString(mObjects.obj[x].pAreaEdict,"target",STRING(mObjects.obj[x].pEdict->v.targetname)) )\ + if ( strcmp( STRING(mObjects.obj[x].pAreaEdict->v.classname),"dod_capture_area" )==0){\ + mObjects.obj[x].areaflags = 2;\ + break;\ + }\ }\ if ( mObjects.obj[x].areaflags == 1 )\ return 0;