mirror of
https://github.com/halpz/re3.git
synced 2025-07-03 23:00:46 +00:00
Reorganize CPed functions into their original cpp files
This commit is contained in:
@ -420,6 +420,32 @@ CCivilianPed::ProcessControl(void)
|
||||
Avoid();
|
||||
}
|
||||
|
||||
// --MIAMI: Done
|
||||
bool
|
||||
CPed::RunToReportCrime(eCrimeType crimeToReport)
|
||||
{
|
||||
// They changed true into false to make this function unusable. So running to phone actually starts but first frame after that cancels it.
|
||||
if (m_nPedState == PED_SEEK_POS)
|
||||
return false;
|
||||
|
||||
CVector pos = GetPosition();
|
||||
int phoneId = gPhoneInfo.FindNearestFreePhone(&pos);
|
||||
|
||||
if (phoneId == -1)
|
||||
return false;
|
||||
|
||||
CPhone* phone = &gPhoneInfo.m_aPhones[phoneId];
|
||||
if (phone->m_nState != PHONE_STATE_FREE)
|
||||
return false;
|
||||
|
||||
bRunningToPhone = true;
|
||||
SetSeek(phone->m_vecPos, 0.3f);
|
||||
SetMoveState(PEDMOVE_RUN);
|
||||
m_phoneId = phoneId;
|
||||
m_crimeToReportOnPhone = crimeToReport;
|
||||
return true;
|
||||
}
|
||||
|
||||
const int32 gFrequencyOfAttractorAttempt = 11;
|
||||
const float gDistanceToSeekAttractors = 50.0f;
|
||||
const float gMaxDistanceToAttract = 10.0f;
|
||||
|
23413
src/peds/Ped.cpp
23413
src/peds/Ped.cpp
File diff suppressed because it is too large
Load Diff
@ -5,7 +5,7 @@
|
||||
#include "Crime.h"
|
||||
#include "EventList.h"
|
||||
#include "PedIK.h"
|
||||
#include "PedStats.h"
|
||||
#include "PedType.h"
|
||||
#include "Physical.h"
|
||||
#include "Weapon.h"
|
||||
#include "WeaponInfo.h"
|
||||
@ -15,6 +15,7 @@
|
||||
#define FEET_OFFSET 1.04f
|
||||
#define CHECK_NEARBY_THINGS_MAX_DIST 15.0f
|
||||
#define ENTER_CAR_MAX_DIST 30.0f
|
||||
#define CAN_SEE_ENTITY_ANGLE_THRESHOLD DEGTORAD(60.0f)
|
||||
|
||||
class CAccident;
|
||||
class CObject;
|
||||
@ -652,6 +653,7 @@ public:
|
||||
CPed(uint32 pedType);
|
||||
~CPed(void);
|
||||
|
||||
void DeleteRwObject();
|
||||
void SetModelIndex(uint32 mi);
|
||||
void ProcessControl(void);
|
||||
void Teleport(CVector);
|
||||
@ -701,7 +703,7 @@ public:
|
||||
void CalculateNewOrientation(void);
|
||||
float WorkOutHeadingForMovingFirstPerson(float);
|
||||
void CalculateNewVelocity(void);
|
||||
bool CanSeeEntity(CEntity*, float);
|
||||
bool CanSeeEntity(CEntity*, float threshold = CAN_SEE_ENTITY_ANGLE_THRESHOLD);
|
||||
void RestorePreviousObjective(void);
|
||||
void SetIdle(void);
|
||||
#ifdef _MSC_VER
|
||||
@ -771,6 +773,7 @@ public:
|
||||
void SetFall(int, AnimationId, uint8);
|
||||
void SetFlee(CEntity*, int);
|
||||
void SetFlee(CVector2D const &, int);
|
||||
void RemoveDrivebyAnims(void);
|
||||
void RemoveInCarAnims(void);
|
||||
void CollideWithPed(CPed*);
|
||||
void SetDirectionToWalkAroundObject(CEntity*);
|
||||
@ -907,7 +910,7 @@ public:
|
||||
static void PedAnimShuffleCB(CAnimBlendAssociation *assoc, void *arg);
|
||||
static void PedSetGetInCarPositionCB(CAnimBlendAssociation* assoc, void* arg);
|
||||
|
||||
bool IsPlayer(void);
|
||||
bool IsPlayer(void) const;
|
||||
bool IsFemale(void) { return m_nPedType == PEDTYPE_CIVFEMALE || m_nPedType == PEDTYPE_PROSTITUTE; }
|
||||
bool UseGroundColModel(void);
|
||||
bool CanSetPedState(void);
|
||||
@ -927,7 +930,7 @@ public:
|
||||
void SetStoredObjective(void);
|
||||
void SetLeader(CEntity* leader);
|
||||
void SetPedStats(ePedStats);
|
||||
bool IsGangMember(void);
|
||||
bool IsGangMember(void) const;
|
||||
void Die(void);
|
||||
#ifdef GTA_TRAIN
|
||||
void EnterTrain(void);
|
||||
@ -953,7 +956,7 @@ public:
|
||||
void UpdatePosition(void);
|
||||
CObject *SpawnFlyingComponent(int, int8);
|
||||
void SetCarJack_AllClear(CVehicle*, uint32, uint32);
|
||||
bool CanPedJumpThis(CEntity*, CVector*);
|
||||
bool CanPedJumpThis(CEntity *unused, CVector *damageNormal = nil);
|
||||
void SetNewAttraction(CPedAttractor* pAttractor, const CVector& pos, float, float, int);
|
||||
void ClearWaitState(void);
|
||||
void Undress(const char*);
|
||||
@ -983,7 +986,7 @@ public:
|
||||
bool Driving(void) { return m_nPedState == PED_DRIVING; }
|
||||
bool InVehicle(void) { return bInVehicle && m_pMyVehicle; } // True when ped is sitting/standing in vehicle, not in enter/exit state.
|
||||
bool EnteringCar(void) { return m_nPedState == PED_ENTER_CAR || m_nPedState == PED_CARJACK; }
|
||||
bool HasAttractor(void) { return m_attractor != nil; }
|
||||
bool HasAttractor(void);
|
||||
bool IsUseAttractorObjective(eObjective obj) {
|
||||
return obj == OBJECTIVE_GOTO_ATM_ON_FOOT || obj == OBJECTIVE_GOTO_ICE_CREAM_VAN_ON_FOOT ||
|
||||
obj == OBJECTIVE_GOTO_PIZZA_ON_FOOT || obj == OBJECTIVE_GOTO_SEAT_ON_FOOT ||
|
||||
@ -992,7 +995,10 @@ public:
|
||||
|
||||
void ReplaceWeaponWhenExitingVehicle(void);
|
||||
void RemoveWeaponWhenEnteringVehicle(void);
|
||||
bool IsNotInWreckedVehicle();
|
||||
bool IsNotInWreckedVehicle()
|
||||
{
|
||||
return m_pMyVehicle != nil && ((CEntity*)m_pMyVehicle)->GetStatus() != STATUS_WRECKED;
|
||||
}
|
||||
|
||||
// My names. Inlined in VC
|
||||
AnimationId GetFireAnimNotDucking(CWeaponInfo* weapon) {
|
||||
|
6954
src/peds/PedAI.cpp
Normal file
6954
src/peds/PedAI.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -152,13 +152,4 @@ CPed::Say(uint16 audio)
|
||||
m_queuedSound = audio;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
CPed::Say(uint16 audio, int32 time)
|
||||
{
|
||||
if (m_delayedSoundID == -1) {
|
||||
m_delayedSoundID = audio;
|
||||
m_delayedSoundTimer = CTimer::GetTimeInMilliseconds() + time;
|
||||
}
|
||||
}
|
4235
src/peds/PedFight.cpp
Normal file
4235
src/peds/PedFight.cpp
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,120 +0,0 @@
|
||||
#include "common.h"
|
||||
|
||||
#include "General.h"
|
||||
#include "FileMgr.h"
|
||||
#include "PedStats.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CPedStats *CPedStats::ms_apPedStats[NUM_PEDSTATS];
|
||||
|
||||
void
|
||||
CPedStats::Initialise(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
debug("Initialising CPedStats...\n");
|
||||
for(i = 0; i < NUM_PEDSTATS; i++){
|
||||
ms_apPedStats[i] = new CPedStats;
|
||||
ms_apPedStats[i]->m_type = PEDSTAT_PLAYER;
|
||||
ms_apPedStats[i]->m_name[8] = 'R'; // WHAT?
|
||||
ms_apPedStats[i]->m_fleeDistance = 20.0f;
|
||||
ms_apPedStats[i]->m_headingChangeRate = 15.0f;
|
||||
ms_apPedStats[i]->m_fear = 50;
|
||||
ms_apPedStats[i]->m_temper = 50;
|
||||
ms_apPedStats[i]->m_lawfulness = 50;
|
||||
ms_apPedStats[i]->m_sexiness = 50;
|
||||
ms_apPedStats[i]->m_attackStrength = 1.0f;
|
||||
ms_apPedStats[i]->m_defendWeakness = 1.0f;
|
||||
ms_apPedStats[i]->m_flags = 0;
|
||||
}
|
||||
debug("Loading pedstats data...\n");
|
||||
CPedStats::LoadPedStats();
|
||||
debug("CPedStats ready\n");
|
||||
}
|
||||
|
||||
void
|
||||
CPedStats::Shutdown(void)
|
||||
{
|
||||
int i;
|
||||
debug("Shutting down CPedStats...\n");
|
||||
for(i = 0; i < NUM_PEDSTATS; i++)
|
||||
delete ms_apPedStats[i];
|
||||
debug("CPedStats shut down\n");
|
||||
}
|
||||
|
||||
void
|
||||
CPedStats::LoadPedStats(void)
|
||||
{
|
||||
char *buf;
|
||||
char line[256];
|
||||
char name[32];
|
||||
size_t bp, buflen;
|
||||
int lp, linelen;
|
||||
int type;
|
||||
float fleeDist, headingChangeRate, attackStrength, defendWeakness;
|
||||
int fear, temper, lawfullness, sexiness, flags;
|
||||
|
||||
|
||||
type = 0;
|
||||
buf = new char[16 * 1024];
|
||||
|
||||
CFileMgr::SetDir("DATA");
|
||||
buflen = CFileMgr::LoadFile("PEDSTATS.DAT", (uint8*)buf, 16 * 1024, "r");
|
||||
CFileMgr::SetDir("");
|
||||
|
||||
for(bp = 0; bp < buflen; ){
|
||||
// read file line by line
|
||||
for(linelen = 0; buf[bp] != '\n' && bp < buflen; bp++){
|
||||
if(buf[bp] == '\r' || buf[bp] == ',' || buf[bp] == '\t')
|
||||
line[linelen++] = ' ';
|
||||
else
|
||||
line[linelen++] = buf[bp];
|
||||
}
|
||||
bp++;
|
||||
line[linelen] = '\0';
|
||||
|
||||
// skip white space
|
||||
for(lp = 0; line[lp] <= ' '; lp++);
|
||||
|
||||
if(lp >= linelen || // FIX: game uses == here, but this is safer if we have empty lines
|
||||
line[lp] == '#')
|
||||
continue;
|
||||
|
||||
sscanf(&line[lp], "%s %f %f %d %d %d %d %f %f %d",
|
||||
name,
|
||||
&fleeDist,
|
||||
&headingChangeRate,
|
||||
&fear,
|
||||
&temper,
|
||||
&lawfullness,
|
||||
&sexiness,
|
||||
&attackStrength,
|
||||
&defendWeakness,
|
||||
&flags);
|
||||
ms_apPedStats[type]->m_type = (ePedStats)type;
|
||||
strncpy(ms_apPedStats[type]->m_name, name, 24); // FIX: game uses strcpy
|
||||
ms_apPedStats[type]->m_fleeDistance = fleeDist;
|
||||
ms_apPedStats[type]->m_headingChangeRate = headingChangeRate;
|
||||
ms_apPedStats[type]->m_fear = fear;
|
||||
ms_apPedStats[type]->m_temper = temper;
|
||||
ms_apPedStats[type]->m_lawfulness = lawfullness;
|
||||
ms_apPedStats[type]->m_sexiness = sexiness;
|
||||
ms_apPedStats[type]->m_attackStrength = attackStrength;
|
||||
ms_apPedStats[type]->m_defendWeakness = defendWeakness;
|
||||
ms_apPedStats[type]->m_flags = flags;
|
||||
type++;
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
}
|
||||
|
||||
ePedStats
|
||||
CPedStats::GetPedStatType(char *name)
|
||||
{
|
||||
for(uint16 type = 0; type < NUM_PEDSTATS; type++)
|
||||
if(!CGeneral::faststrcmp(ms_apPedStats[type]->m_name, name))
|
||||
return (ePedStats) type;
|
||||
|
||||
return NUM_PEDSTATS;
|
||||
}
|
@ -1,85 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
enum ePedStats
|
||||
{
|
||||
PEDSTAT_PLAYER,
|
||||
PEDSTAT_COP,
|
||||
PEDSTAT_MEDIC,
|
||||
PEDSTAT_FIREMAN,
|
||||
PEDSTAT_GANG1,
|
||||
PEDSTAT_GANG2,
|
||||
PEDSTAT_GANG3,
|
||||
PEDSTAT_GANG4,
|
||||
PEDSTAT_GANG5,
|
||||
PEDSTAT_GANG6,
|
||||
PEDSTAT_GANG7,
|
||||
PEDSTAT_STREET_GUY,
|
||||
PEDSTAT_SUIT_GUY,
|
||||
PEDSTAT_SENSIBLE_GUY,
|
||||
PEDSTAT_GEEK_GUY,
|
||||
PEDSTAT_OLD_GUY,
|
||||
PEDSTAT_TOUGH_GUY,
|
||||
PEDSTAT_STREET_GIRL,
|
||||
PEDSTAT_SUIT_GIRL,
|
||||
PEDSTAT_SENSIBLE_GIRL,
|
||||
PEDSTAT_GEEK_GIRL,
|
||||
PEDSTAT_OLD_GIRL,
|
||||
PEDSTAT_TOUGH_GIRL,
|
||||
PEDSTAT_TRAMP_MALE,
|
||||
PEDSTAT_TRAMP_FEMALE,
|
||||
PEDSTAT_TOURIST,
|
||||
PEDSTAT_PROSTITUTE,
|
||||
PEDSTAT_CRIMINAL,
|
||||
PEDSTAT_BUSKER,
|
||||
PEDSTAT_TAXIDRIVER,
|
||||
PEDSTAT_PSYCHO,
|
||||
PEDSTAT_STEWARD,
|
||||
PEDSTAT_SPORTSFAN,
|
||||
PEDSTAT_SHOPPER,
|
||||
PEDSTAT_OLDSHOPPER,
|
||||
PEDSTAT_BEACH_GUY,
|
||||
PEDSTAT_BEACH_GIRL,
|
||||
PEDSTAT_SKATER,
|
||||
PEDSTAT_STD_MISSION,
|
||||
PEDSTAT_COWARD,
|
||||
|
||||
NUM_PEDSTATS
|
||||
};
|
||||
|
||||
// flags
|
||||
enum
|
||||
{
|
||||
STAT_PUNCH_ONLY = 1,
|
||||
STAT_CAN_KNEE_HEAD = 2,
|
||||
STAT_CAN_KICK = 4,
|
||||
STAT_CAN_ROUNDHOUSE = 8,
|
||||
STAT_NO_DIVE = 0x10,
|
||||
STAT_ONE_HIT_KNOCKDOWN = 0x20,
|
||||
STAT_SHOPPING_BAGS = 0x40,
|
||||
STAT_GUN_PANIC = 0x80
|
||||
};
|
||||
|
||||
class CPedStats
|
||||
{
|
||||
public:
|
||||
ePedStats m_type;
|
||||
char m_name[24];
|
||||
float m_fleeDistance;
|
||||
float m_headingChangeRate;
|
||||
int8 m_fear;
|
||||
int8 m_temper;
|
||||
int8 m_lawfulness;
|
||||
int8 m_sexiness;
|
||||
float m_attackStrength;
|
||||
float m_defendWeakness;
|
||||
int16 m_flags;
|
||||
|
||||
static CPedStats *ms_apPedStats[NUM_PEDSTATS];
|
||||
|
||||
static void Initialise(void);
|
||||
static void Shutdown(void);
|
||||
static void LoadPedStats(void);
|
||||
static ePedStats GetPedStatType(char *name);
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CPedStats, 0x34);
|
@ -1,11 +1,13 @@
|
||||
#include "common.h"
|
||||
|
||||
#include "General.h"
|
||||
#include "FileMgr.h"
|
||||
#include "PedType.h"
|
||||
|
||||
// --MIAMI: file done
|
||||
|
||||
CPedType *CPedType::ms_apPedType[NUM_PEDTYPES];
|
||||
CPedStats *CPedStats::ms_apPedStats[NUM_PEDSTATS];
|
||||
|
||||
void
|
||||
CPedType::Initialise(void)
|
||||
@ -204,3 +206,114 @@ INITSAVEBUF
|
||||
*ms_apPedType[i] = ReadSaveBuf<CPedType>(buf);
|
||||
VALIDATESAVEBUF(size)
|
||||
}
|
||||
|
||||
void
|
||||
CPedStats::Initialise(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
debug("Initialising CPedStats...\n");
|
||||
for(i = 0; i < NUM_PEDSTATS; i++){
|
||||
ms_apPedStats[i] = new CPedStats;
|
||||
ms_apPedStats[i]->m_type = PEDSTAT_PLAYER;
|
||||
ms_apPedStats[i]->m_name[8] = 'R'; // WHAT?
|
||||
ms_apPedStats[i]->m_fleeDistance = 20.0f;
|
||||
ms_apPedStats[i]->m_headingChangeRate = 15.0f;
|
||||
ms_apPedStats[i]->m_fear = 50;
|
||||
ms_apPedStats[i]->m_temper = 50;
|
||||
ms_apPedStats[i]->m_lawfulness = 50;
|
||||
ms_apPedStats[i]->m_sexiness = 50;
|
||||
ms_apPedStats[i]->m_attackStrength = 1.0f;
|
||||
ms_apPedStats[i]->m_defendWeakness = 1.0f;
|
||||
ms_apPedStats[i]->m_flags = 0;
|
||||
}
|
||||
debug("Loading pedstats data...\n");
|
||||
CPedStats::LoadPedStats();
|
||||
debug("CPedStats ready\n");
|
||||
}
|
||||
|
||||
void
|
||||
CPedStats::Shutdown(void)
|
||||
{
|
||||
int i;
|
||||
debug("Shutting down CPedStats...\n");
|
||||
for(i = 0; i < NUM_PEDSTATS; i++)
|
||||
delete ms_apPedStats[i];
|
||||
debug("CPedStats shut down\n");
|
||||
}
|
||||
|
||||
void
|
||||
CPedStats::LoadPedStats(void)
|
||||
{
|
||||
char *buf;
|
||||
char line[256];
|
||||
char name[32];
|
||||
size_t bp, buflen;
|
||||
int lp, linelen;
|
||||
int type;
|
||||
float fleeDist, headingChangeRate, attackStrength, defendWeakness;
|
||||
int fear, temper, lawfullness, sexiness, flags;
|
||||
|
||||
|
||||
type = 0;
|
||||
buf = new char[16 * 1024];
|
||||
|
||||
CFileMgr::SetDir("DATA");
|
||||
buflen = CFileMgr::LoadFile("PEDSTATS.DAT", (uint8*)buf, 16 * 1024, "r");
|
||||
CFileMgr::SetDir("");
|
||||
|
||||
for(bp = 0; bp < buflen; ){
|
||||
// read file line by line
|
||||
for(linelen = 0; buf[bp] != '\n' && bp < buflen; bp++){
|
||||
if(buf[bp] == '\r' || buf[bp] == ',' || buf[bp] == '\t')
|
||||
line[linelen++] = ' ';
|
||||
else
|
||||
line[linelen++] = buf[bp];
|
||||
}
|
||||
bp++;
|
||||
line[linelen] = '\0';
|
||||
|
||||
// skip white space
|
||||
for(lp = 0; line[lp] <= ' '; lp++);
|
||||
|
||||
if(lp >= linelen || // FIX: game uses == here, but this is safer if we have empty lines
|
||||
line[lp] == '#')
|
||||
continue;
|
||||
|
||||
sscanf(&line[lp], "%s %f %f %d %d %d %d %f %f %d",
|
||||
name,
|
||||
&fleeDist,
|
||||
&headingChangeRate,
|
||||
&fear,
|
||||
&temper,
|
||||
&lawfullness,
|
||||
&sexiness,
|
||||
&attackStrength,
|
||||
&defendWeakness,
|
||||
&flags);
|
||||
ms_apPedStats[type]->m_type = (ePedStats)type;
|
||||
strncpy(ms_apPedStats[type]->m_name, name, 24); // FIX: game uses strcpy
|
||||
ms_apPedStats[type]->m_fleeDistance = fleeDist;
|
||||
ms_apPedStats[type]->m_headingChangeRate = headingChangeRate;
|
||||
ms_apPedStats[type]->m_fear = fear;
|
||||
ms_apPedStats[type]->m_temper = temper;
|
||||
ms_apPedStats[type]->m_lawfulness = lawfullness;
|
||||
ms_apPedStats[type]->m_sexiness = sexiness;
|
||||
ms_apPedStats[type]->m_attackStrength = attackStrength;
|
||||
ms_apPedStats[type]->m_defendWeakness = defendWeakness;
|
||||
ms_apPedStats[type]->m_flags = flags;
|
||||
type++;
|
||||
}
|
||||
|
||||
delete[] buf;
|
||||
}
|
||||
|
||||
ePedStats
|
||||
CPedStats::GetPedStatType(char *name)
|
||||
{
|
||||
for(uint16 type = 0; type < NUM_PEDSTATS; type++)
|
||||
if(!CGeneral::faststrcmp(ms_apPedStats[type]->m_name, name))
|
||||
return (ePedStats) type;
|
||||
|
||||
return NUM_PEDSTATS;
|
||||
}
|
||||
|
@ -92,3 +92,87 @@ public:
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CPedType, 0x20);
|
||||
|
||||
enum ePedStats
|
||||
{
|
||||
PEDSTAT_PLAYER,
|
||||
PEDSTAT_COP,
|
||||
PEDSTAT_MEDIC,
|
||||
PEDSTAT_FIREMAN,
|
||||
PEDSTAT_GANG1,
|
||||
PEDSTAT_GANG2,
|
||||
PEDSTAT_GANG3,
|
||||
PEDSTAT_GANG4,
|
||||
PEDSTAT_GANG5,
|
||||
PEDSTAT_GANG6,
|
||||
PEDSTAT_GANG7,
|
||||
PEDSTAT_STREET_GUY,
|
||||
PEDSTAT_SUIT_GUY,
|
||||
PEDSTAT_SENSIBLE_GUY,
|
||||
PEDSTAT_GEEK_GUY,
|
||||
PEDSTAT_OLD_GUY,
|
||||
PEDSTAT_TOUGH_GUY,
|
||||
PEDSTAT_STREET_GIRL,
|
||||
PEDSTAT_SUIT_GIRL,
|
||||
PEDSTAT_SENSIBLE_GIRL,
|
||||
PEDSTAT_GEEK_GIRL,
|
||||
PEDSTAT_OLD_GIRL,
|
||||
PEDSTAT_TOUGH_GIRL,
|
||||
PEDSTAT_TRAMP_MALE,
|
||||
PEDSTAT_TRAMP_FEMALE,
|
||||
PEDSTAT_TOURIST,
|
||||
PEDSTAT_PROSTITUTE,
|
||||
PEDSTAT_CRIMINAL,
|
||||
PEDSTAT_BUSKER,
|
||||
PEDSTAT_TAXIDRIVER,
|
||||
PEDSTAT_PSYCHO,
|
||||
PEDSTAT_STEWARD,
|
||||
PEDSTAT_SPORTSFAN,
|
||||
PEDSTAT_SHOPPER,
|
||||
PEDSTAT_OLDSHOPPER,
|
||||
PEDSTAT_BEACH_GUY,
|
||||
PEDSTAT_BEACH_GIRL,
|
||||
PEDSTAT_SKATER,
|
||||
PEDSTAT_STD_MISSION,
|
||||
PEDSTAT_COWARD,
|
||||
|
||||
NUM_PEDSTATS
|
||||
};
|
||||
|
||||
// flags
|
||||
enum
|
||||
{
|
||||
STAT_PUNCH_ONLY = 1,
|
||||
STAT_CAN_KNEE_HEAD = 2,
|
||||
STAT_CAN_KICK = 4,
|
||||
STAT_CAN_ROUNDHOUSE = 8,
|
||||
STAT_NO_DIVE = 0x10,
|
||||
STAT_ONE_HIT_KNOCKDOWN = 0x20,
|
||||
STAT_SHOPPING_BAGS = 0x40,
|
||||
STAT_GUN_PANIC = 0x80
|
||||
};
|
||||
|
||||
class CPedStats
|
||||
{
|
||||
public:
|
||||
ePedStats m_type;
|
||||
char m_name[24];
|
||||
float m_fleeDistance;
|
||||
float m_headingChangeRate;
|
||||
int8 m_fear;
|
||||
int8 m_temper;
|
||||
int8 m_lawfulness;
|
||||
int8 m_sexiness;
|
||||
float m_attackStrength;
|
||||
float m_defendWeakness;
|
||||
int16 m_flags;
|
||||
|
||||
static CPedStats *ms_apPedStats[NUM_PEDSTATS];
|
||||
|
||||
static void Initialise(void);
|
||||
static void Shutdown(void);
|
||||
static void LoadPedStats(void);
|
||||
static ePedStats GetPedStatType(char *name);
|
||||
};
|
||||
|
||||
VALIDATE_SIZE(CPedStats, 0x34);
|
||||
|
Reference in New Issue
Block a user