summaryrefslogtreecommitdiffstats
path: root/src/weapons/ShotInfo.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-26 13:21:45 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-26 13:21:45 +0100
commitd459ef882082f41a94b9ae9c298d361b15374cfd (patch)
tree1fd023b4e241800eb9f60b9b9c38e1c0933a5b69 /src/weapons/ShotInfo.cpp
parentunfix particle bug (diff)
downloadre3-d459ef882082f41a94b9ae9c298d361b15374cfd.tar
re3-d459ef882082f41a94b9ae9c298d361b15374cfd.tar.gz
re3-d459ef882082f41a94b9ae9c298d361b15374cfd.tar.bz2
re3-d459ef882082f41a94b9ae9c298d361b15374cfd.tar.lz
re3-d459ef882082f41a94b9ae9c298d361b15374cfd.tar.xz
re3-d459ef882082f41a94b9ae9c298d361b15374cfd.tar.zst
re3-d459ef882082f41a94b9ae9c298d361b15374cfd.zip
Diffstat (limited to '')
-rw-r--r--src/weapons/ShotInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/weapons/ShotInfo.cpp b/src/weapons/ShotInfo.cpp
index c0ab9ac1..e604093c 100644
--- a/src/weapons/ShotInfo.cpp
+++ b/src/weapons/ShotInfo.cpp
@@ -76,7 +76,7 @@ CShotInfo::AddShot(CEntity *sourceEntity, eWeaponType weapon, CVector startPos,
gaShotInfo[slot].m_areaAffected.z += CShotInfo::ms_afRandTable[CGeneral::GetRandomNumber() % ARRAY_SIZE(ms_afRandTable)];
}
gaShotInfo[slot].m_areaAffected.Normalise();
- if (weaponInfo->m_bRandSpeed)
+ if (weaponInfo->IsFlagSet(WEAPONFLAG_RAND_SPEED))
gaShotInfo[slot].m_areaAffected *= CShotInfo::ms_afRandTable[CGeneral::GetRandomNumber() % ARRAY_SIZE(ms_afRandTable)] + weaponInfo->m_fSpeed;
else
gaShotInfo[slot].m_areaAffected *= weaponInfo->m_fSpeed;
@@ -117,10 +117,10 @@ CShotInfo::Update()
shot.m_inUse = false;
}
- if (weaponInfo->m_bSlowsDown)
+ if (weaponInfo->IsFlagSet(WEAPONFLAG_SLOWS_DOWN))
shot.m_areaAffected *= pow(0.96, CTimer::GetTimeStep()); // FRAMERATE
- if (weaponInfo->m_bExpands)
+ if (weaponInfo->IsFlagSet(WEAPONFLAG_EXPANDS))
shot.m_radius += 0.075f * CTimer::GetTimeStep();
shot.m_startPos += CTimer::GetTimeStep() * shot.m_areaAffected;