commit 4f040459ebe4824c0bedc504b6ae1115fdaa3986
Author: Jonathan Dowland <jon+github@alcopop.org>
AuthorDate: Fri Feb 12 19:20:19 2016 +0100
Commit: Jonathan Dowland <jon+github@alcopop.org>
CommitDate: Tue Mar 1 16:10:50 2016 +0000
Revert "Seed the M_Random random number generator from the system time to give"
This reverts commit 59aad53bbde97e75e06717ea1b49bd3c92941b83.
Closes #665.
The original commit enhanced the behaviour of Doom to make some of the
pseudo-random behaviour less predictable. Whilst this is a nice feature, it's a
feature that vanilla lacks: replaying a demo would result in those behaviours
(wipe, pitched sound effects) being identical each time. This is not the case
with the above feature.
It could actually be quite useful to ensure that such behaviours are
reproducible to fine-tune our emulation of e.g. Doom/Heretic/Hexen pitch
shifting. Perhaps in the future our testing will be enhanced to compare
multimedia output of Vanilla versus chocolate for demo playback, in which case
we would also need to have reproducibility here.
---
src/doom/m_random.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/src/doom/m_random.c b/src/doom/m_random.c
index cc31a0bf..8e3b4e18 100644
--- a/src/doom/m_random.c
+++ b/src/doom/m_random.c
@@ -16,11 +16,6 @@
// Random number LUT.
//
-
-#include <time.h>
-
-#include "m_random.h"
-
//
// M_Random
// Returns a 0-255 number
@@ -66,13 +61,5 @@ int M_Random (void)
void M_ClearRandom (void)
{
- prndindex = 0;
-
- // Seed the M_Random counter from the system time
-
- rndindex = time(NULL) & 0xff;
+ rndindex = prndindex = 0;
}
-
-
-
-