summaryrefslogtreecommitdiffstats
path: root/src/weapons
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-02-03 01:14:48 +0100
committerGitHub <noreply@github.com>2021-02-03 01:14:48 +0100
commitb47a23ab794e3520c6ec9d1ee19d3f4e3153494c (patch)
tree411b4fcc6a353de7809816672bf4197785f314fc /src/weapons
parentMerge pull request #1017 from IlDucci/master (diff)
parentUse original animation names from VCS (diff)
downloadre3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.gz
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.bz2
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.lz
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.xz
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.tar.zst
re3-b47a23ab794e3520c6ec9d1ee19d3f4e3153494c.zip
Diffstat (limited to 'src/weapons')
-rw-r--r--src/weapons/BulletInfo.cpp6
-rw-r--r--src/weapons/Weapon.cpp20
-rw-r--r--src/weapons/WeaponInfo.cpp6
3 files changed, 16 insertions, 16 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp
index e87a7407..bfe27e18 100644
--- a/src/weapons/BulletInfo.cpp
+++ b/src/weapons/BulletInfo.cpp
@@ -121,7 +121,7 @@ void CBulletInfo::Update(void)
if (pPed->DoesLOSBulletHitPed(point)) {
if (pPed->IsPedInControl() && !pPed->bIsDucking) {
pPed->ClearAttackByRemovingAnim();
- CAnimBlendAssociation* pAnim = CAnimManager::AddAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_SHOT_FRONT_PARTIAL);
+ CAnimBlendAssociation* pAnim = CAnimManager::AddAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HITBYGUN_FRONT);
pAnim->SetBlend(0.0f, 8.0f);
}
pPed->InflictDamage(pBullet->m_pSource, pBullet->m_eWeaponType, pBullet->m_nDamage, (ePedPieceTypes)point.pieceB, pPed->GetLocalDirection(pPed->GetPosition() - point.point));
@@ -146,9 +146,9 @@ void CBulletInfo::Update(void)
if (pPed->GetPedState() == PED_DEAD) {
CAnimBlendAssociation* pAnim;
if (RpAnimBlendClumpGetFirstAssociation(pPed->GetClump(), ASSOC_FRONTAL))
- pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f);
+ pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f);
else
- pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT, 8.0f);
+ pAnim = CAnimManager::BlendAnimation(pPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR, 8.0f);
if (pAnim) {
pAnim->SetCurrentTime(0.0f);
pAnim->flags |= ASSOC_RUNNING;
diff --git a/src/weapons/Weapon.cpp b/src/weapons/Weapon.cpp
index a987a4c7..dab510be 100644
--- a/src/weapons/Weapon.cpp
+++ b/src/weapons/Weapon.cpp
@@ -473,9 +473,9 @@ CWeapon::FireMelee(CEntity *shooter, CVector &fireSource)
victimPed->ApplyMoveForce(posOffset.x*-5.0f, posOffset.y*-5.0f, 3.0f);
if ( isBat && victimPed->IsPlayer() )
- victimPed->SetFall(3000, AnimationId(ANIM_KO_SKID_FRONT + localDir), false);
+ victimPed->SetFall(3000, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false);
else
- victimPed->SetFall(1500, AnimationId(ANIM_KO_SKID_FRONT + localDir), false);
+ victimPed->SetFall(1500, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false);
shooterPed->m_pSeekTarget = victimPed;
shooterPed->m_pSeekTarget->RegisterReference(&shooterPed->m_pSeekTarget);
@@ -904,7 +904,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
victimPed->bIsStanding = false;
victimPed->ApplyMoveForce(posOffset.x*-5.0f, posOffset.y*-5.0f, 5.0f);
- victimPed->SetFall(1500, AnimationId(ANIM_KO_SKID_FRONT + localDir), false);
+ victimPed->SetFall(1500, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false);
victimPed->InflictDamage(shooter, m_eWeaponType, info->m_nDamage, (ePedPieceTypes)point->pieceB, localDir);
}
@@ -917,7 +917,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
{
victimPed->ClearAttackByRemovingAnim();
- CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir));
+ CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir));
ASSERT(asoc!=nil);
asoc->blendAmount = 0.0f;
@@ -933,7 +933,7 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
{
victimPed->ClearAttackByRemovingAnim();
- CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir));
+ CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir));
ASSERT(asoc!=nil);
asoc->blendAmount = 0.0f;
@@ -983,9 +983,9 @@ CWeapon::DoBulletImpact(CEntity *shooter, CEntity *victim,
{
CAnimBlendAssociation *asoc;
if ( RpAnimBlendClumpGetFirstAssociation(victimPed->GetClump(), ASSOC_FRONTAL) )
- asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT_F, 8.0f);
+ asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR_FRONT, 8.0f);
else
- asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_FLOOR_HIT, 8.0f);
+ asoc = CAnimManager::BlendAnimation(victimPed->GetClump(), ASSOCGRP_STD, ANIM_STD_HIT_FLOOR, 8.0f);
if ( asoc )
{
@@ -1248,7 +1248,7 @@ CWeapon::FireShotgun(CEntity *shooter, CVector *fireSource)
victimPed->ApplyMoveForce(posOffset.x*-2.0f, posOffset.y*-2.0f, 0.0f);
if ( cantStandup )
- victimPed->SetFall(1500, AnimationId(ANIM_KO_SKID_FRONT + localDir), false);
+ victimPed->SetFall(1500, AnimationId(ANIM_STD_HIGHIMPACT_FRONT + localDir), false);
victimPed->InflictDamage(shooter, m_eWeaponType, info->m_nDamage, (ePedPieceTypes)point.pieceB, localDir);
@@ -1719,7 +1719,7 @@ CWeapon::FireInstantHitFromCar(CAutomobile *shooter, bool left)
victimPed->ReactToAttack(FindPlayerPed());
victimPed->ClearAttackByRemovingAnim();
- CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir));
+ CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir));
ASSERT(asoc!=nil);
asoc->blendAmount = 0.0f;
asoc->blendDelta = 8.0f;
@@ -2089,7 +2089,7 @@ FireOneInstantHitRound(CVector *source, CVector *target, int32 damage)
victimPed->ClearAttackByRemovingAnim();
- CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_SHOT_FRONT_PARTIAL + localDir));
+ CAnimBlendAssociation *asoc = CAnimManager::AddAnimation(victimPed->GetClump(), ASSOCGRP_STD, AnimationId(ANIM_STD_HITBYGUN_FRONT + localDir));
ASSERT(asoc!=nil);
asoc->blendAmount = 0.0f;
asoc->blendDelta = 8.0f;
diff --git a/src/weapons/WeaponInfo.cpp b/src/weapons/WeaponInfo.cpp
index 10737acb..ba872454 100644
--- a/src/weapons/WeaponInfo.cpp
+++ b/src/weapons/WeaponInfo.cpp
@@ -37,8 +37,8 @@ CWeaponInfo::Initialise(void)
debug("Initialising CWeaponInfo...\n");
for (int i = 0; i < WEAPONTYPE_TOTALWEAPONS; i++) {
aWeaponInfo[i].m_eWeaponFire = WEAPON_FIRE_INSTANT_HIT;
- aWeaponInfo[i].m_AnimToPlay = ANIM_PUNCH_R;
- aWeaponInfo[i].m_Anim2ToPlay = NUM_ANIMS;
+ aWeaponInfo[i].m_AnimToPlay = ANIM_STD_PUNCH;
+ aWeaponInfo[i].m_Anim2ToPlay = ANIM_STD_NUM;
aWeaponInfo[i].m_Flags = WEAPONFLAG_USE_GRAVITY | WEAPONFLAG_SLOWS_DOWN | WEAPONFLAG_RAND_SPEED | WEAPONFLAG_EXPANDS | WEAPONFLAG_EXPLODES;
}
debug("Loading weapon data...\n");
@@ -96,7 +96,7 @@ CWeaponInfo::LoadWeaponData(void)
fireType[0] = '\0';
fireOffsetY = 0.0f;
fireOffsetZ = 0.0f;
- animId = ANIM_WALK;
+ animId = ANIM_STD_WALK;
sscanf(
&line[lp],
"%s %s %f %d %d %d %d %f %f %f %f %f %f %f %s %s %f %f %f %f %d %d",