Wanted changes in PlayerPed/PedModelInfo

And some typos
This commit is contained in:
eray orçunus 2019-07-18 05:41:57 +03:00
parent 993944c05c
commit d0fd14cb1a
4 changed files with 26 additions and 28 deletions

View File

@ -113,9 +113,9 @@ struct ColNodeInfo
#define NUMPEDINFONODES 8 #define NUMPEDINFONODES 8
ColNodeInfo m_pColNodeInfos[NUMPEDINFONODES] = { ColNodeInfo m_pColNodeInfos[NUMPEDINFONODES] = {
{ nil, PED_HEAD, PEDPIECE_HEAD, 0.0f, 0.05f, 0.2f }, { nil, PED_HEAD, PEDPIECE_HEAD, 0.0f, 0.05f, 0.2f },
{ "Storso", PED_TORSO, PEDPIECE_NONE, 0.0f, 0.15f, 0.2f }, { "Storso", 0, PEDPIECE_TORSO, 0.0f, 0.15f, 0.2f },
{ "Storso", PED_TORSO, PEDPIECE_NONE, 0.0f, -0.05f, 0.3f }, { "Storso", 0, PEDPIECE_TORSO, 0.0f, -0.05f, 0.3f },
{ nil, PED_MID, PEDPIECE_BODY, 0.0f, -0.07f, 0.3f }, { nil, PED_MID, PEDPIECE_MID, 0.0f, -0.07f, 0.3f },
{ nil, PED_UPPERARML, PEDPIECE_LEFTARM, 0.07f, -0.1f, 0.2f }, { nil, PED_UPPERARML, PEDPIECE_LEFTARM, 0.07f, -0.1f, 0.2f },
{ nil, PED_UPPERARMR, PEDPIECE_RIGHTARM, -0.07f, -0.1f, 0.2f }, { nil, PED_UPPERARMR, PEDPIECE_RIGHTARM, -0.07f, -0.1f, 0.2f },
{ "Slowerlegl", 0, PEDPIECE_LEFTLEG, 0.0f, 0.07f, 0.25f }, { "Slowerlegl", 0, PEDPIECE_LEFTLEG, 0.0f, 0.07f, 0.25f },

View File

@ -3419,11 +3419,11 @@ CPed::InflictDamage(CEntity* damagedBy, eWeaponType method, float damage, ePedPi
willLinger = false; willLinger = false;
} else { } else {
switch (pedPiece) { switch (pedPiece) {
case PEDPIECE_NONE: case PEDPIECE_TORSO:
willLinger = false; willLinger = false;
dieAnim = ANIM_KO_SHOT_FRONT1; dieAnim = ANIM_KO_SHOT_FRONT1;
break; break;
case PEDPIECE_BODY: case PEDPIECE_MID:
willLinger = false; willLinger = false;
dieAnim = ANIM_KO_SHOT_STOM; dieAnim = ANIM_KO_SHOT_STOM;
break; break;
@ -3518,9 +3518,9 @@ CPed::InflictDamage(CEntity* damagedBy, eWeaponType method, float damage, ePedPi
switch (random) { switch (random) {
case 0: case 0:
if ((pedPiece != PEDPIECE_LEFTARM || random <= 1) if ((pedPiece != PEDPIECE_LEFTARM || random <= 1)
&& (pedPiece != PEDPIECE_BODY || random != 1)) { && (pedPiece != PEDPIECE_MID || random != 1)) {
if (pedPiece == PEDPIECE_RIGHTARM && random > 1 if (pedPiece == PEDPIECE_RIGHTARM && random > 1
|| pedPiece == PEDPIECE_BODY && random == 2) || pedPiece == PEDPIECE_MID && random == 2)
dieAnim = ANIM_KO_SPIN_L; dieAnim = ANIM_KO_SPIN_L;
else else
@ -3537,9 +3537,9 @@ CPed::InflictDamage(CEntity* damagedBy, eWeaponType method, float damage, ePedPi
break; break;
case 2: case 2:
if ((pedPiece != PEDPIECE_LEFTARM || random <= 1) if ((pedPiece != PEDPIECE_LEFTARM || random <= 1)
&& (pedPiece != PEDPIECE_BODY || random != 1)) { && (pedPiece != PEDPIECE_MID || random != 1)) {
if ((pedPiece != PEDPIECE_RIGHTARM || random <= 1) if ((pedPiece != PEDPIECE_RIGHTARM || random <= 1)
&& (pedPiece != PEDPIECE_BODY || random != 2)) { && (pedPiece != PEDPIECE_MID || random != 2)) {
dieAnim = ANIM_KO_SKID_BACK; dieAnim = ANIM_KO_SKID_BACK;
} else { } else {
dieAnim = ANIM_KD_RIGHT; dieAnim = ANIM_KD_RIGHT;
@ -3697,12 +3697,12 @@ CPed::SetGetUp(void)
m_ped_flagE20 = false; m_ped_flagE20 = false;
if (IsPlayer()) if (IsPlayer())
InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, CTimer::GetTimeStep(), PEDPIECE_NONE, 0); InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, CTimer::GetTimeStep(), PEDPIECE_TORSO, 0);
else { else {
if (!CPad::GetPad(0)->ArePlayerControlsDisabled()) if (!CPad::GetPad(0)->ArePlayerControlsDisabled())
return; return;
InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, 1000.0f, PEDPIECE_NONE, 0); InflictDamage(nil, WEAPONTYPE_RUNOVERBYCAR, 1000.0f, PEDPIECE_TORSO, 0);
} }
return; return;
} }

View File

@ -15,8 +15,8 @@ struct CPathNode;
enum ePedPieceTypes enum ePedPieceTypes
{ {
PEDPIECE_NONE, PEDPIECE_TORSO,
PEDPIECE_BODY, PEDPIECE_MID,
PEDPIECE_LEFTARM, PEDPIECE_LEFTARM,
PEDPIECE_RIGHTARM, PEDPIECE_RIGHTARM,
PEDPIECE_LEFTLEG, PEDPIECE_LEFTLEG,
@ -260,7 +260,7 @@ public:
uint8 m_ped_flagH80 : 1; uint8 m_ped_flagH80 : 1;
uint8 m_ped_flagI1 : 1; uint8 m_ped_flagI1 : 1;
uint8 m_ped_flagI2 : 1; // limbs won't be removed if set uint8 m_ped_flagI2 : 1; // if set, limbs won't came off
uint8 m_ped_flagI4 : 1; uint8 m_ped_flagI4 : 1;
uint8 bHasAlreadyBeenRecorded : 1; uint8 bHasAlreadyBeenRecorded : 1;
uint8 m_ped_flagI10 : 1; uint8 m_ped_flagI10 : 1;

View File

@ -38,25 +38,23 @@ CPlayerPed::SetWantedLevelNoDrop(int32 level)
m_pWanted->SetWantedLevelNoDrop(level); m_pWanted->SetWantedLevelNoDrop(level);
} }
// I don't know actual purpose of parameter // I don't know the actual purpose of parameter
void void
CPlayerPed::AnnoyPlayerPed(bool itsPolice) CPlayerPed::AnnoyPlayerPed(bool itsPolice)
{ {
int8 *temper = &m_pedStats->m_temper; if (m_pedStats->m_temper < 52) {
if (*temper >= 52) { m_pedStats->m_temper++;
} else {
if (itsPolice) { if (itsPolice) {
if (*temper < 55) { if (m_pedStats->m_temper < 55) {
(*temper)++; m_pedStats->m_temper++;
} else { } else {
(*temper) = 46; m_pedStats->m_temper = 46;
} }
} }
} else {
(*temper)++;
} }
} }
class CPlayerPed_ : public CPlayerPed class CPlayerPed_ : public CPlayerPed
{ {
public: public: