printz
CRAZY DUMB ZEALOT

Posts: 8152
Registered: 06-06 |
Gez said:
Here's how I addressed it in ZDoom, with my reasoning:
code: // MBF also considers that bouncers that explode are grenades, and MBF grenades
// are supposed to hurt everything, except cyberdemons if they're fired by cybies.
// Let's translate that in a more generic way as grenades which hurt everything
// except the class of their shooter. Yes, it does diverge a bit from MBF, as for
// example a dehacked arachnotron that shoots grenade would kill itself quickly
// in MBF and will not here. But class-specific checks are cumbersome and limiting.
info->flags4 |= (MF4_FORCERADIUSDMG | MF4_DONTHARMCLASS);
How about this way: The Cyberdemons would get a new flag, such as MFx_CYBERDEMON, which would make them the sole creatures immune to their own species' grenades, and if the author wanted another such creature, they'd give it the CYBERDEMON flag as well. That would replace the class-specific with a flag-specific check. Same like how KILLABLE got created to remove the Lost Soul specific check when their COUNTKILL bit got removed by Id.
Wouldn't Gez's implementation make the marine immune to their own grenades, or is the player a special case and not a species like the monsters?
Last edited by printz on 12-29-11 at 13:41
|