mirror of
https://github.com/halpz/re3.git
synced 2024-12-24 17:55:29 +00:00
commit
3a6c606fe5
|
@ -146,7 +146,7 @@ LetThemFollowYou(void) {
|
||||||
CPed *nearPed = player->m_nearPeds[i];
|
CPed *nearPed = player->m_nearPeds[i];
|
||||||
if (nearPed && !nearPed->IsPlayer()) {
|
if (nearPed && !nearPed->IsPlayer()) {
|
||||||
nearPed->SetObjective(OBJECTIVE_FOLLOW_PED_IN_FORMATION, (void*)player);
|
nearPed->SetObjective(OBJECTIVE_FOLLOW_PED_IN_FORMATION, (void*)player);
|
||||||
nearPed->m_pedFormation = (eFormation)(rand() & 7);
|
nearPed->m_pedFormation = (eFormation)(1 + (rand() & 7));
|
||||||
nearPed->bScriptObjectiveCompleted = false;
|
nearPed->bScriptObjectiveCompleted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -388,7 +388,7 @@ CPed::CPed(uint32 pedType) : m_pedIK(this)
|
||||||
m_vecOffsetSeek.x = 0.0f;
|
m_vecOffsetSeek.x = 0.0f;
|
||||||
m_vecOffsetSeek.y = 0.0f;
|
m_vecOffsetSeek.y = 0.0f;
|
||||||
m_vecOffsetSeek.z = 0.0f;
|
m_vecOffsetSeek.z = 0.0f;
|
||||||
m_pedFormation = FORMATION_REAR;
|
m_pedFormation = FORMATION_UNDEFINED;
|
||||||
m_collidingThingTimer = 0;
|
m_collidingThingTimer = 0;
|
||||||
m_nPedStateTimer = 0;
|
m_nPedStateTimer = 0;
|
||||||
m_actionX = 0;
|
m_actionX = 0;
|
||||||
|
@ -2686,7 +2686,7 @@ CPed::SetObjective(eObjective newObj, void *entity)
|
||||||
case OBJECTIVE_FOLLOW_PED_IN_FORMATION:
|
case OBJECTIVE_FOLLOW_PED_IN_FORMATION:
|
||||||
m_pedInObjective = (CPed*)entity;
|
m_pedInObjective = (CPed*)entity;
|
||||||
m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
|
m_pedInObjective->RegisterReference((CEntity**)&m_pedInObjective);
|
||||||
m_pedFormation = FORMATION_REAR_LEFT;
|
m_pedFormation = FORMATION_REAR;
|
||||||
break;
|
break;
|
||||||
case OBJECTIVE_LEAVE_VEHICLE:
|
case OBJECTIVE_LEAVE_VEHICLE:
|
||||||
#ifdef VC_PED_PORTS
|
#ifdef VC_PED_PORTS
|
||||||
|
@ -14395,6 +14395,9 @@ CPed::ProcessEntityCollision(CEntity *collidingEnt, CColPoint *collidingPoints)
|
||||||
void
|
void
|
||||||
CPed::SetFormation(eFormation type)
|
CPed::SetFormation(eFormation type)
|
||||||
{
|
{
|
||||||
|
// FIX: Formations in GetFormationPosition were in range 1-8, whereas in here it's 0-7.
|
||||||
|
// To not change the behaviour, range in here tweaked by 1 with the use of enum.
|
||||||
|
|
||||||
switch (m_pedFormation) {
|
switch (m_pedFormation) {
|
||||||
case FORMATION_REAR:
|
case FORMATION_REAR:
|
||||||
case FORMATION_REAR_LEFT:
|
case FORMATION_REAR_LEFT:
|
||||||
|
|
|
@ -26,6 +26,7 @@ struct CPedAudioData
|
||||||
|
|
||||||
enum eFormation
|
enum eFormation
|
||||||
{
|
{
|
||||||
|
FORMATION_UNDEFINED,
|
||||||
FORMATION_REAR,
|
FORMATION_REAR,
|
||||||
FORMATION_REAR_LEFT,
|
FORMATION_REAR_LEFT,
|
||||||
FORMATION_REAR_RIGHT,
|
FORMATION_REAR_RIGHT,
|
||||||
|
|
Loading…
Reference in a new issue