Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
randomgeneratorsyncmanager.c
Go to the documentation of this file.
2 {
8 }
9 
11 {
12  const int USAGE_COUNT = RandomGeneratorSyncUsage.Count;
13 
16 
18  {
19  m_player = player;
20  }
21 
22  void Update()
23  {
24  for(int i = 0; i < USAGE_COUNT; i++ )
25  {
26  randomValuesArray[i] = m_player.Random01();
27  }
28  }
29 
30 
32  {
33  if(usage_index < USAGE_COUNT)
34  {
35  return randomValuesArray[usage_index];
36  }
37  return -1;
38  }
39 
40  float GetRandomInRange(RandomGeneratorSyncUsage usage_index, float min, float max)
41  {
42  return GetRandom01(usage_index)*(max - min) + min;
43  }
44 }
m_player
DayZPlayer m_player
Definition: randomgeneratorsyncmanager.c:15
RGSRecoil
@ RGSRecoil
Definition: randomgeneratorsyncmanager.c:3
RandomGeneratorSyncManager
void RandomGeneratorSyncManager(DayZPlayer player)
Definition: randomgeneratorsyncmanager.c:17
RGSAimingModel
@ RGSAimingModel
Definition: randomgeneratorsyncmanager.c:6
GetRandomInRange
float GetRandomInRange(RandomGeneratorSyncUsage usage_index, float min, float max)
Definition: randomgeneratorsyncmanager.c:40
USAGE_COUNT
enum RandomGeneratorSyncUsage USAGE_COUNT
DayZPlayer
Definition: dayzplayerimplement.c:72
RGSJam
@ RGSJam
Definition: randomgeneratorsyncmanager.c:4
RandomGeneratorSyncUsage
RandomGeneratorSyncUsage
Definition: randomgeneratorsyncmanager.c:1
GetRandom01
float GetRandom01(RandomGeneratorSyncUsage usage_index)
Definition: randomgeneratorsyncmanager.c:31
Update
void Update()
Definition: randomgeneratorsyncmanager.c:22
randomValuesArray
float randomValuesArray[USAGE_COUNT]
Definition: randomgeneratorsyncmanager.c:14
RGSGeneric
@ RGSGeneric
Definition: randomgeneratorsyncmanager.c:5
Count
@ Count
Definition: randomgeneratorsyncmanager.c:7