Dayz Explorer
1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
randomgeneratorsyncmanager.c
Go to the documentation of this file.
1
enum
RandomGeneratorSyncUsage
2
{
3
RGSRecoil
,
4
RGSJam
,
5
RGSGeneric
,
6
RGSAimingModel
,
7
Count
,
8
}
9
10
class
RandomGeneratorSyncManager
11
{
12
const
int
USAGE_COUNT
=
RandomGeneratorSyncUsage
.Count;
13
14
float
randomValuesArray
[
USAGE_COUNT
];
15
DayZPlayer
m_player
;
16
17
void
RandomGeneratorSyncManager
(
DayZPlayer
player)
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
31
float
GetRandom01
(
RandomGeneratorSyncUsage
usage_index)
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
DAYZ
scripts_v1.24.157551
scripts
world
classes
randomgeneratorsyncmanager.c
Generated by
1.8.17