Weapon fixes

This commit is contained in:
eray orçunus
2020-05-16 15:07:09 +03:00
parent 793a6a6d7e
commit 40ee29fb99
7 changed files with 59 additions and 31 deletions

View File

@@ -704,6 +704,7 @@ public:
void RemoveWeaponAnims(int, float);
void CreateDeadPedMoney(void);
void CreateDeadPedWeaponPickups(void);
// void CreateDeadPedPickupCoors(float *x, float *y, float *z);
void SetAttackTimer(uint32);
void SetBeingDraggedFromCar(CVehicle*, uint32, bool);
void SetRadioStation(void);
@@ -899,7 +900,7 @@ public:
if (m_nPedType == PEDTYPE_COP && !!weapon->m_bCop3rd)
return ANIM_WEAPON_FIRE_3RD;
else
return weapon->m_bAnimDetonate ? ANIM_BOMBER : ANIM_WEAPON_FIRE;
return GetPrimaryFireAnim(weapon);
}
static AnimationId GetFireAnimGround(CWeaponInfo* weapon, bool kickFloorIfNone = true) {
@@ -916,6 +917,17 @@ public:
else
return (AnimationId)0;
}
static AnimationId GetPrimaryFireAnim(CWeaponInfo* weapon) {
// TODO(Miami): Revert that when weapons got ported
if (weapon->m_AnimToPlay == ASSOCGRP_STD)
return ANIM_FIGHT_PPUNCH;
if (weapon->m_bAnimDetonate)
return ANIM_BOMBER;
else
return ANIM_WEAPON_FIRE;
}
// --
// My additions, because there were many, many instances of that.