summaryrefslogtreecommitdiffstats
path: root/src/peds/Ped.h
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-12-26 13:22:02 +0100
committerSergeanur <s.anureev@yandex.ua>2020-12-26 13:22:02 +0100
commitc9c447e7a9f9616b111b9d6211ac072e7739ba4c (patch)
tree15b4054d867ea8f60b90550033ccf85cbfc86102 /src/peds/Ped.h
parentfix mblur stencil (diff)
downloadre3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar
re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.gz
re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.bz2
re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.lz
re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.xz
re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.tar.zst
re3-c9c447e7a9f9616b111b9d6211ac072e7739ba4c.zip
Diffstat (limited to '')
-rw-r--r--src/peds/Ped.h32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/peds/Ped.h b/src/peds/Ped.h
index 5683c7c9..88a16a95 100644
--- a/src/peds/Ped.h
+++ b/src/peds/Ped.h
@@ -1002,23 +1002,23 @@ public:
// My names. Inlined in VC
AnimationId GetFireAnimNotDucking(CWeaponInfo* weapon) {
- if (m_nPedType == PEDTYPE_COP && !!weapon->m_bCop3rd)
+ if (m_nPedType == PEDTYPE_COP && weapon->IsFlagSet(WEAPONFLAG_COP3_RD))
return ANIM_WEAPON_FIRE_3RD;
else
return GetPrimaryFireAnim(weapon);
}
static AnimationId Get3rdFireAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bCop3rd)
+ if (weapon->IsFlagSet(WEAPONFLAG_COP3_RD))
return ANIM_WEAPON_FIRE_3RD;
else
return (AnimationId)0;
}
static AnimationId GetFireAnimGround(CWeaponInfo* weapon, bool kickFloorIfNone = true) {
- if (!!weapon->m_bGround2nd)
+ if (weapon->IsFlagSet(WEAPONFLAG_GROUND_2ND))
return ANIM_WEAPON_CROUCHFIRE;
- else if (!!weapon->m_bGround3rd)
+ else if (weapon->IsFlagSet(WEAPONFLAG_GROUND_3RD))
return ANIM_WEAPON_FIRE_3RD;
else if (kickFloorIfNone)
return ANIM_KICK_FLOOR;
@@ -1027,60 +1027,68 @@ public:
}
static AnimationId GetPrimaryFireAnim(CWeaponInfo* weapon) {
- if (weapon->m_bAnimDetonate)
+ if (weapon->IsFlagSet(WEAPONFLAG_ANIMDETONATE))
return ANIM_BOMBER;
else
return ANIM_WEAPON_FIRE;
}
static AnimationId GetCrouchReloadAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bReload)
+ if (weapon->IsFlagSet(WEAPONFLAG_RELOAD))
return ANIM_WEAPON_CROUCHRELOAD;
else
return (AnimationId)0;
}
static AnimationId GetCrouchFireAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bCrouchFire)
+ if (weapon->IsFlagSet(WEAPONFLAG_CROUCHFIRE))
return ANIM_WEAPON_CROUCHFIRE;
else
return (AnimationId)0;
}
static AnimationId GetReloadAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bReload)
+ if (weapon->IsFlagSet(WEAPONFLAG_RELOAD))
return ANIM_WEAPON_RELOAD;
else
return (AnimationId)0;
}
static AnimationId GetFightIdleWithMeleeAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bFightMode)
+ if (weapon->IsFlagSet(WEAPONFLAG_FIGHTMODE))
return ANIM_MELEE_IDLE_FIGHTMODE;
else
return (AnimationId)0;
}
static AnimationId GetFinishingAttackAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bFinish3rd)
+ if (weapon->IsFlagSet(WEAPONFLAG_FINISH_3RD))
return ANIM_MELEE_ATTACK_FINISH;
else
return (AnimationId)0;
}
static AnimationId GetSecondFireAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bUse2nd)
+ if (weapon->IsFlagSet(WEAPONFLAG_USE_2ND))
return ANIM_WEAPON_FIRE_2ND; // or ANIM_MELEE_ATTACK_2ND
else
return (AnimationId)0;
}
static AnimationId GetMeleeStartAnim(CWeaponInfo* weapon) {
- if (!!weapon->m_bPartialAttack)
+ if (weapon->IsFlagSet(WEAPONFLAG_PARTIALATTACK))
return ANIM_MELEE_ATTACK_START;
else
return (AnimationId)0;
}
+
+ static AnimationId GetThrowAnim(CWeaponInfo *weapon)
+ {
+ if (weapon->IsFlagSet(WEAPONFLAG_THROW))
+ return ANIM_THROWABLE_START_THROW;
+ else
+ return (AnimationId)0;
+ }
// --
// My additions, because there were many, many instances of that.