diff options
author | James Haley | 2013-02-25 01:38:41 +0000 |
---|---|---|
committer | James Haley | 2013-02-25 01:38:41 +0000 |
commit | 6a2255c70b882391931a7ef7ad9ada47a88b7c77 (patch) | |
tree | ed9956bb30f49043f04d05d9f50de1c712502a95 /src/strife/p_inter.c | |
parent | 1011b3bd314e515e6357df8b5b77d33a2528ae34 (diff) | |
download | chocolate-doom-6a2255c70b882391931a7ef7ad9ada47a88b7c77.tar.gz chocolate-doom-6a2255c70b882391931a7ef7ad9ada47a88b7c77.tar.bz2 chocolate-doom-6a2255c70b882391931a7ef7ad9ada47a88b7c77.zip |
Portability tweak when adding quest flags from collected items, due to
the Broken Power Coupling's anomalous speed value of 512*FRACUNIT
(verified against binary). Added note about this in the quest flags
enumeration as well; bit 31 (quest #32) is accidentally set by this
item, but is never checked for anywhere.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2560
Diffstat (limited to 'src/strife/p_inter.c')
-rw-r--r-- | src/strife/p_inter.c | 11 |
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); } |