diff options
author | erorcun <erayorcunus@gmail.com> | 2020-10-18 18:45:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-18 18:45:11 +0200 |
commit | 70f9832e14ff452e81ae580a1a15b9d6f4bd63b6 (patch) | |
tree | c2a222cfdbb5d7ebcd9acf27920b7fa6da6918d1 /src/weapons | |
parent | typo fixes (diff) | |
parent | Merge pull request #772 from Nick007J/miami (diff) | |
download | re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.gz re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.bz2 re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.lz re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.xz re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.tar.zst re3-70f9832e14ff452e81ae580a1a15b9d6f4bd63b6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/weapons/BulletInfo.cpp | 4 | ||||
-rw-r--r-- | src/weapons/Weapon.cpp | 16 | ||||
-rw-r--r-- | src/weapons/WeaponType.h | 12 |
3 files changed, 21 insertions, 11 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp index 375a2ca9..13032300 100644 --- a/src/weapons/BulletInfo.cpp +++ b/src/weapons/BulletInfo.cpp @@ -205,13 +205,13 @@ void CBulletInfo::Update(void) if (pHitEntity->IsObject()) { CObject *pHitObject = (CObject*)pHitEntity; if ( !pHitObject->bInfiniteMass && pHitObject->m_fCollisionDamageMultiplier < 99.9f) { - bool notStatic = !pHitObject->IsStatic(); + bool notStatic = !pHitObject->GetIsStatic(); if (notStatic && pHitObject->m_fUprootLimit <= 0.0f) { pHitObject->bIsStatic = false; pHitObject->AddToMovingList(); } - notStatic = !pHitObject->IsStatic(); + notStatic = !pHitObject->GetIsStatic(); if (!notStatic) { CVector moveForce = point.normal * -BULLET_HIT_FORCE; pHitObject->ApplyMoveForce(moveForce.x, moveForce.y, moveForce.z); diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp index 48f90897..5d9686b5 100644 --- a/src/weapons/Weapon.cpp +++ b/src/weapons/Weapon.cpp @@ -1526,14 +1526,14 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim, if ( !victimObject->bInfiniteMass && victimObject->m_fCollisionDamageMultiplier < 99.9f) { - bool notStatic = !victimObject->IsStatic(); + bool notStatic = !victimObject->GetIsStatic(); if (notStatic && victimObject->m_fUprootLimit <= 0.0f) { - victimObject->bIsStatic = false; + victimObject->SetIsStatic(false); victimObject->AddToMovingList(); } - notStatic = !victimObject->IsStatic(); + notStatic = !victimObject->GetIsStatic(); if (!notStatic) { CVector moveForce = point->normal * -4.0f; @@ -1922,14 +1922,14 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource) if ( !victimObject->bInfiniteMass ) { - bool notStatic = !victimObject->IsStatic(); + bool notStatic = !victimObject->GetIsStatic(); if ( notStatic && victimObject->m_fUprootLimit <= 0.0f ) { - victimObject->bIsStatic = false; + victimObject->SetIsStatic(false); victimObject->AddToMovingList(); } - notStatic = !victimObject->IsStatic(); + notStatic = !victimObject->GetIsStatic(); if ( !notStatic ) { CVector moveForce = point.normal*-5.0f; @@ -3149,9 +3149,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(); } } diff --git a/src/weapons/WeaponType.h b/src/weapons/WeaponType.h index 65d715ec..1220196f 100644 --- a/src/weapons/WeaponType.h +++ b/src/weapons/WeaponType.h @@ -54,7 +54,17 @@ enum eWeaponType }; enum { - TOTAL_WEAPON_SLOTS = 10, + WEAPONSLOT_UNARMED = 0, + WEAPONSLOT_MELEE, + WEAPONSLOT_PROJECTILE, + WEAPONSLOT_HANDGUN, + WEAPONSLOT_SHOTGUN, + WEAPONSLOT_SUBMACHINEGUN, + WEAPONSLOT_RIFLE, + WEAPONSLOT_HEAVY, + WEAPONSLOT_SNIPER, + WEAPONSLOT_OTHER, + TOTAL_WEAPON_SLOTS }; enum eWeaponFire { |