diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-01 11:54:05 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2021-08-01 11:54:05 +0200 |
commit | 70080f1fdbafe5ecd11c573d4d9fba522a5d8235 (patch) | |
tree | f2a737732d7d7a05b7195b69bf3f317233acbca3 /src/weapons | |
parent | CVisibilityPlugins and CRenderer fixes; pulled MLO back in (diff) | |
download | re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.gz re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.bz2 re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.lz re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.xz re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.tar.zst re3-70080f1fdbafe5ecd11c573d4d9fba522a5d8235.zip |
Diffstat (limited to 'src/weapons')
-rw-r--r-- | src/weapons/Explosion.cpp | 8 | ||||
-rw-r--r-- | src/weapons/Explosion.h | 6 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/weapons/Explosion.cpp b/src/weapons/Explosion.cpp index 078f01fa..7683ed97 100644 --- a/src/weapons/Explosion.cpp +++ b/src/weapons/Explosion.cpp @@ -102,7 +102,11 @@ CExplosion::GetExplosionPosition(uint8 id) } bool +#ifdef SIMPLER_MISSIONS +CExplosion::AddExplosion(CEntity* explodingEntity, CEntity* culprit, eExplosionType type, const CVector& pos, uint32 lifetime, bool makeSound, float radius) +#else CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime, bool makeSound) +#endif { CVector pPosn; CVector posGround; @@ -150,7 +154,11 @@ CExplosion::AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionT switch (type) { case EXPLOSION_GRENADE: +#ifdef SIMPLER_MISSIONS + explosion.m_fRadius = (radius == -1.0f ? 9.0f : radius); +#else explosion.m_fRadius = 9.0f; +#endif explosion.m_fPower = 300.0f; explosion.m_fStopTime = lifetime + CTimer::GetTimeInMilliseconds() + 750; explosion.m_fPropagationRate = 0.5f; diff --git a/src/weapons/Explosion.h b/src/weapons/Explosion.h index 7aa02b63..e76c99ea 100644 --- a/src/weapons/Explosion.h +++ b/src/weapons/Explosion.h @@ -37,7 +37,11 @@ class CExplosion float m_fPower; float m_fZshift; public: - static bool AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime, bool makeSound = true); //done(new parametr in android ver is fix for one mission) +#ifdef SIMPLER_MISSIONS + static bool AddExplosion(CEntity *explodingEntity, CEntity *culprit, eExplosionType type, const CVector &pos, uint32 lifetime, bool makeSound = true, float radius = -1.0f); +#else + static bool AddExplosion(CEntity* explodingEntity, CEntity* culprit, eExplosionType type, const CVector& pos, uint32 lifetime, bool makeSound = true); +#endif static void ClearAllExplosions(); //done static bool DoesExplosionMakeSound(uint8 id); //done static int8 GetExplosionActiveCounter(uint8 id); //done |