Hitscan

Hitscan attacks hit or miss their target the very moment the attack is launched, and therefore cannot be dodged. All melee and bullet attacks work like this; there are no projectiles involved, invisible or otherwise. Melee attacks have a range of 64 units and bullet attacks a range of 2048 units.

Melee attacks are monster and weapon specific, but the damage done by a single bullet is a fixed (though randomized) value. The damage caused by a ranged hitscan attack only varies (excluding the randomization) according to the number of bullets fired by the weapon or monster.

In addition, the damage dealt by player and monster bullet hitscan attacks is slightly different. For player bullets, the damage is calculated as (P_Random %3+1)*5; this returns a value between 5 and 15, in increments of 5. For monster hitscans, the formula is ((P_Random%5)+1)*3, returning identical values albeit in increments of 3. Thus, for monster bullets, the mean damage will be a bit lower.

Monster melee attacks use a simple range check, whereas bullet attacks and player melee attacks use a hitscan line computation system to assist with autoaiming and to make sure there is no unwanted target in-between the attacker and its victim. Note that up to Doom 1.4, demons used a short-range hitscan line attack with their bite, allowing for the occasional (but rare) demon-started infighting. This was changed to a range check like the imp and baron of hell melee attacks in v1.5.