Skip to content

Commit faf401c

Browse files
committed
Reseed RNG on each activity start, for more determinism
1 parent cc4eb59 commit faf401c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Source/Entities/Activity.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include "GUIFont.h"
1717
#include "AllegroBitmap.h"
1818

19+
#include "RTETools.h"
20+
1921
namespace RTE {
2022

2123
AbstractClassInfo(Activity, Entity);
@@ -284,6 +286,9 @@ void Activity::Clear() {
284286
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
285287

286288
int Activity::Start() {
289+
// Reseed the RNG for determinism
290+
SeedRNG();
291+
287292
if (m_ActivityState != ActivityState::Editing) {
288293
m_ActivityState = ActivityState::Running;
289294
}

0 commit comments

Comments
 (0)