diff options
author | James Haley | 2010-09-18 07:54:00 +0000 |
---|---|---|
committer | James Haley | 2010-09-18 07:54:00 +0000 |
commit | bf215f516ed4742fd19b920d8a5d3f6738375168 (patch) | |
tree | 63514b2a3fa1266f3a68169495ae6cc1b4e630c3 /src/strife/p_doors.c | |
parent | 496bd0cfca29fdcb7b6de72fac85d6d6fa62e2af (diff) | |
download | chocolate-doom-bf215f516ed4742fd19b920d8a5d3f6738375168.tar.gz chocolate-doom-bf215f516ed4742fd19b920d8a5d3f6738375168.tar.bz2 chocolate-doom-bf215f516ed4742fd19b920d8a5d3f6738375168.zip |
Upped warning level and started fixing warnings - can't believe some
genius had them completely disabled... Also, a bug fix to
EV_ClearForceFields so that it continues running on all tagged sectors
even if sec->linecount is 0, and so that it returns a value. Made
dialogtext and M_WriteText's 3rd parameter const for safety.
Subversion-branch: /branches/strife-branch
Subversion-revision: 2108
Diffstat (limited to 'src/strife/p_doors.c')
-rw-r--r-- | src/strife/p_doors.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/strife/p_doors.c b/src/strife/p_doors.c index 9a536c64..b9696a53 100644 --- a/src/strife/p_doors.c +++ b/src/strife/p_doors.c @@ -498,13 +498,14 @@ int EV_DoDoor(line_t* line, vldoor_e type) // // villsa [STRIFE] new function // -int EV_ClearForceFields(line_t* line) +boolean EV_ClearForceFields(line_t* line) { int secnum; int rtn; sector_t* sec; int i; line_t* secline; + boolean ret = false; secnum = -1; rtn = 0; @@ -515,10 +516,9 @@ int EV_ClearForceFields(line_t* line) rtn = 1; line->special = 0; + ret = true; - if(!sec->linecount) - return; - + // haleyjd 09/18/10: fixed to continue w/linecount == 0, not return for(i = 0; i < sec->linecount; i++) { secline = sec->lines[i]; @@ -533,6 +533,8 @@ int EV_ClearForceFields(line_t* line) sides[secline->sidenum[1]].midtexture = 0; } } + + return ret; } |