mirror of
https://github.com/halpz/re3.git
synced 2025-07-03 23:00:46 +00:00
Peds & fixes continues
This commit is contained in:
723
src/peds/Ped.cpp
723
src/peds/Ped.cpp
File diff suppressed because it is too large
Load Diff
@ -594,6 +594,7 @@ public:
|
||||
CEntity *m_pPointGunAt;
|
||||
CVector m_vecHitLastPos;
|
||||
uint32 m_lastFightMove;
|
||||
uint32 m_lastHitState; // TODO(Miami): What's this?
|
||||
uint8 m_fightButtonPressure;
|
||||
FightState m_fightState;
|
||||
bool m_takeAStepAfterAttack;
|
||||
@ -756,7 +757,8 @@ public:
|
||||
void SetAttack(CEntity*);
|
||||
void StartFightAttack(uint8);
|
||||
void SetWaitState(eWaitState, void*);
|
||||
bool FightStrike(CVector&);
|
||||
bool FightStrike(CVector&, bool);
|
||||
void FightHitPed(CPed*, CVector&, CVector&, int16);
|
||||
int GetLocalDirection(const CVector2D &);
|
||||
void StartFightDefend(uint8, uint8, uint8);
|
||||
void PlayHitSound(CPed*);
|
||||
@ -1020,6 +1022,13 @@ public:
|
||||
else
|
||||
return (AnimationId)0;
|
||||
}
|
||||
|
||||
static AnimationId GetFightIdleWithMeleeAnim(CWeaponInfo* weapon) {
|
||||
if (!!weapon->m_bFightMode)
|
||||
return ANIM_MELEE_IDLE_FIGHTMODE;
|
||||
else
|
||||
return (AnimationId)0;
|
||||
}
|
||||
// --
|
||||
|
||||
// My additions, because there were many, many instances of that.
|
||||
|
@ -81,7 +81,7 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
|
||||
for (int i = 0; i < 6; i++) {
|
||||
m_vecSafePos[i] = CVector(0.0f, 0.0f, 0.0f);
|
||||
m_pPedAtSafePos[i] = nil;
|
||||
m_pCheckPlayers[i] = nil;
|
||||
m_pMeleeList[i] = nil;
|
||||
}
|
||||
m_nCheckPlayersIndex = 0;
|
||||
m_nPadUpPressedInMilliseconds = 0;
|
||||
@ -1711,6 +1711,18 @@ CPlayerPed::PlayIdleAnimations(CPad *padUsed)
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CPlayerPed::RemovePedFromMeleeList(CPed *ped)
|
||||
{
|
||||
int i = 0;
|
||||
for (; m_pMeleeList[i] != ped; i++) {
|
||||
if (i >= ARRAY_SIZE(m_pMeleeList))
|
||||
return;
|
||||
}
|
||||
m_pMeleeList[i] = nil;
|
||||
ped->m_attackTimer = 0;
|
||||
}
|
||||
|
||||
#ifdef COMPATIBLE_SAVES
|
||||
#define CopyFromBuf(buf, data) memcpy(&data, buf, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
|
||||
#define CopyToBuf(buf, data) memcpy(buf, &data, sizeof(data)); SkipSaveBuf(buf, sizeof(data));
|
||||
|
@ -34,7 +34,7 @@ public:
|
||||
bool m_bDrunkVisualsWearOff; // TODO(Miami): That may be something else
|
||||
CVector m_vecSafePos[6]; // safe places from the player, for example behind a tree
|
||||
CPed *m_pPedAtSafePos[6];
|
||||
CPlayerPed* m_pCheckPlayers[6]; //checks something with players, could be a leftover from original multiplayer
|
||||
CPlayerPed* m_pMeleeList[6];
|
||||
char unused1;
|
||||
int16 m_nCheckPlayersIndex;
|
||||
float m_fWalkAngle; //angle between heading and walking direction
|
||||
@ -84,6 +84,7 @@ public:
|
||||
void PlayerControlZelda(CPad*);
|
||||
bool DoesPlayerWantNewWeapon(eWeaponType, bool);
|
||||
void PlayIdleAnimations(CPad*);
|
||||
void RemovePedFromMeleeList(CPed*);
|
||||
|
||||
static void SetupPlayerPed(int32);
|
||||
static void DeactivatePlayerPed(int32);
|
||||
|
Reference in New Issue
Block a user