Merge pull request #214 from erorcun/erorcun

Moar peds
This commit is contained in:
erorcun 2019-10-01 20:15:16 +03:00 committed by GitHub
commit e363a7983e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 755 additions and 95 deletions

View File

@ -101,25 +101,25 @@ enum eSound : int16
SOUND_EVIDENCE_PICKUP = 94,
SOUND_UNLOAD_GOLD = 95,
SOUND_PAGER = 96,
SOUND_PED_DEATH = 97,
SOUND_PED_DAMAGE = 98,
SOUND_PED_HIT = 99,
SOUND_PED_LAND = 100,
SOUND_PED_DEATH = 97, // 103 in VC
SOUND_PED_DAMAGE = 98, // 104 in VC
SOUND_PED_HIT = 99, // 105 in VC
SOUND_PED_LAND = 100, // hopefully 106 in VC
SOUND_PED_BULLET_HIT = 101,
SOUND_PED_BOMBER = 102,
SOUND_PED_BURNING = 103,
SOUND_PED_BURNING = 103, // 108 in VC
SOUND_PED_ARREST_FBI = 104,
SOUND_PED_ARREST_SWAT = 105,
SOUND_PED_ARREST_COP = 106,
SOUND_PED_HELI_PLAYER_FOUND = 107,
SOUND_PED_HANDS_UP = 108,
SOUND_PED_HANDS_COWER = 109,
SOUND_PED_FLEE_SPRINT = 110,
SOUND_PED_FLEE_SPRINT = 110, // 120 in VC
SOUND_PED_CAR_JACKING = 111,
SOUND_PED_MUGGING = 112,
SOUND_PED_CAR_JACKED = 113,
SOUND_PED_ROBBED = 114,
SOUND_PED_TAXI_WAIT = 115,
SOUND_PED_TAXI_WAIT = 115, // 137 in VC
SOUND_PED_ATTACK = 116,
SOUND_PED_DEFEND = 117,
SOUND_PED_PURSUIT_ARMY = 118,
@ -129,9 +129,9 @@ enum eSound : int16
SOUND_PED_HEALING = 122,
SOUND_PED_7B = 123,
SOUND_PED_LEAVE_VEHICLE = 124,
SOUND_PED_EVADE = 125,
SOUND_PED_EVADE = 125, // 142 in VC
SOUND_PED_FLEE_RUN = 126,
SOUND_PED_CAR_COLLISION = 127,
SOUND_PED_CAR_COLLISION = 127, // 144-145-146 in VC
SOUND_PED_SOLICIT = 128,
SOUND_PED_EXTINGUISHING_FIRE = 129,
SOUND_PED_WAIT_DOUBLEBACK = 130,

View File

@ -213,6 +213,7 @@ public:
void SetRotate(float xAngle, float yAngle, float zAngle);
void Rotate(float x, float y, float z);
void RotateX(float x);
void RotateZ(float z);
void Reorthogonalise(void);
void CopyOnlyMatrix(CMatrix *other){

View File

@ -46,6 +46,12 @@ CMatrix::RotateX(float x)
Rotate(x, 0.0f, 0.0f);
}
void
CMatrix::RotateZ(float z)
{
Rotate(0.0f, 0.0f, z);
}
void
CMatrix::Reorthogonalise(void)
{

File diff suppressed because it is too large Load Diff

View File

@ -266,7 +266,7 @@ public:
// cf. https://github.com/DK22Pac/plugin-sdk/blob/master/plugin_sa/game_sa/CPed.h from R*
uint8 bIsStanding : 1;
uint8 m_ped_flagA2 : 1;
uint8 m_ped_flagA2 : 1; // bWasStanding?
uint8 bIsAttacking : 1; // doesn't reset after fist fight
uint8 bIsPointingGunAt : 1;
uint8 bIsLooking : 1;
@ -281,9 +281,9 @@ public:
uint8 bIsLanding : 1;
uint8 bIsRunning : 1; // on some conditions
uint8 bHitSomethingLastFrame : 1;
uint8 m_ped_flagB80 : 1; // bIsNearCar? something related with reaction to colliding vehicle
uint8 m_ped_flagB80 : 1; // bIsNearCar? it's sure that it's related with cars and used for deciding whether we should move
uint8 m_ped_flagC1 : 1;
uint8 m_ped_flagC1 : 1; // bCanPedEnterSeekedCar?
uint8 bRespondsToThreats : 1;
uint8 bRenderPedInCar : 1;
uint8 bChangedSeat : 1;
@ -294,15 +294,15 @@ public:
uint8 bHasACamera : 1; // does ped possess a camera to document accidents involves fire/explosion
uint8 m_ped_flagD2 : 1; // set when ped witnessed an event
uint8 m_ped_flagD4 : 1; // bPedIsBleeding? so far only creates blood pool in hands up state
uint8 m_ped_flagD8 : 1;
uint8 bPedIsBleeding : 1;
uint8 bStopAndShoot : 1; // Ped cannot reach target to attack with fist, need to use gun
uint8 bIsPedDieAnimPlaying : 1;
uint8 bUsePedNodeSeek : 1;
uint8 m_ped_flagD40 : 1; // reset when objective changes
uint8 bObjectiveCompleted : 1;
uint8 bScriptObjectiveCompleted : 1;
uint8 bKindaStayInSamePlace : 1;
uint8 m_ped_flagE2 : 1;
uint8 m_ped_flagE2 : 1; // bBeingChasedByPolice?
uint8 bNotAllowedToDuck : 1;
uint8 bCrouchWhenShooting : 1;
uint8 bIsDucking : 1;
@ -316,7 +316,7 @@ public:
uint8 m_ped_flagF8 : 1;
uint8 bWillBeQuickJacked : 1;
uint8 bCancelEnteringCar : 1; // after door is opened or couldn't be opened due to it's locked
uint8 m_ped_flagF40 : 1;
uint8 bObstacleShowedUpDuringKillObjective : 1;
uint8 bDuckAndCover : 1;
uint8 m_ped_flagG1 : 1;
@ -328,7 +328,7 @@ public:
uint8 bGonnaKillTheCarJacker : 1; // only set when car is jacked from right door
uint8 bFadeOut : 1;
uint8 bKnockedUpIntoAir : 1; // has ped been knocked up into the air by a car collision
uint8 bKnockedUpIntoAir : 1; // NOT CERTAIN - has ped been knocked up into the air by a car collision
uint8 m_ped_flagH2 : 1;
uint8 m_ped_flagH4 : 1;
uint8 bClearObjective : 1;
@ -339,7 +339,7 @@ public:
uint8 bShakeFist : 1; // test shake hand at look entity
uint8 bNoCriticalHits : 1; // if set, limbs won't came off
uint8 m_ped_flagI4 : 1;
uint8 m_ped_flagI4 : 1; // seems like related with cars
uint8 bHasAlreadyBeenRecorded : 1;
uint8 bFallenDown : 1;
uint8 m_ped_flagI20 : 1;
@ -402,7 +402,7 @@ public:
float m_fRotationDest;
float m_headingRate;
uint16 m_vehEnterType; // TODO: this is more like a door, not a type
uint16 m_walkAroundType;
int16 m_walkAroundType;
CEntity *m_pCurrentPhysSurface;
CVector m_vecOffsetFromPhysSurface;
CEntity *m_pCurSurface;
@ -530,7 +530,6 @@ public:
void CalculateNewOrientation(void);
float WorkOutHeadingForMovingFirstPerson(float);
void CalculateNewVelocity(void);
bool CanPedJumpThis(CEntity*);
bool CanSeeEntity(CEntity*, float);
void RestorePreviousObjective(void);
void SetIdle(void);
@ -732,6 +731,11 @@ public:
void SetSeekCar(CVehicle*, uint32);
void SetSeekBoatPosition(CVehicle*);
void SetExitTrain(CVehicle*);
#ifdef VC_PED_PORTS
bool CanPedJumpThis(CEntity*, CVector*);
#else
bool CanPedJumpThis(CEntity*);
#endif
bool HasWeapon(uint8 weaponType) { return m_weapons[weaponType].m_eWeaponType == weaponType; }
CWeapon &GetWeapon(uint8 weaponType) { return m_weapons[weaponType]; }

View File

@ -51,7 +51,7 @@ CPlayerPed::CPlayerPed(void) : CPed(PEDTYPE_PLAYER1)
field_1413 = 0;
for (int i = 0; i < 6; i++) {
m_vecSafePos[i] = CVector(0.0f, 0.0f, 0.0f);
field_1488[i] = 0;
m_pPedAtSafePos[i] = nil;
}
}

View File

@ -35,7 +35,7 @@ public:
int8 field_1414;
int8 field_1415;
CVector m_vecSafePos[6]; // safe places from the player, for example behind a tree
int32 field_1488[6]; // m_pPedAtSafePos?
CPed *m_pPedAtSafePos[6];
float m_fWalkAngle;
float m_fFPSMoveHeading;