diff options
author | Simon Howard | 2008-09-16 00:07:46 +0000 |
---|---|---|
committer | Simon Howard | 2008-09-16 00:07:46 +0000 |
commit | 61e77600041ba534d824943320e7ddddb8e4f6ce (patch) | |
tree | fdaa4805bac62917f560644387ee43187dc08e05 /src/hexen/po_man.c | |
parent | a4d274e6419f89992dfef416ee9deadded533629 (diff) | |
download | chocolate-doom-61e77600041ba534d824943320e7ddddb8e4f6ce.tar.gz chocolate-doom-61e77600041ba534d824943320e7ddddb8e4f6ce.tar.bz2 chocolate-doom-61e77600041ba534d824943320e7ddddb8e4f6ce.zip |
Clean up some warnings in the Hexen code.
Subversion-branch: /branches/raven-branch
Subversion-revision: 1232
Diffstat (limited to 'src/hexen/po_man.c')
-rw-r--r-- | src/hexen/po_man.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/hexen/po_man.c b/src/hexen/po_man.c index 864c0c4c..71c1db97 100644 --- a/src/hexen/po_man.c +++ b/src/hexen/po_man.c @@ -129,7 +129,8 @@ boolean EV_RotatePoly(line_t * line, byte * args, int direction, boolean polyobj_t *poly; polyNum = args[0]; - if (poly = GetPolyobj(polyNum)) + poly = GetPolyobj(polyNum); + if (poly != NULL) { if (poly->specialdata && !overRide) { // poly is already moving @@ -164,7 +165,7 @@ boolean EV_RotatePoly(line_t * line, byte * args, int direction, boolean SN_StartSequence((mobj_t *) & poly->startSpot, SEQ_DOOR_STONE + poly->seqType); - while (mirror = GetPolyobjMirror(polyNum)) + while ((mirror = GetPolyobjMirror(polyNum)) != 0) { poly = GetPolyobj(mirror); if (poly && poly->specialdata && !overRide) @@ -191,7 +192,8 @@ boolean EV_RotatePoly(line_t * line, byte * args, int direction, boolean { pe->dist = ANGLE_MAX - 1; } - if (poly = GetPolyobj(polyNum)) + poly = GetPolyobj(polyNum); + if (poly != NULL) { poly->specialdata = pe; } @@ -259,7 +261,8 @@ boolean EV_MovePoly(line_t * line, byte * args, boolean timesEight, boolean angle_t an; polyNum = args[0]; - if (poly = GetPolyobj(polyNum)) + poly = GetPolyobj(polyNum); + if (poly != NULL) { if (poly->specialdata && !overRide) { // poly is already moving @@ -293,7 +296,7 @@ boolean EV_MovePoly(line_t * line, byte * args, boolean timesEight, boolean SN_StartSequence((mobj_t *) & poly->startSpot, SEQ_DOOR_STONE + poly->seqType); - while (mirror = GetPolyobjMirror(polyNum)) + while ((mirror = GetPolyobjMirror(polyNum)) != 0) { poly = GetPolyobj(mirror); if (poly && poly->specialdata && !overRide) @@ -463,10 +466,11 @@ boolean EV_OpenPolyDoor(line_t * line, byte * args, podoortype_t type) int polyNum; polydoor_t *pd; polyobj_t *poly; - angle_t an; + angle_t an = 0; polyNum = args[0]; - if (poly = GetPolyobj(polyNum)) + poly = GetPolyobj(polyNum); + if (poly != NULL) { if (poly->specialdata) { // poly is already moving @@ -509,7 +513,7 @@ boolean EV_OpenPolyDoor(line_t * line, byte * args, podoortype_t type) poly->specialdata = pd; - while (mirror = GetPolyobjMirror(polyNum)) + while ((mirror = GetPolyobjMirror(polyNum)) != 0) { poly = GetPolyobj(mirror); if (poly && poly->specialdata) |