diff options
Diffstat (limited to 'src/hexen/m_misc.c')
-rw-r--r-- | src/hexen/m_misc.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hexen/m_misc.c b/src/hexen/m_misc.c index 9903e200..c493b23f 100644 --- a/src/hexen/m_misc.c +++ b/src/hexen/m_misc.c @@ -168,6 +168,12 @@ unsigned char rndtable[256] = { int rndindex = 0; int prndindex = 0; +int P_Random(void) +{ + prndindex = (prndindex + 1) & 0xff; + return rndtable[prndindex]; +} + int M_Random(void) { rndindex = (rndindex + 1) & 0xff; |