Skip to content

Commit

Permalink
Block P_Random for ambient sound spawning
Browse files Browse the repository at this point in the history
  • Loading branch information
kraflab committed Oct 21, 2023
1 parent 96c8df1 commit fb957a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prboom2/src/p_mobj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,8 @@ mobj_t* P_SpawnMobj(fixed_t x,fixed_t y,fixed_t z,mobjtype_t type)
if (!(skill_info.flags & SI_INSTANT_REACTION))
mobj->reactiontime = info->reactiontime;

mobj->lastlook = P_Random (pr_lastlook) % g_maxplayers;
if (type != ZMT_AMBIENTSOUND)
mobj->lastlook = P_Random (pr_lastlook) % g_maxplayers;

// do not set the state with P_SetMobjState,
// because action routines can not be called yet
Expand Down

0 comments on commit fb957a7

Please sign in to comment.