mirror of
https://github.com/halpz/re3.git
synced 2025-06-26 22:06:22 +00:00
Merge branch 'master' of git://github.com/GTAmodding/re3 into erorcun
This commit is contained in:
@ -1261,7 +1261,7 @@ void CParticle::Update()
|
||||
nil,
|
||||
particle->m_fSize, color, particle->m_nRotationStep, 0, 0, 0);
|
||||
|
||||
PlayOneShotScriptObject(_SOUND_BULLET_SHELL_HIT_GROUND_1, particle->m_vecPosition);
|
||||
PlayOneShotScriptObject(_SCRSOUND_BULLET_SHELL_HIT_GROUND_1, particle->m_vecPosition);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1280,7 +1280,7 @@ void CParticle::Update()
|
||||
nil,
|
||||
particle->m_fSize, color, 0, 0, 0, 0);
|
||||
|
||||
PlayOneShotScriptObject(_SOUND_BULLET_SHELL_HIT_GROUND_2, particle->m_vecPosition);
|
||||
PlayOneShotScriptObject(_SCRSOUND_BULLET_SHELL_HIT_GROUND_2, particle->m_vecPosition);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1410,13 +1410,11 @@ void CParticle::Update()
|
||||
|
||||
if ( particle->m_fCurrentZRadius != 0.0f )
|
||||
{
|
||||
int32 nSinCosIndex = particle->m_nCurrentZRotation % (SIN_COS_TABLE_SIZE - 1);
|
||||
int32 nRot = particle->m_nCurrentZRotation % (SIN_COS_TABLE_SIZE - 1);
|
||||
|
||||
float fX = (m_CosTable[nSinCosIndex] - m_SinTable[nSinCosIndex])
|
||||
* particle->m_fCurrentZRadius;
|
||||
float fX = (Cos(nRot) - Sin(nRot)) * particle->m_fCurrentZRadius;
|
||||
|
||||
float fY = (m_SinTable[nSinCosIndex] + m_CosTable[nSinCosIndex])
|
||||
* particle->m_fCurrentZRadius;
|
||||
float fY = (Sin(nRot) + Cos(nRot)) * particle->m_fCurrentZRadius;
|
||||
|
||||
moveStep -= particle->m_vecParticleMovementOffset;
|
||||
|
||||
|
@ -60,6 +60,8 @@ public:
|
||||
static float (&m_SinTable)[SIN_COS_TABLE_SIZE];
|
||||
static float (&m_CosTable)[SIN_COS_TABLE_SIZE];
|
||||
|
||||
static float Sin(int32 value) { return m_SinTable[value]; }
|
||||
static float Cos(int32 value) { return m_CosTable[value]; }
|
||||
|
||||
static void ReloadConfig();
|
||||
static void Initialise();
|
||||
|
@ -731,10 +731,10 @@ CWaterLevel::RenderWater()
|
||||
|
||||
float fAngle = CGeneral::GetRandomNumberInRange(90.0f, 150.0f);
|
||||
|
||||
int32 nSinCosIdx = CGeneral::GetRandomNumber() % CParticle::SIN_COS_TABLE_SIZE-1;
|
||||
int32 nRot = CGeneral::GetRandomNumber() % CParticle::SIN_COS_TABLE_SIZE-1;
|
||||
|
||||
float fCos = CParticle::m_CosTable[nSinCosIdx];
|
||||
float fSin = CParticle::m_SinTable[nSinCosIdx];
|
||||
float fCos = CParticle::Cos(nRot);
|
||||
float fSin = CParticle::Sin(nRot);
|
||||
|
||||
vecPos.x += (fCos - fSin) * fAngle;
|
||||
vecPos.y += (fSin + fCos) * fAngle;
|
||||
|
Reference in New Issue
Block a user