diff options
author | Sergeanur <s.anureev@yandex.ua> | 2020-10-18 16:40:06 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2020-10-18 16:40:06 +0300 |
commit | b91f6a45501634b55f6ef2c08d57c5293d5fd3a0 (patch) | |
tree | 34cdedbe9dda385d48a416d1c26ef220132d35f0 /src/weapons | |
parent | 23220d799c0a44b75f6863848124852cc98b559e (diff) |
Setter for bIsStatic (became virtual in SA)
Diffstat (limited to 'src/weapons')
-rw-r--r-- | src/weapons/BulletInfo.cpp | 6 | ||||
-rw-r--r-- | src/weapons/Weapon.cpp | 16 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp index 15dde011..e87a7407 100644 --- a/src/weapons/BulletInfo.cpp +++ b/src/weapons/BulletInfo.cpp @@ -185,11 +185,11 @@ void CBulletInfo::Update(void) if (pHitEntity->IsObject()) { CObject* pObject = (CObject*)pHitEntity; if (!pObject->bInfiniteMass) { - if (pObject->IsStatic() && pObject->m_fUprootLimit <= 0.0f) { - pObject->bIsStatic = false; + if (pObject->GetIsStatic() && pObject->m_fUprootLimit <= 0.0f) { + pObject->SetIsStatic(false); pObject->AddToMovingList(); } - if (!pObject->IsStatic()) + if (!pObject->GetIsStatic()) pObject->ApplyMoveForce(-BULLET_HIT_FORCE * point.normal); } } diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 37f59c95..85f0bc15 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -1057,13 +1057,13 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim, if ( !victimObject->bInfiniteMass ) { - if ( victimObject->IsStatic() && victimObject->m_fUprootLimit <= 0.0f ) + if ( victimObject->GetIsStatic() && victimObject->m_fUprootLimit <= 0.0f ) { - victimObject->bIsStatic = false; + victimObject->SetIsStatic(false); victimObject->AddToMovingList(); } - if ( !victimObject->IsStatic()) + if ( !victimObject->GetIsStatic()) { CVector moveForce = point->normal*-4.0f; victimObject->ApplyMoveForce(moveForce.x, moveForce.y, moveForce.z); @@ -1316,13 +1316,13 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) if ( !victimObject->bInfiniteMass ) { - if ( victimObject->IsStatic() && victimObject->m_fUprootLimit <= 0.0f ) + if ( victimObject->GetIsStatic() && victimObject->m_fUprootLimit <= 0.0f ) { - victimObject->bIsStatic = false; + victimObject->SetIsStatic(false); victimObject->AddToMovingList(); } - if ( !victimObject->IsStatic()) + if ( !victimObject->GetIsStatic()) { CVector moveForce = point.normal*-5.0f; victimObject->ApplyMoveForce(moveForce.x, moveForce.y, moveForce.z); @@ -2258,9 +2258,9 @@ CWeapon::BlowUpExplosiveThings(CEntity *thing) object->m_vecMoveSpeed.x += float((CGeneral::GetRandomNumber()&255) - 128) * 0.0002f; object->m_vecMoveSpeed.y += float((CGeneral::GetRandomNumber()&255) - 128) * 0.0002f; - if ( object->IsStatic()) + if ( object->GetIsStatic()) { - object->bIsStatic = false; + object->SetIsStatic(false); object->AddToMovingList(); } } |