From cdde7ea8e54f912dee686dee1026696f6266d9f9 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2017 16:58:45 -0400 Subject: [PATCH 1/3] not equal, NOT statement --- src/p_mobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index cefc3129e..42e0778a6 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -9844,7 +9844,7 @@ ML_EFFECT4 : Don't clip inside the ground mmin = mnumspokes; // Make the links the same type as the end - repeated below - if ((mobj->type != MT_CHAINPOINT) && (!(lines[line].flags & ML_EFFECT2) == (mobj->type == MT_FIREBARPOINT))) // exclusive or + if ((mobj->type != MT_CHAINPOINT) && ((lines[line].flags & ML_EFFECT2) != (mobj->type == MT_FIREBARPOINT))) // exclusive or { linktype = macetype; radiusfactor = 2; // Double the radius. From e92700871134ff0b527a447705476ef79a48eb8e Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2017 17:05:35 -0400 Subject: [PATCH 2/3] signed stuff before using abs() --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index a2e1f4111..c71d905ae 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -6917,7 +6917,7 @@ static void P_MovePlayer(player_t *player) && player->mo->state < &states[S_PLAY_NIGHTS_TRANS6]))) { skin_t *skin = ((skin_t *)(player->mo->skin)); - player->mo->color = (skin->flags & SF_SUPER) ? skin->supercolor + abs((((player->startedtime - player->nightstime) >> 1) % 9) - 4) : player->mo->color; // This is where super flashing is handled. + player->mo->color = (skin->flags & SF_SUPER) ? skin->supercolor + abs((((signed)(player->startedtime - player->nightstime) >> 1) % 9) - 4) : player->mo->color; // This is where super flashing is handled. } if (!player->capsule && !player->bonustime) From 1918e256f19a491c2391da7726ac8e27dd576dc7 Mon Sep 17 00:00:00 2001 From: Alam Ed Arias Date: Wed, 11 Oct 2017 17:12:41 -0400 Subject: [PATCH 3/3] use the right bitmask --- src/p_user.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_user.c b/src/p_user.c index c71d905ae..be0ca803e 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -3675,7 +3675,7 @@ static void P_DoSuperStuff(player_t *player) P_SpawnShieldOrb(player); // Restore color - if ((player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER) + if ((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER) { player->mo->color = SKINCOLOR_WHITE; G_GhostAddColor(GHC_FIREFLOWER); @@ -3725,7 +3725,7 @@ static void P_DoSuperStuff(player_t *player) player->powers[pw_super] = 0; // Restore color - if ((player->powers[pw_shield] & SH_NOSTACK) == SH_FIREFLOWER) + if ((player->powers[pw_shield] & SH_STACK) == SH_FIREFLOWER) { player->mo->color = SKINCOLOR_WHITE; G_GhostAddColor(GHC_FIREFLOWER);