From db25322b4c479a4b729918c06caa26bf7008aaf8 Mon Sep 17 00:00:00 2001 From: Edward Richardson Date: Tue, 13 Jan 2015 21:01:00 +1300 Subject: [PATCH] P_SpawnPuff MF4_RANDOMIZE behaviour - Doom's BulletPuff random spawn tics behaviour was lost at some point. --- src/p_mobj.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/p_mobj.cpp b/src/p_mobj.cpp index 09f84663a..fea80f868 100644 --- a/src/p_mobj.cpp +++ b/src/p_mobj.cpp @@ -4959,6 +4959,13 @@ AActor *P_SpawnPuff (AActor *source, const PClass *pufftype, fixed_t x, fixed_t puff = Spawn (pufftype, x, y, z, ALLOW_REPLACE); if (puff == NULL) return NULL; + if ((puff->flags4 & MF4_RANDOMIZE) && puff->tics > 0) + { + puff->tics -= pr_spawnpuff() & 3; + if (puff->tics < 1) + puff->tics = 1; + } + //Moved puff creation and target/master/tracer setting to here. if (puff && vict) {