Terra-jin Posted May 5, 2005 I don't know if this was known already, but I noticed something that may be useful for skilled players. If you're running, the weapon you're holding swings at exactly the same rhythm as nukage does damage. The moment the weapon is at it's highest is the moment when the damage is dealt. By keeping this in mind, it's possible to minimize sector damage if you time it right. 0 Share this post Link to post

Kristian Ronge Posted May 5, 2005 If this is correct, then it will be very useful for making reality demos. Thanks for the info! I'll check it out and see what I can come up with when I get the time. :-) 0 Share this post Link to post

Stealthy Ivan Posted May 5, 2005 Wowzers!!! This is a really interesting find, I must go see for myself now :P 0 Share this post Link to post

Relica Religia Posted May 5, 2005 I'd suppose so, given there probably wouldn't be separate codings to change it in DM. 0 Share this post Link to post

RjY Posted May 6, 2005 Cool, you have sharp eyes :) Actually we can prove this from the source. p_spec.c does poisonous floor damage, as followsif (!(leveltime&0x1f)) P_DamageMobj (player->mo, NULL, NULL, 10);that is, damage is applied if the level time (in tics) ANDed with 31 gives you zero (that is, it's a multiple of 32; so you are damaged once every 32/35ths of a second) p_pspr.c deals with the position of the gun.// bob the weapon based on movement speed { int angle = (128*leveltime) & FINEMASK; psp->sx = FRACUNIT + FixedMul(player->bob, finecosine[angle]); angle &= FINEANGLES/2-1; psp->sy = WEAPONTOP + FixedMul(player->bob, finesine[angle]); }Line 3 translates the level time into an angle. Now at the moment of damage, leveltime is a multiple of 32, so (128*leveltime) is a multiple of 4096. FINEMASK is defined in tables.h as 8191, so at the moment of damage, angle will be either 0 or 4096 (okay I haven't explained this very well, go look up bitmasks or just trust me!) In Doom's internal trigonometry lookup tables, these values correspond to angles of 0 and π radians respectively. Line 4 sets the displacement of the weapon from its central rest location based on the cosine of angle. But the cosine function is at its maximum absolute value at 0 and π. Therefore the moment of damage will be when the gun is at its maximum displacement from the centre. This is the observed behaviour. 0 Share this post Link to post

Xenophon Posted May 6, 2005 This is a pretty interesting find. I just tried it and I'm amazed I never noticed it before, and what's more I don't know how it took almost 12 years for this to be discovered. :P 0 Share this post Link to post

Kochipahk Posted May 13, 2005 I think I noticied that, but never spoke up about it. 0 Share this post Link to post