diff options
Diffstat (limited to 'src/weapons/ProjectileInfo.cpp')
-rw-r--r-- | src/weapons/ProjectileInfo.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/weapons/ProjectileInfo.cpp b/src/weapons/ProjectileInfo.cpp index c174305c..8297d953 100644 --- a/src/weapons/ProjectileInfo.cpp +++ b/src/weapons/ProjectileInfo.cpp @@ -193,7 +193,7 @@ CProjectileInfo::Update() if (!gaProjectileInfo[i].m_bInUse) continue; CPed *ped = (CPed*)gaProjectileInfo[i].m_pSource; - if (ped != nil && ped->m_type == ENTITY_TYPE_PED && !ped->IsPointerValid()) + if (ped != nil && ped->IsPed() && !ped->IsPointerValid()) gaProjectileInfo[i].m_pSource = nil; if (ms_apProjectile[i] == nil) { @@ -245,7 +245,7 @@ CProjectileInfo::IsProjectileInRange(float x1, float x2, float y1, float y2, flo for (int i = 0; i < ARRAY_SIZE(ms_apProjectile); i++) { if (gaProjectileInfo[i].m_bInUse) { if (gaProjectileInfo[i].m_eWeaponType == WEAPONTYPE_ROCKETLAUNCHER || gaProjectileInfo[i].m_eWeaponType == WEAPONTYPE_MOLOTOV || gaProjectileInfo[i].m_eWeaponType == WEAPONTYPE_GRENADE) { - CVector &pos = ms_apProjectile[i]->GetPosition(); + const CVector &pos = ms_apProjectile[i]->GetPosition(); if (pos.x >= x1 && pos.x <= x2 && pos.y >= y1 && pos.y <= y2 && pos.z >= z1 && pos.z <= z2) { result = true; if (remove) { |