diff options
author | Sergeanur <s.anureev@yandex.ua> | 2019-10-04 01:18:23 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2019-10-04 01:18:23 +0200 |
commit | cf0edb3eb79626a19d1c4c5984df4d884be7e3d0 (patch) | |
tree | b56b05a7f5a9e00d0eae751f757839194ae7a0d0 /src/control/Pickups.cpp | |
parent | Merge pull request #222 from erorcun/erorcun (diff) | |
download | re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.tar re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.tar.gz re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.tar.bz2 re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.tar.lz re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.tar.xz re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.tar.zst re3-cf0edb3eb79626a19d1c4c5984df4d884be7e3d0.zip |
Diffstat (limited to 'src/control/Pickups.cpp')
-rw-r--r-- | src/control/Pickups.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/control/Pickups.cpp b/src/control/Pickups.cpp index 2d112592..8a67e248 100644 --- a/src/control/Pickups.cpp +++ b/src/control/Pickups.cpp @@ -657,7 +657,7 @@ CPickups::DoPickUpEffects(CEntity *entity) entity->m_flagD80 = CTheScripts::IsPlayerOnAMission() || CDarkel::FrenzyOnGoing() || !CGame::nastyGame;
if (!entity->m_flagD80) {
- float s = Sin((float)(((uint16)CTimer::GetTimeInMilliseconds() + (uint16)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800));
+ float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800));
float modifiedSin = 0.3 * (s + 1.0f);
@@ -735,7 +735,7 @@ CPickups::DoMineEffects(CEntity *entity) const float MAXDIST = 20.0f;
if (dist < MAXDIST) {
- float s = Sin((float)(((uint16)CTimer::GetTimeInMilliseconds() + (uint16)entity) & 0x1FF) * DEGTORAD(360.0f / 0x200));
+ float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x1FF) * DEGTORAD(360.0f / 0x200));
int32 red = (MAXDIST - dist) * (0.5f * s + 0.5f) / MAXDIST * 64.0f;
CShadows::StoreStaticShadow((uintptr)entity, SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &pos,
@@ -757,7 +757,7 @@ CPickups::DoMoneyEffects(CEntity *entity) const float MAXDIST = 20.0f;
if (dist < MAXDIST) {
- float s = Sin((float)(((uint16)CTimer::GetTimeInMilliseconds() + (uint16)entity) & 0x3FF) * DEGTORAD(360.0f / 0x400));
+ float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x3FF) * DEGTORAD(360.0f / 0x400));
int32 green = (MAXDIST - dist) * (0.2f * s + 0.3f) / MAXDIST * 64.0f;
CShadows::StoreStaticShadow((uintptr)entity, SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &pos,
@@ -779,7 +779,7 @@ CPickups::DoCollectableEffects(CEntity *entity) const float MAXDIST = 14.0f;
if (dist < MAXDIST) {
- float s = Sin((float)(((uint16)CTimer::GetTimeInMilliseconds() + (uint16)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800));
+ float s = Sin((float)((CTimer::GetTimeInMilliseconds() + (uintptr)entity) & 0x7FF) * DEGTORAD(360.0f / 0x800));
int32 color = (MAXDIST - dist) * (0.5f * s + 0.5f) / MAXDIST * 255.0f;
CShadows::StoreStaticShadow((uintptr)entity, SHADOWTYPE_ADDITIVE, gpShadowExplosionTex, &pos,
|