Skip to content

Commit

Permalink
Revert A_Mushroom changes for mbf21
Browse files Browse the repository at this point in the history
  • Loading branch information
kraflab committed Apr 23, 2021
1 parent 3fdf406 commit a330db4
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions prboom2/src/p_enemy.c
Original file line number Diff line number Diff line change
Expand Up @@ -2842,18 +2842,24 @@ void A_Detonate(mobj_t *mo)

void A_Mushroom(mobj_t *actor)
{
int i, j, n = actor->info->damage;
int i, j, n;

// Mushroom parameters are part of code pointer's state
dboolean mbf = (compatibility_level == mbf_compatibility &&
!prboom_comp[PC_DO_NOT_USE_MISC12_FRAME_PARAMETERS_IN_A_MUSHROOM].state);
fixed_t misc1 = ((mbf && actor->state->misc1) ? actor->state->misc1 : FRACUNIT*4);
fixed_t misc2 = ((mbf && actor->state->misc2) ? actor->state->misc2 : FRACUNIT/2);
dboolean use_misc;
fixed_t misc1, misc2;

if (compatibility_level < lxdoom_1_compatibility &&
!prboom_comp[PC_APPLY_MBF_CODEPOINTERS_TO_ANY_COMPLEVEL].state)
return;

use_misc = mbf21 || (
compatibility_level == mbf_compatibility &&
!prboom_comp[PC_DO_NOT_USE_MISC12_FRAME_PARAMETERS_IN_A_MUSHROOM].state
);
misc1 = ((use_misc && actor->state->misc1) ? actor->state->misc1 : FRACUNIT * 4);
misc2 = ((use_misc && actor->state->misc2) ? actor->state->misc2 : FRACUNIT / 2);
n = actor->info->damage;

A_Explode(actor); // First make normal explosion

// Now launch mushroom cloud
Expand Down

0 comments on commit a330db4

Please sign in to comment.