mirror of
https://git.rip/DMCA_FUCKER/re3.git
synced 2024-11-06 05:35:55 +00:00
anims done. ped fight hacked to compile
This commit is contained in:
parent
4debd89d8e
commit
49d5c02d69
File diff suppressed because it is too large
Load diff
|
@ -29,6 +29,7 @@ enum AssocGroupId
|
||||||
ASSOCGRP_SNIPER,
|
ASSOCGRP_SNIPER,
|
||||||
ASSOCGRP_THROW,
|
ASSOCGRP_THROW,
|
||||||
ASSOCGRP_FLAMETHROWER,
|
ASSOCGRP_FLAMETHROWER,
|
||||||
|
ASSOCGRP_ROCKETLAUNCHER,
|
||||||
ASSOCGRP_MEDIC,
|
ASSOCGRP_MEDIC,
|
||||||
ASSOCGRP_SUNBATHE,
|
ASSOCGRP_SUNBATHE,
|
||||||
ASSOCGRP_PLAYER_IDLE,
|
ASSOCGRP_PLAYER_IDLE,
|
||||||
|
@ -40,6 +41,7 @@ enum AssocGroupId
|
||||||
ASSOCGRP_PLAYER1ARMED,
|
ASSOCGRP_PLAYER1ARMED,
|
||||||
ASSOCGRP_PLAYER2ARMED,
|
ASSOCGRP_PLAYER2ARMED,
|
||||||
ASSOCGRP_PLAYERBBBAT,
|
ASSOCGRP_PLAYERBBBAT,
|
||||||
|
ASSOCGRP_AICHAINSAW,
|
||||||
ASSOCGRP_PLAYERCHAINSAW,
|
ASSOCGRP_PLAYERCHAINSAW,
|
||||||
ASSOCGRP_SHUFFLE,
|
ASSOCGRP_SHUFFLE,
|
||||||
ASSOCGRP_OLD,
|
ASSOCGRP_OLD,
|
||||||
|
@ -64,11 +66,33 @@ enum AssocGroupId
|
||||||
ASSOCGRP_ROCKETBACK,
|
ASSOCGRP_ROCKETBACK,
|
||||||
ASSOCGRP_ROCKETLEFT,
|
ASSOCGRP_ROCKETLEFT,
|
||||||
ASSOCGRP_ROCKETRIGHT,
|
ASSOCGRP_ROCKETRIGHT,
|
||||||
ASSOCGRP_CHAINSAWBACK,
|
|
||||||
ASSOCGRP_CHAINSAWLEFT,
|
|
||||||
ASSOCGRP_CHAINSAWRIGHT,
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
ASSOCGRP_MPNOTE,
|
||||||
|
ASSOCGRP_CSMISC,
|
||||||
|
ASSOCGRP_DONH2,
|
||||||
|
ASSOCGRP_DONH3,
|
||||||
|
ASSOCGRP_JDT2,
|
||||||
|
ASSOCGRP_JDT4,
|
||||||
|
ASSOCGRP_JDT5,
|
||||||
|
ASSOCGRP_JDT6,
|
||||||
|
ASSOCGRP_MAR1,
|
||||||
|
ASSOCGRP_MAR2,
|
||||||
|
ASSOCGRP_MAR3,
|
||||||
|
ASSOCGRP_SAL1,
|
||||||
|
ASSOCGRP_SAL2,
|
||||||
|
ASSOCGRP_SAL3,
|
||||||
|
ASSOCGRP_SAL4,
|
||||||
|
ASSOCGRP_SAL6,
|
||||||
|
ASSOCGRP_SAL7,
|
||||||
|
ASSOCGRP_VIC2,
|
||||||
|
ASSOCGRP_VIC3,
|
||||||
|
ASSOCGRP_VIC4,
|
||||||
|
ASSOCGRP_VIC6,
|
||||||
|
ASSOCGRP_TOURIST,
|
||||||
|
ASSOCGRP_MAC2,
|
||||||
|
ASSOCGRP_VIC7,
|
||||||
|
|
||||||
NUM_ANIM_ASSOC_GROUPS
|
NUM_ANIM_ASSOC_GROUPS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -40,32 +40,25 @@ enum AnimationId
|
||||||
ANIM_HIT_BACK,
|
ANIM_HIT_BACK,
|
||||||
ANIM_HIT_RIGHT,
|
ANIM_HIT_RIGHT,
|
||||||
ANIM_FLOOR_HIT,
|
ANIM_FLOOR_HIT,
|
||||||
ANIM_HIT_BODYBLOW,
|
|
||||||
ANIM_HIT_CHEST,
|
|
||||||
ANIM_HIT_HEAD,
|
|
||||||
ANIM_HIT_WALK,
|
|
||||||
ANIM_HIT_WALL,
|
ANIM_HIT_WALL,
|
||||||
ANIM_FLOOR_HIT_F,
|
ANIM_FLOOR_HIT_F,
|
||||||
ANIM_HIT_BEHIND,
|
ANIM_HIT_BEHIND,
|
||||||
ANIM_FIGHT_IDLE,
|
ANIM_FIGHT_IDLE,
|
||||||
ANIM_FIGHT2_IDLE,
|
ANIM_FIGHT2_IDLE,
|
||||||
ANIM_FIGHT_SH_F,
|
ANIM_FIGHT_SH_F,
|
||||||
ANIM_FIGHT_BODYBLOW,
|
|
||||||
ANIM_FIGHT_HEAD,
|
|
||||||
ANIM_FIGHT_KICK,
|
|
||||||
ANIM_FIGHT_KNEE,
|
|
||||||
ANIM_FIGHT_LHOOK,
|
|
||||||
ANIM_FIGHT_PUNCH,
|
|
||||||
ANIM_FIGHT_ROUNDHOUSE,
|
|
||||||
ANIM_FIGHT_LONGKICK,
|
|
||||||
ANIM_FIGHT_PPUNCH,
|
ANIM_FIGHT_PPUNCH,
|
||||||
|
ANIM_L_HOOK,
|
||||||
ANIM_FIGHT_JAB,
|
ANIM_R_HOOK,
|
||||||
ANIM_FIGHT_ELBOW_L,
|
ANIM_UPPERCUT,
|
||||||
ANIM_FIGHT_ELBOW_R,
|
ANIM_HEADBUTT,
|
||||||
ANIM_FIGHT_BKICK_L,
|
ANIM_FRONTKICK,
|
||||||
ANIM_FIGHT_BKICK_R,
|
ANIM_ROUNDHOUSE,
|
||||||
|
ANIM_HIT_L_HOOK,
|
||||||
|
ANIM_HIT_R_HOOK,
|
||||||
|
ANIM_HIT_UPPERCUT,
|
||||||
|
ANIM_HIT_HEADBUTT,
|
||||||
|
ANIM_HIT_FRONTKICK,
|
||||||
|
ANIM_HIT_RHOUSE,
|
||||||
ANIM_BOMBER,
|
ANIM_BOMBER,
|
||||||
ANIM_PUNCH_R,
|
ANIM_PUNCH_R,
|
||||||
ANIM_FIGHT_PPUNCH2,
|
ANIM_FIGHT_PPUNCH2,
|
||||||
|
@ -164,6 +157,7 @@ enum AnimationId
|
||||||
|
|
||||||
ANIM_EV_STEP,
|
ANIM_EV_STEP,
|
||||||
ANIM_EV_DIVE,
|
ANIM_EV_DIVE,
|
||||||
|
ANIM_COMMANDO_ROLL,
|
||||||
ANIM_XPRESS_SCRATCH,
|
ANIM_XPRESS_SCRATCH,
|
||||||
ANIM_ROAD_CROSS,
|
ANIM_ROAD_CROSS,
|
||||||
ANIM_TURN_180,
|
ANIM_TURN_180,
|
||||||
|
@ -269,5 +263,66 @@ enum AnimationId
|
||||||
ANIM_STRIP_F,
|
ANIM_STRIP_F,
|
||||||
ANIM_STRIP_G,
|
ANIM_STRIP_G,
|
||||||
|
|
||||||
|
|
||||||
|
ANIM_MPNOTE,
|
||||||
|
ANIM_MPNOTE_LOOP,
|
||||||
|
|
||||||
|
ANIM_IDLE_LOOK,
|
||||||
|
ANIM_IDLE_NO,
|
||||||
|
ANIM_IDLE_YES,
|
||||||
|
ANIM_IDLE_CHAT2,
|
||||||
|
ANIM_IDLE_COUGH,
|
||||||
|
ANIM_IDLE_GIGGLE_FEMALE,
|
||||||
|
ANIM_IDLE_TOUGH_CHAT,
|
||||||
|
ANIM_IDLE_CELL_TALK,
|
||||||
|
|
||||||
|
ANIM_DONH2_CAMERA,
|
||||||
|
ANIM_DONH3_HAPPY,
|
||||||
|
|
||||||
|
ANIM_JDT2_ANXIOUS_TALK,
|
||||||
|
ANIM_JDT2_SHRUG,
|
||||||
|
ANIM_JDT4_DILDO_TALK,
|
||||||
|
ANIM_JDT5_CALM_DOWN,
|
||||||
|
ANIM_JDT5_POINT,
|
||||||
|
ANIM_JDT6_PICKUP,
|
||||||
|
ANIM_JDT6_DOORKNOCK,
|
||||||
|
|
||||||
|
ANIM_MAR1_SKIRT,
|
||||||
|
ANIM_MAR2_CELL_ANSWER,
|
||||||
|
ANIM_MAR2_CELL_END,
|
||||||
|
ANIM_MAR2_CELL_TALK,
|
||||||
|
ANIM_MAR2_FOOT_TAP,
|
||||||
|
ANIM_MAR3_HOOCHY,
|
||||||
|
ANIM_MAR3_NOTE_IDLE,
|
||||||
|
ANIM_MAR3_NOTE_PICK,
|
||||||
|
|
||||||
|
ANIM_SAL1_BIREFCASE_DOWN,
|
||||||
|
ANIM_SAL2_IDLE_SEATED,
|
||||||
|
ANIM_SAL2_SEAT_TO_STAND,
|
||||||
|
ANIM_SAL3_SEATED_TALK,
|
||||||
|
ANIM_SAL3_SEATED_IDLE,
|
||||||
|
ANIM_SAL3_SIT_DOWN,
|
||||||
|
ANIM_SAL4_DUSTDOWN,
|
||||||
|
ANIM_SAL4_GIRLRUN,
|
||||||
|
ANIM_SAL6_ANGRY_SEATED,
|
||||||
|
ANIM_SAL6_IDLE_SEATED,
|
||||||
|
ANIM_SAL7_LOOKOUT,
|
||||||
|
|
||||||
|
ANIM_VIC2_POINT_ANGRY,
|
||||||
|
ANIM_VIC3_WAFT,
|
||||||
|
ANIM_VIC3_PICKUP_ROLL,
|
||||||
|
ANIM_VIC4_CARRY_BOX,
|
||||||
|
ANIM_VIC4_CELL_LOOK,
|
||||||
|
ANIM_VIC4_CRATE_IDLE,
|
||||||
|
ANIM_VIC6_CELL_ANGRY,
|
||||||
|
|
||||||
|
ANIM_TOURIST3,
|
||||||
|
ANIM_TOURIST2,
|
||||||
|
ANIM_TOURIST1,
|
||||||
|
|
||||||
|
ANIM_MAC2_PLEAD,
|
||||||
|
|
||||||
|
ANIM_VIC7_PROD_WITH_FOOT,
|
||||||
|
|
||||||
NUM_ANIMS
|
NUM_ANIMS
|
||||||
};
|
};
|
|
@ -4363,14 +4363,18 @@ cAudioManager::ProcessPedOneShots(cPedParams ¶ms)
|
||||||
if (weaponType == WEAPONTYPE_BRASSKNUCKLE) {
|
if (weaponType == WEAPONTYPE_BRASSKNUCKLE) {
|
||||||
CPed* ped = params.m_pPed;
|
CPed* ped = params.m_pPed;
|
||||||
uint32 fightMove = ped->m_curFightMove;
|
uint32 fightMove = ped->m_curFightMove;
|
||||||
if (fightMove == FIGHTMOVE_BACKLEFT || fightMove == FIGHTMOVE_STDPUNCH || fightMove == FIGHTMOVE_PUNCH ||
|
// LCS:removed for now
|
||||||
|
//if (fightMove == FIGHTMOVE_BACKLEFT || fightMove == FIGHTMOVE_STDPUNCH || fightMove == FIGHTMOVE_PUNCH ||
|
||||||
|
if (
|
||||||
ped->m_nPedState == PED_ATTACK) {
|
ped->m_nPedState == PED_ATTACK) {
|
||||||
CEntity* damageEntity = ped->m_pDamageEntity;
|
CEntity* damageEntity = ped->m_pDamageEntity;
|
||||||
if (!damageEntity)
|
if (!damageEntity)
|
||||||
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1;
|
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1;
|
||||||
else if (damageEntity->GetType() != ENTITY_TYPE_PED)
|
else if (damageEntity->GetType() != ENTITY_TYPE_PED)
|
||||||
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1;
|
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1;
|
||||||
else if (((CPed*)damageEntity)->m_curFightMove != FIGHTMOVE_HITHEAD)
|
// LCS:removed for now
|
||||||
|
//else if (((CPed*)damageEntity)->m_curFightMove != FIGHTMOVE_HITHEAD)
|
||||||
|
else if(1)
|
||||||
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1;
|
m_sQueueSample.m_nSampleIndex = m_anRandomTable[3] % 2 + SFX_HAMMER_HIT_1;
|
||||||
else
|
else
|
||||||
m_sQueueSample.m_nSampleIndex = SFX_HAMMER_HIT_1;
|
m_sQueueSample.m_nSampleIndex = SFX_HAMMER_HIT_1;
|
||||||
|
|
|
@ -100,9 +100,31 @@ enum PedFightMoves
|
||||||
{
|
{
|
||||||
FIGHTMOVE_NULL,
|
FIGHTMOVE_NULL,
|
||||||
// Attacker
|
// Attacker
|
||||||
FIGHTMOVE_STDPUNCH,
|
// FIGHTMOVE_STDPUNCH,
|
||||||
FIGHTMOVE_IDLE,
|
FIGHTMOVE_IDLE,
|
||||||
FIGHTMOVE_SHUFFLE_F,
|
FIGHTMOVE_SHUFFLE_F,
|
||||||
|
// Combos
|
||||||
|
FIGHTMOVE_COMBO_A1,
|
||||||
|
FIGHTMOVE_COMBO_A2,
|
||||||
|
FIGHTMOVE_COMBO_A3,
|
||||||
|
FIGHTMOVE_COMBO_B1,
|
||||||
|
FIGHTMOVE_COMBO_B2,
|
||||||
|
FIGHTMOVE_COMBO_B3,
|
||||||
|
// Melee
|
||||||
|
FIGHTMOVE_MELEE1,
|
||||||
|
FIGHTMOVE_MELEE2,
|
||||||
|
FIGHTMOVE_MELEE3,
|
||||||
|
// Special
|
||||||
|
FIGHTMOVE_GROUNDKICK,
|
||||||
|
// Opponent
|
||||||
|
FIGHTMOVE_HITFRONT,
|
||||||
|
FIGHTMOVE_HITBACK,
|
||||||
|
FIGHTMOVE_HITRIGHT,
|
||||||
|
FIGHTMOVE_HITLEFT,
|
||||||
|
FIGHTMOVE_HITONFLOOR,
|
||||||
|
FIGHTMOVE_HITBEHIND,
|
||||||
|
FIGHTMOVE_IDLE2NORM,
|
||||||
|
/*
|
||||||
FIGHTMOVE_KNEE,
|
FIGHTMOVE_KNEE,
|
||||||
FIGHTMOVE_PUNCHHOOK,
|
FIGHTMOVE_PUNCHHOOK,
|
||||||
FIGHTMOVE_PUNCHJAB,
|
FIGHTMOVE_PUNCHJAB,
|
||||||
|
@ -134,7 +156,16 @@ enum PedFightMoves
|
||||||
FIGHTMOVE_MELEE2,
|
FIGHTMOVE_MELEE2,
|
||||||
FIGHTMOVE_MELEE3,
|
FIGHTMOVE_MELEE3,
|
||||||
FIGHTMOVE_IDLE2NORM,
|
FIGHTMOVE_IDLE2NORM,
|
||||||
NUM_FIGHTMOVES
|
*/
|
||||||
|
|
||||||
|
NUM_FIGHTMOVES,
|
||||||
|
|
||||||
|
// LCS replacements for the old names:
|
||||||
|
// NB: this may be totally bogus, i just need it to compile
|
||||||
|
FIGHTMOVE_PUNCH = FIGHTMOVE_COMBO_A2,
|
||||||
|
FIGHTMOVE_FWDRIGHT = FIGHTMOVE_COMBO_B1,
|
||||||
|
FIGHTMOVE_LONGKICK = FIGHTMOVE_COMBO_B2,
|
||||||
|
FIGHTMOVE_ROUNDHOUSE = FIGHTMOVE_COMBO_B3,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ePedPieceTypes
|
enum ePedPieceTypes
|
||||||
|
|
|
@ -33,6 +33,7 @@ RpClump* flyingClumpTemp;
|
||||||
|
|
||||||
FightMove tFightMoves[NUM_FIGHTMOVES] =
|
FightMove tFightMoves[NUM_FIGHTMOVES] =
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
{ NUM_STD_ANIMS, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
|
{ NUM_STD_ANIMS, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
|
||||||
{ ANIM_PUNCH_R, 0.2f, 8.f/30.f, 0.0f, 0.3f, 1.0f, HITLEVEL_HIGH, 1, 0 },
|
{ ANIM_PUNCH_R, 0.2f, 8.f/30.f, 0.0f, 0.3f, 1.0f, HITLEVEL_HIGH, 1, 0 },
|
||||||
{ ANIM_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
|
{ ANIM_FIGHT_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 },
|
||||||
|
@ -65,6 +66,7 @@ FightMove tFightMoves[NUM_FIGHTMOVES] =
|
||||||
{ ANIM_WEAPON_CROUCHFIRE, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
|
{ ANIM_WEAPON_CROUCHFIRE, 4.f/30.f, 7.f/30.f, 10.f/30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
|
||||||
{ ANIM_WEAPON_SPECIAL, 4.f / 30.f, 7.f / 30.f, 10.f / 30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
|
{ ANIM_WEAPON_SPECIAL, 4.f / 30.f, 7.f / 30.f, 10.f / 30.f, 0.4f, 1.0f, HITLEVEL_HIGH, 1, 0 },
|
||||||
{ ANIM_FIGHT2_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 }
|
{ ANIM_FIGHT2_IDLE, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, HITLEVEL_NULL, 0, 0 }
|
||||||
|
*/
|
||||||
};
|
};
|
||||||
|
|
||||||
static PedOnGroundState
|
static PedOnGroundState
|
||||||
|
@ -1115,10 +1117,7 @@ CPed::StartFightAttack(uint8 buttonPressure)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (m_curFightMove == FIGHTMOVE_BACKKICK)
|
animAssoc->speed = 0.8f;
|
||||||
animAssoc->speed = 1.15f;
|
|
||||||
else
|
|
||||||
animAssoc->speed = 0.8f;
|
|
||||||
}
|
}
|
||||||
if (IsPlayer())
|
if (IsPlayer())
|
||||||
animAssoc->SetCurrentTime(0.08f);
|
animAssoc->SetCurrentTime(0.08f);
|
||||||
|
@ -1227,12 +1226,14 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
|
||||||
default:
|
default:
|
||||||
if (hitLevel == HITLEVEL_LOW) {
|
if (hitLevel == HITLEVEL_LOW) {
|
||||||
hitAnim = ANIM_KO_SHOT_STOM;
|
hitAnim = ANIM_KO_SHOT_STOM;
|
||||||
|
/* LCS: removed
|
||||||
} else if (CGeneral::GetRandomNumber() & 1) {
|
} else if (CGeneral::GetRandomNumber() & 1) {
|
||||||
fall = false;
|
fall = false;
|
||||||
hitAnim = ANIM_HIT_WALK;
|
hitAnim = ANIM_HIT_WALK;
|
||||||
} else if (CGeneral::GetRandomNumber() & 1) {
|
} else if (CGeneral::GetRandomNumber() & 1) {
|
||||||
fall = false;
|
fall = false;
|
||||||
hitAnim = ANIM_HIT_HEAD;
|
hitAnim = ANIM_HIT_HEAD;
|
||||||
|
*/
|
||||||
} else {
|
} else {
|
||||||
hitAnim = ANIM_KO_SHOT_FACE;
|
hitAnim = ANIM_KO_SHOT_FACE;
|
||||||
}
|
}
|
||||||
|
@ -1267,7 +1268,7 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
|
||||||
Say(SOUND_PED_DEFEND);
|
Say(SOUND_PED_DEFEND);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
m_curFightMove = FIGHTMOVE_HITBODY;
|
m_curFightMove = FIGHTMOVE_HITFRONT; // LCS
|
||||||
break;
|
break;
|
||||||
case HITLEVEL_HIGH:
|
case HITLEVEL_HIGH:
|
||||||
switch (direction) {
|
switch (direction) {
|
||||||
|
@ -1281,10 +1282,12 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
|
||||||
m_curFightMove = FIGHTMOVE_HITRIGHT;
|
m_curFightMove = FIGHTMOVE_HITRIGHT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (unk <= 5)
|
// LCS: removed
|
||||||
m_curFightMove = FIGHTMOVE_HITHEAD;
|
//if (unk <= 5)
|
||||||
else
|
// m_curFightMove = FIGHTMOVE_HITHEAD;
|
||||||
m_curFightMove = FIGHTMOVE_HITBIGSTEP;
|
//else
|
||||||
|
// m_curFightMove = FIGHTMOVE_HITBIGSTEP;
|
||||||
|
m_curFightMove = FIGHTMOVE_HITFRONT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1300,10 +1303,12 @@ CPed::StartFightDefend(uint8 direction, uint8 hitLevel, uint8 unk)
|
||||||
m_curFightMove = FIGHTMOVE_HITRIGHT;
|
m_curFightMove = FIGHTMOVE_HITRIGHT;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (unk <= 5)
|
// LCS: removed
|
||||||
m_curFightMove = FIGHTMOVE_HITCHEST;
|
//if (unk <= 5)
|
||||||
else
|
// m_curFightMove = FIGHTMOVE_HITCHEST;
|
||||||
m_curFightMove = FIGHTMOVE_HITBIGSTEP;
|
//else
|
||||||
|
// m_curFightMove = FIGHTMOVE_HITBIGSTEP;
|
||||||
|
m_curFightMove = FIGHTMOVE_HITFRONT;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -1457,30 +1462,30 @@ CPed::Fight(void)
|
||||||
CVector touchingNodePos(0.0f, 0.0f, 0.0f);
|
CVector touchingNodePos(0.0f, 0.0f, 0.0f);
|
||||||
|
|
||||||
switch (m_curFightMove) {
|
switch (m_curFightMove) {
|
||||||
case FIGHTMOVE_KNEE:
|
// case FIGHTMOVE_KNEE:
|
||||||
TransformToNode(touchingNodePos, PED_LOWERLEGR);
|
// TransformToNode(touchingNodePos, PED_LOWERLEGR);
|
||||||
break;
|
// break;
|
||||||
case FIGHTMOVE_PUNCHHOOK:
|
// case FIGHTMOVE_PUNCHHOOK:
|
||||||
case FIGHTMOVE_PUNCHJAB:
|
// case FIGHTMOVE_PUNCHJAB:
|
||||||
TransformToNode(touchingNodePos, PED_HANDL);
|
// TransformToNode(touchingNodePos, PED_HANDL);
|
||||||
break;
|
// break;
|
||||||
case FIGHTMOVE_LONGKICK:
|
case FIGHTMOVE_LONGKICK:
|
||||||
case FIGHTMOVE_ROUNDHOUSE:
|
case FIGHTMOVE_ROUNDHOUSE:
|
||||||
case FIGHTMOVE_FWDLEFT:
|
// case FIGHTMOVE_FWDLEFT:
|
||||||
case FIGHTMOVE_BACKRIGHT:
|
// case FIGHTMOVE_BACKRIGHT:
|
||||||
case FIGHTMOVE_GROUNDKICK:
|
case FIGHTMOVE_GROUNDKICK:
|
||||||
TransformToNode(touchingNodePos, PED_FOOTR);
|
TransformToNode(touchingNodePos, PED_FOOTR);
|
||||||
break;
|
break;
|
||||||
case FIGHTMOVE_FWDRIGHT:
|
case FIGHTMOVE_FWDRIGHT:
|
||||||
TransformToNode(touchingNodePos, PED_HEAD);
|
TransformToNode(touchingNodePos, PED_HEAD);
|
||||||
break;
|
break;
|
||||||
case FIGHTMOVE_BACKKICK:
|
// case FIGHTMOVE_BACKKICK:
|
||||||
case FIGHTMOVE_BACKFLIP:
|
// case FIGHTMOVE_BACKFLIP:
|
||||||
TransformToNode(touchingNodePos, PED_FOOTL);
|
// TransformToNode(touchingNodePos, PED_FOOTL);
|
||||||
break;
|
// break;
|
||||||
case FIGHTMOVE_BACKLEFT:
|
// case FIGHTMOVE_BACKLEFT:
|
||||||
TransformToNode(touchingNodePos, PED_UPPERARML);
|
// TransformToNode(touchingNodePos, PED_UPPERARML);
|
||||||
break;
|
// break;
|
||||||
default:
|
default:
|
||||||
TransformToNode(touchingNodePos, PED_HANDR);
|
TransformToNode(touchingNodePos, PED_HANDR);
|
||||||
break;
|
break;
|
||||||
|
@ -1532,10 +1537,7 @@ CPed::Fight(void)
|
||||||
tFightMoves[m_curFightMove].animId, 8.0f);
|
tFightMoves[m_curFightMove].animId, 8.0f);
|
||||||
|
|
||||||
if (weaponInfo->m_AnimToPlay != ASSOCGRP_KNIFE || m_curFightMove < FIGHTMOVE_MELEE1) {
|
if (weaponInfo->m_AnimToPlay != ASSOCGRP_KNIFE || m_curFightMove < FIGHTMOVE_MELEE1) {
|
||||||
if (m_curFightMove == FIGHTMOVE_BACKKICK)
|
animAssoc->speed = 0.8f;
|
||||||
animAssoc->speed = 1.15f;
|
|
||||||
else
|
|
||||||
animAssoc->speed = 0.8f;
|
|
||||||
} else {
|
} else {
|
||||||
switch (GetWeapon()->m_eWeaponType) {
|
switch (GetWeapon()->m_eWeaponType) {
|
||||||
case WEAPONTYPE_SCREWDRIVER:
|
case WEAPONTYPE_SCREWDRIVER:
|
||||||
|
@ -1676,8 +1678,9 @@ CPed::ChooseAttackAI(uint8 buttonPressure, bool fightWithWeapon)
|
||||||
return FIGHTMOVE_IDLE;
|
return FIGHTMOVE_IDLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (dist < 0.95f && canKneeHead)
|
// LCS: removed
|
||||||
return FIGHTMOVE_KNEE;
|
//if (dist < 0.95f && canKneeHead)
|
||||||
|
// return FIGHTMOVE_KNEE;
|
||||||
if (dist < 1.4f)
|
if (dist < 1.4f)
|
||||||
return FIGHTMOVE_PUNCH;
|
return FIGHTMOVE_PUNCH;
|
||||||
if (dist < 2.f && canKick) {
|
if (dist < 2.f && canKick) {
|
||||||
|
@ -1796,9 +1799,11 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon)
|
||||||
switch (dir) {
|
switch (dir) {
|
||||||
case 0: // forward
|
case 0: // forward
|
||||||
if (fightWithWeapon) {
|
if (fightWithWeapon) {
|
||||||
if (distToVictim < 0.95f - 0.2f && m_nPedState == PED_FIGHT) {
|
// LCS: removed
|
||||||
choosenMove = FIGHTMOVE_KNEE;
|
//if (distToVictim < 0.95f - 0.2f && m_nPedState == PED_FIGHT) {
|
||||||
} else {
|
// choosenMove = FIGHTMOVE_KNEE;
|
||||||
|
//} else
|
||||||
|
{
|
||||||
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CLEAVER) {
|
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_CLEAVER) {
|
||||||
if (distToVictim < 0.85f * weaponInfo->m_fRange)
|
if (distToVictim < 0.85f * weaponInfo->m_fRange)
|
||||||
choosenMove = FIGHTMOVE_MELEE1;
|
choosenMove = FIGHTMOVE_MELEE1;
|
||||||
|
@ -1821,18 +1826,20 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (distToVictim < 0.95f && m_nPedState == PED_FIGHT) {
|
// LCS: removed
|
||||||
choosenMove = FIGHTMOVE_KNEE;
|
//} else if (distToVictim < 0.95f && m_nPedState == PED_FIGHT) {
|
||||||
|
// choosenMove = FIGHTMOVE_KNEE;
|
||||||
|
|
||||||
} else if (distToVictim < 1.4f) {
|
} else if (distToVictim < 1.4f) {
|
||||||
if (m_curFightMove == FIGHTMOVE_PUNCHJAB) {
|
// LCS: removed
|
||||||
|
/*if (m_curFightMove == FIGHTMOVE_PUNCHJAB) {
|
||||||
choosenMove = FIGHTMOVE_PUNCH;
|
choosenMove = FIGHTMOVE_PUNCH;
|
||||||
|
|
||||||
} else if (m_curFightMove != FIGHTMOVE_PUNCH || randVal != 1) {
|
} else*/ if (m_curFightMove != FIGHTMOVE_PUNCH || randVal != 1) {
|
||||||
if (randVal == 2)
|
//if (randVal == 2)
|
||||||
choosenMove = FIGHTMOVE_PUNCH;
|
choosenMove = FIGHTMOVE_PUNCH;
|
||||||
else
|
//else
|
||||||
choosenMove = FIGHTMOVE_PUNCHJAB;
|
// choosenMove = FIGHTMOVE_PUNCHJAB;
|
||||||
} else {
|
} else {
|
||||||
choosenMove = FIGHTMOVE_LONGKICK;
|
choosenMove = FIGHTMOVE_LONGKICK;
|
||||||
}
|
}
|
||||||
|
@ -1840,6 +1847,7 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon)
|
||||||
choosenMove = FIGHTMOVE_LONGKICK;
|
choosenMove = FIGHTMOVE_LONGKICK;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
/* LCS: removed
|
||||||
case 1:
|
case 1:
|
||||||
choosenMove = FIGHTMOVE_FWDLEFT;
|
choosenMove = FIGHTMOVE_FWDLEFT;
|
||||||
break;
|
break;
|
||||||
|
@ -1852,6 +1860,7 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon)
|
||||||
case 4:
|
case 4:
|
||||||
choosenMove = FIGHTMOVE_BACKRIGHT;
|
choosenMove = FIGHTMOVE_BACKRIGHT;
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
default:
|
default:
|
||||||
choosenMove = FIGHTMOVE_FWDRIGHT;
|
choosenMove = FIGHTMOVE_FWDRIGHT;
|
||||||
break;
|
break;
|
||||||
|
@ -1917,20 +1926,22 @@ CPed::ChooseAttackPlayer(uint8 buttonPressure, bool fightWithWeapon)
|
||||||
#else
|
#else
|
||||||
switch (CGeneral::GetRandomNumberInRange(0,3)) {
|
switch (CGeneral::GetRandomNumberInRange(0,3)) {
|
||||||
#endif
|
#endif
|
||||||
case 0:
|
// LCS: hack hack
|
||||||
choosenMove = FIGHTMOVE_PUNCHJAB;
|
// case 0:
|
||||||
break;
|
// choosenMove = FIGHTMOVE_PUNCHJAB;
|
||||||
|
// break;
|
||||||
|
default:
|
||||||
case 1:
|
case 1:
|
||||||
choosenMove = FIGHTMOVE_PUNCH;
|
choosenMove = FIGHTMOVE_PUNCH;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
choosenMove = FIGHTMOVE_LONGKICK;
|
choosenMove = FIGHTMOVE_LONGKICK;
|
||||||
break;
|
break;
|
||||||
case 3:
|
// case 3:
|
||||||
choosenMove = FIGHTMOVE_KNEE;
|
// choosenMove = FIGHTMOVE_KNEE;
|
||||||
break;
|
// break;
|
||||||
default:
|
// default:
|
||||||
break;
|
// break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return choosenMove;
|
return choosenMove;
|
||||||
|
@ -1975,6 +1986,7 @@ CPed::EndFight(uint8 endType)
|
||||||
void
|
void
|
||||||
CPed::PlayHitSound(CPed *hitTo)
|
CPed::PlayHitSound(CPed *hitTo)
|
||||||
{
|
{
|
||||||
|
#if 0 // LCS: temporarily removed
|
||||||
// That was very complicated to reverse for me...
|
// That was very complicated to reverse for me...
|
||||||
// First index is our fight move ID (from 1 to 17, total 17), second is the one of we fight with (from 18 to 27, total 10).
|
// First index is our fight move ID (from 1 to 17, total 17), second is the one of we fight with (from 18 to 27, total 10).
|
||||||
enum {
|
enum {
|
||||||
|
@ -2045,6 +2057,7 @@ CPed::PlayHitSound(CPed *hitTo)
|
||||||
|
|
||||||
if (soundId != NO_SND)
|
if (soundId != NO_SND)
|
||||||
DMAudio.PlayOneShot(m_audioEntityId, soundId, (weapon << 8) | ENTITY_TYPE_PED);
|
DMAudio.PlayOneShot(m_audioEntityId, soundId, (weapon << 8) | ENTITY_TYPE_PED);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// --MIAMI: Done
|
// --MIAMI: Done
|
||||||
|
@ -2178,8 +2191,9 @@ CPed::FightHitPed(CPed *victim, CVector &touchPoint, CVector &dir, int16 piece)
|
||||||
|
|
||||||
bool brassKnucklePunch = false;
|
bool brassKnucklePunch = false;
|
||||||
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_BRASSKNUCKLE) {
|
if (GetWeapon()->m_eWeaponType == WEAPONTYPE_BRASSKNUCKLE) {
|
||||||
if (m_curFightMove == FIGHTMOVE_PUNCHHOOK || m_curFightMove == FIGHTMOVE_PUNCHJAB || m_curFightMove == FIGHTMOVE_BACKLEFT ||
|
// LCS: removed
|
||||||
m_curFightMove == FIGHTMOVE_STDPUNCH || m_curFightMove == FIGHTMOVE_PUNCH) {
|
if (/*m_curFightMove == FIGHTMOVE_PUNCHHOOK || m_curFightMove == FIGHTMOVE_PUNCHJAB || m_curFightMove == FIGHTMOVE_BACKLEFT ||
|
||||||
|
m_curFightMove == FIGHTMOVE_STDPUNCH ||*/ m_curFightMove == FIGHTMOVE_PUNCH) {
|
||||||
brassKnucklePunch = true;
|
brassKnucklePunch = true;
|
||||||
damageMult *= 1.5f;
|
damageMult *= 1.5f;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1172,7 +1172,8 @@ void
|
||||||
CPlayerPed::ProcessAnimGroups(void)
|
CPlayerPed::ProcessAnimGroups(void)
|
||||||
{
|
{
|
||||||
AssocGroupId groupToSet;
|
AssocGroupId groupToSet;
|
||||||
#ifdef PC_PLAYER_CONTROLS
|
//#ifdef PC_PLAYER_CONTROLS
|
||||||
|
#if 0 // chainsaw anims missing in LCS
|
||||||
if ((m_fWalkAngle <= -DEGTORAD(50.0f) || m_fWalkAngle >= DEGTORAD(50.0f))
|
if ((m_fWalkAngle <= -DEGTORAD(50.0f) || m_fWalkAngle >= DEGTORAD(50.0f))
|
||||||
&& TheCamera.Cams[TheCamera.ActiveCam].Using3rdPersonMouseCam()
|
&& TheCamera.Cams[TheCamera.ActiveCam].Using3rdPersonMouseCam()
|
||||||
&& CanStrafeOrMouseControl()) {
|
&& CanStrafeOrMouseControl()) {
|
||||||
|
|
Loading…
Reference in a new issue