summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/BulletInfo.cpp2
-rw-r--r--src/weapons/ProjectileInfo.cpp2
-rw-r--r--src/weapons/Weapon.cpp28
3 files changed, 16 insertions, 16 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp
index 7fa32ca7..b7270f4b 100644
--- a/src/weapons/BulletInfo.cpp
+++ b/src/weapons/BulletInfo.cpp
@@ -171,7 +171,7 @@ void CBulletInfo::Update(void)
}
if (pBullet->m_eWeaponType == WEAPONTYPE_SNIPERRIFLE && bAddSound) {
cAudioScriptObject* pAudio;
- switch (pHitEntity->m_type) {
+ switch (pHitEntity->GetType()) {
case ENTITY_TYPE_BUILDING:
pAudio = new cAudioScriptObject();
pAudio->Posn = pHitEntity->GetPosition();
diff --git a/src/weapons/ProjectileInfo.cpp b/src/weapons/ProjectileInfo.cpp
index c174305c..2fba42e3 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) {
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index a3d52f69..9897e73f 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -990,7 +990,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
}
else
{
- switch ( victim->m_type )
+ switch ( victim->GetType() )
{
case ENTITY_TYPE_BUILDING:
{
@@ -1065,7 +1065,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
}
}
- switch ( victim->m_type )
+ switch ( victim->GetType() )
{
case ENTITY_TYPE_BUILDING:
{
@@ -1256,7 +1256,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
}
else
{
- switch ( victim->m_type )
+ switch ( victim->GetType() )
{
case ENTITY_TYPE_VEHICLE:
{
@@ -1315,7 +1315,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
}
}
- switch ( victim->m_type )
+ switch ( victim->GetType() )
{
case ENTITY_TYPE_BUILDING:
{
@@ -1724,7 +1724,7 @@ CWeapon::FireInstantHitFromCar(CAutomobile *shooter, bool left)
else
CGlass::WasGlassHitByBullet(victim, point.point);
- switch ( victim->m_type )
+ switch ( victim->GetType() )
{
case ENTITY_TYPE_BUILDING:
{
@@ -1796,10 +1796,10 @@ CWeapon::DoDoomAiming(CEntity *shooter, CVector *source, CVector *target)
if ( (CEntity*)shooterPed != victim && shooterPed->CanSeeEntity(victim, DEGTORAD(22.5f)) )
{
- if ( !(victim->m_status == STATUS_TRAIN_MOVING
- || victim->m_status == STATUS_TRAIN_NOT_MOVING
- || victim->m_status == STATUS_HELI
- || victim->m_status == STATUS_PLANE) )
+ if ( !(victim->GetStatus() == STATUS_TRAIN_MOVING
+ || victim->GetStatus() == STATUS_TRAIN_NOT_MOVING
+ || victim->GetStatus() == STATUS_HELI
+ || victim->GetStatus() == STATUS_PLANE) )
{
float distToVictim = (shooterPed->GetPosition()-victim->GetPosition()).Magnitude2D();
float distToVictimZ = Abs(shooterPed->GetPosition().z-victim->GetPosition().z);
@@ -1866,10 +1866,10 @@ CWeapon::DoTankDoomAiming(CEntity *shooter, CEntity *driver, CVector *source, CV
if ( shooter != victim && driver != victim )
{
- if ( !(victim->m_status == STATUS_TRAIN_MOVING
- || victim->m_status == STATUS_TRAIN_NOT_MOVING
- || victim->m_status == STATUS_HELI
- || victim->m_status == STATUS_PLANE) )
+ if ( !(victim->GetStatus() == STATUS_TRAIN_MOVING
+ || victim->GetStatus() == STATUS_TRAIN_NOT_MOVING
+ || victim->GetStatus() == STATUS_HELI
+ || victim->GetStatus() == STATUS_PLANE) )
{
if ( !(victim->IsVehicle() && victim->bRenderScorched) )
{
@@ -2086,7 +2086,7 @@ FireOneInstantHitRound(CVector *source, CVector *target, int32 damage)
((CVehicle *)victim)->InflictDamage(nil, WEAPONTYPE_UZI, damage);
//BUG ? no CGlass::WasGlassHitByBullet
- switch ( victim->m_type )
+ switch ( victim->GetType() )
{
case ENTITY_TYPE_BUILDING:
{