DayZ 1.24
Loading...
Searching...
No Matches
RandomGeneratorSyncManager.c File Reference

Go to the source code of this file.

Enumerations

enum  RandomGeneratorSyncUsage {
  RGSRecoil , RGSJam , RGSGeneric , RGSAimingModel ,
  Count
}
 

Functions

void RandomGeneratorSyncManager (DayZPlayer player)
 
void Update ()
 
float GetRandom01 (RandomGeneratorSyncUsage usage_index)
 
float GetRandomInRange (RandomGeneratorSyncUsage usage_index, float min, float max)
 

Variables

enum RandomGeneratorSyncUsage USAGE_COUNT = RandomGeneratorSyncUsage.Count
 
float randomValuesArray [USAGE_COUNT]
 
DayZPlayer m_player
 

Enumeration Type Documentation

◆ RandomGeneratorSyncUsage

Enumerator
RGSRecoil 
RGSJam 
RGSGeneric 
RGSAimingModel 
Count 

Definition at line 1 of file RandomGeneratorSyncManager.c.

Function Documentation

◆ GetRandom01()

float GetRandom01 ( RandomGeneratorSyncUsage usage_index)

Definition at line 29 of file RandomGeneratorSyncManager.c.

30 {
33 return -1;
34 }
float randomValuesArray[USAGE_COUNT]
enum RandomGeneratorSyncUsage USAGE_COUNT

References randomValuesArray, and USAGE_COUNT.

Referenced by GetRandomInRange().

◆ GetRandomInRange()

float GetRandomInRange ( RandomGeneratorSyncUsage usage_index,
float min,
float max )

Definition at line 36 of file RandomGeneratorSyncManager.c.

37 {
38 return GetRandom01(usage_index) * (max - min) + min;
39 }
float GetRandom01(RandomGeneratorSyncUsage usage_index)

References GetRandom01().

◆ RandomGeneratorSyncManager()

void RandomGeneratorSyncManager ( DayZPlayer player)

Definition at line 17 of file RandomGeneratorSyncManager.c.

18 {
20 }
DayZPlayer m_player

References m_player.

Referenced by ManBase::Init().

Variable Documentation

◆ m_player

◆ randomValuesArray

float randomValuesArray[USAGE_COUNT]

Definition at line 14 of file RandomGeneratorSyncManager.c.

Referenced by GetRandom01(), and Update().

◆ USAGE_COUNT