summaryrefslogtreecommitdiff
path: root/src/strife/p_inter.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/strife/p_inter.c')
-rw-r--r--src/strife/p_inter.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/strife/p_inter.c b/src/strife/p_inter.c
index 9bedd78c..b6138f32 100644
--- a/src/strife/p_inter.c
+++ b/src/strife/p_inter.c
@@ -726,11 +726,14 @@ void P_TouchSpecialThing(mobj_t* special, mobj_t* toucher)
if(special->flags & MF_GIVEQUEST)
{
- // [STRIFE] TODO - verify this. Seems that questflag isn't
- // applied if the special's speed is equal to 8 or if
- // the player has received a specific quest token
+ // [STRIFE]: Award quest flag based on the thing's speed. Quest 8 was
+ // apparently at some point given by the Broken Power Coupling, which is
+ // why they don't want to award it if you have Quest 6 (which is
+ // acquired by destroying the Front's working power coupling). BUT, the
+ // broken coupling object's speed is NOT 8... it is 512*FRACUNIT. For
+ // strict portability beyond the x86, we need to AND the operand by 31.
if(special->info->speed != 8 || !(player->questflags & QF_QUEST6))
- player->questflags |= 1 << (special->info->speed - 1);
+ player->questflags |= 1 << ((special->info->speed - 1) & 31);
}