mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Entity::Sound : Replaced G_CRandom with G_Random
This commit is contained in:
parent
198727f6e0
commit
79271570a8
1 changed files with 9 additions and 9 deletions
|
@ -3790,32 +3790,32 @@ void Entity::Sound
|
|||
|
||||
if( argstype == 0 )
|
||||
{
|
||||
volume = G_CRandom() * ret->volumeMod + ret->volume;
|
||||
pitch = G_CRandom() * ret->pitchMod + ret->pitch;
|
||||
volume = G_Random() * ret->volumeMod + ret->volume;
|
||||
pitch = G_Random() * ret->pitchMod + ret->pitch;
|
||||
min_dist = ret->dist;
|
||||
max_dist = ret->maxDist;
|
||||
}
|
||||
else if( argstype == 1 )
|
||||
{
|
||||
if( volume >= 0.0f )
|
||||
volume = G_CRandom() * ret->volumeMod + volume;
|
||||
volume = G_Random() * ret->volumeMod + volume;
|
||||
else
|
||||
pitch = G_CRandom() * ret->pitchMod + ret->pitch;
|
||||
pitch = G_Random() * ret->pitchMod + ret->pitch;
|
||||
|
||||
if( pitch >= 0.0f )
|
||||
pitch = G_CRandom() * ret->pitchMod + pitch;
|
||||
pitch = G_Random() * ret->pitchMod + pitch;
|
||||
else
|
||||
pitch = G_CRandom() * ret->pitchMod + ret->pitch;
|
||||
pitch = G_Random() * ret->pitchMod + ret->pitch;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( volume <= 0.0f )
|
||||
volume = G_CRandom() * ret->volumeMod + ret->volume;
|
||||
volume = G_Random() * ret->volumeMod + ret->volume;
|
||||
|
||||
if( pitch >= 0.0f )
|
||||
pitch = G_CRandom() * ret->pitchMod + pitch;
|
||||
pitch = G_Random() * ret->pitchMod + pitch;
|
||||
else
|
||||
pitch = G_CRandom() * ret->pitchMod + ret->pitch;
|
||||
pitch = G_Random() * ret->pitchMod + ret->pitch;
|
||||
|
||||
if( min_dist < 0.0f )
|
||||
min_dist = ret->dist;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue