mirror of
https://github.com/halpz/re3.git
synced 2025-06-30 09:16:22 +00:00
Merge branch 'master' into ps2menu
This commit is contained in:
@ -463,10 +463,6 @@ CCarCtrl::GenerateOneRandomCar()
|
||||
directionNextLinkY = pNextLink->GetDirY() * pVehicle->AutoPilot.m_nNextDirection;
|
||||
}
|
||||
#else
|
||||
float currentPathLinkForwardX = pVehicle->AutoPilot.m_nCurrentDirection * ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nCurrentPathNodeInfo].GetDirX();
|
||||
float currentPathLinkForwardY = pVehicle->AutoPilot.m_nCurrentDirection * ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nCurrentPathNodeInfo].GetDirY();
|
||||
float nextPathLinkForwardX = pVehicle->AutoPilot.m_nNextDirection * ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nNextPathNodeInfo].GetDirX();
|
||||
float nextPathLinkForwardY = pVehicle->AutoPilot.m_nNextDirection * ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nNextPathNodeInfo].GetDirY();
|
||||
|
||||
CCarPathLink* pCurrentLink = &ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nCurrentPathNodeInfo];
|
||||
CCarPathLink* pNextLink = &ThePaths.m_carPathLinks[pVehicle->AutoPilot.m_nNextPathNodeInfo];
|
||||
@ -988,13 +984,15 @@ void CCarCtrl::SlowCarDownForPedsSectorList(CPtrList& lst, CVehicle* pVehicle, f
|
||||
if (pVehicle->GetModelIndex() == MI_RCBANDIT){
|
||||
if (dotVelocity * GAME_SPEED_TO_METERS_PER_SECOND / 2 > distanceUntilHit)
|
||||
pPed->SetEvasiveStep(pVehicle, 0);
|
||||
}else if (dotVelocity > 0.3f){
|
||||
if (sideLength - 0.5f < sidewaysDistance)
|
||||
}
|
||||
else if (dotVelocity > 0.3f) {
|
||||
if (sideLength + 0.1f < sidewaysDistance)
|
||||
pPed->SetEvasiveStep(pVehicle, 0);
|
||||
else
|
||||
pPed->SetEvasiveDive(pVehicle, 0);
|
||||
}else{
|
||||
if (sideLength + 0.1f < sidewaysDistance)
|
||||
}
|
||||
else if (dotVelocity > 0.1f) {
|
||||
if (sideLength - 0.5f < sidewaysDistance)
|
||||
pPed->SetEvasiveStep(pVehicle, 0);
|
||||
else
|
||||
pPed->SetEvasiveDive(pVehicle, 0);
|
||||
@ -1023,7 +1021,7 @@ void CCarCtrl::SlowCarDownForPedsSectorList(CPtrList& lst, CVehicle* pVehicle, f
|
||||
CPlayerPed* pPlayerPed = (CPlayerPed*)pPed;
|
||||
if (pPlayerPed->IsPlayer() && dotDirection < frontSafe &&
|
||||
pPlayerPed->IsPedInControl() &&
|
||||
pPlayerPed->m_fMoveSpeed < 0.1f && pPlayerPed->bIsLooking &&
|
||||
pPlayerPed->m_fMoveSpeed < 1.0f && !pPlayerPed->bIsLooking &&
|
||||
CTimer::GetTimeInMilliseconds() > pPlayerPed->m_lookTimer) {
|
||||
pPlayerPed->AnnoyPlayerPed(false);
|
||||
pPlayerPed->SetLookFlag(pVehicle, true);
|
||||
@ -1647,12 +1645,18 @@ void CCarCtrl::PickNextNodeRandomly(CVehicle* pVehicle)
|
||||
if (pVehicle->AutoPilot.m_bStayInFastLane)
|
||||
pVehicle->AutoPilot.m_nNextLane = 0;
|
||||
CVector positionOnCurrentLinkIncludingLane(
|
||||
pCurLink->GetX() + ((pVehicle->AutoPilot.m_nCurrentLane + pCurLink->OneWayLaneOffset()) * LANE_WIDTH) * currentPathLinkForwardY,
|
||||
pCurLink->GetY() - ((pVehicle->AutoPilot.m_nCurrentLane + pCurLink->OneWayLaneOffset()) * LANE_WIDTH) * currentPathLinkForwardX,
|
||||
pCurLink->GetX() + ((pVehicle->AutoPilot.m_nCurrentLane + pCurLink->OneWayLaneOffset()) * LANE_WIDTH)
|
||||
#ifdef FIX_BUGS
|
||||
* currentPathLinkForwardY
|
||||
#endif
|
||||
,pCurLink->GetY() - ((pVehicle->AutoPilot.m_nCurrentLane + pCurLink->OneWayLaneOffset()) * LANE_WIDTH) * currentPathLinkForwardX,
|
||||
0.0f);
|
||||
CVector positionOnNextLinkIncludingLane(
|
||||
pNextLink->GetX() + ((pVehicle->AutoPilot.m_nNextLane + pNextLink->OneWayLaneOffset()) * LANE_WIDTH) * nextPathLinkForwardY,
|
||||
pNextLink->GetY() - ((pVehicle->AutoPilot.m_nNextLane + pNextLink->OneWayLaneOffset()) * LANE_WIDTH) * nextPathLinkForwardX,
|
||||
pNextLink->GetX() + ((pVehicle->AutoPilot.m_nNextLane + pNextLink->OneWayLaneOffset()) * LANE_WIDTH)
|
||||
#ifdef FIX_BUGS
|
||||
* nextPathLinkForwardY
|
||||
#endif
|
||||
,pNextLink->GetY() - ((pVehicle->AutoPilot.m_nNextLane + pNextLink->OneWayLaneOffset()) * LANE_WIDTH) * nextPathLinkForwardX,
|
||||
0.0f);
|
||||
float directionCurrentLinkX = pCurLink->GetDirX() * pVehicle->AutoPilot.m_nCurrentDirection;
|
||||
float directionCurrentLinkY = pCurLink->GetDirY() * pVehicle->AutoPilot.m_nCurrentDirection;
|
||||
|
@ -83,12 +83,20 @@ CGameLogic::Update()
|
||||
}
|
||||
break;
|
||||
case WBSTATE_WASTED:
|
||||
#ifdef MISSION_REPLAY
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > AddExtraDeathDelay() + 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= AddExtraDeathDelay() + 0x800)) {
|
||||
#else
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) {
|
||||
#endif
|
||||
TheCamera.SetFadeColour(200, 200, 200);
|
||||
TheCamera.Fade(2.0f, FADE_OUT);
|
||||
}
|
||||
|
||||
#ifdef MISSION_REPLAY
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= AddExtraDeathDelay() + 0x1000) {
|
||||
#else
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) {
|
||||
#endif
|
||||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
if (pPlayerInfo.m_bGetOutOfHospitalFree) {
|
||||
pPlayerInfo.m_bGetOutOfHospitalFree = false;
|
||||
@ -131,11 +139,19 @@ CGameLogic::Update()
|
||||
}
|
||||
break;
|
||||
case WBSTATE_BUSTED:
|
||||
#ifdef MISSION_REPLAY
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > AddExtraDeathDelay() + 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= AddExtraDeathDelay() + 0x800)) {
|
||||
#else
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) {
|
||||
#endif
|
||||
TheCamera.SetFadeColour(0, 0, 0);
|
||||
TheCamera.Fade(2.0f, FADE_OUT);
|
||||
}
|
||||
#ifdef MISSION_REPLAY
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= AddExtraDeathDelay() + 0x1000) {
|
||||
#else
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) {
|
||||
#endif
|
||||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
int takeMoney;
|
||||
|
||||
@ -203,11 +219,19 @@ CGameLogic::Update()
|
||||
}
|
||||
break;
|
||||
case WBSTATE_FAILED_CRITICAL_MISSION:
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800 && CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800) {
|
||||
#ifdef MISSION_REPLAY
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > AddExtraDeathDelay() + 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= AddExtraDeathDelay() + 0x800)) {
|
||||
#else
|
||||
if ((CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime > 0x800) && (CTimer::GetPreviousTimeInMilliseconds() - pPlayerInfo.m_nWBTime <= 0x800)) {
|
||||
#endif
|
||||
TheCamera.SetFadeColour(0, 0, 0);
|
||||
TheCamera.Fade(2.0f, FADE_OUT);
|
||||
}
|
||||
#ifdef MISSION_REPLAY
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= AddExtraDeathDelay() + 0x1000) {
|
||||
#else
|
||||
if (CTimer::GetTimeInMilliseconds() - pPlayerInfo.m_nWBTime >= 0x1000) {
|
||||
#endif
|
||||
pPlayerInfo.m_WBState = WBSTATE_PLAYING;
|
||||
if (pPlayerInfo.m_pPed->bInVehicle) {
|
||||
CVehicle *pVehicle = pPlayerInfo.m_pPed->m_pMyVehicle;
|
||||
|
@ -1853,7 +1853,14 @@ CVehicle* CStoredCar::RestoreCar()
|
||||
CStreaming::RequestModel(m_nModelIndex, STREAMFLAGS_DEPENDENCY);
|
||||
if (!CStreaming::HasModelLoaded(m_nModelIndex))
|
||||
return nil;
|
||||
CVehicleModelInfo::SetComponentsToUse(m_nVariationA, m_nVariationB);
|
||||
#ifdef FIX_BUGS
|
||||
CVehicleModelInfo* pModelInfo = (CVehicleModelInfo*)CModelInfo::GetModelInfo(m_nModelIndex);
|
||||
assert(pModelInfo);
|
||||
if (pModelInfo->m_numComps != 0)
|
||||
#endif
|
||||
{
|
||||
CVehicleModelInfo::SetComponentsToUse(m_nVariationA, m_nVariationB);
|
||||
}
|
||||
#ifdef FIX_BUGS
|
||||
CVehicle* pVehicle;
|
||||
if (CModelInfo::IsBoatModel(m_nModelIndex))
|
||||
|
@ -404,11 +404,10 @@ CPathFind::PreparePathData(void)
|
||||
maxX = 0.0f;
|
||||
maxY = 0.0f;
|
||||
for(j = 0; j < 12; j++){
|
||||
k = i*12 + j;
|
||||
k = m_mapObjects[i]->GetModelIndex()*12 + j;
|
||||
if(InfoForTileCars[k].type == NodeTypeExtern){
|
||||
numExtern++;
|
||||
if(InfoForTileCars[k].numLeftLanes + InfoForTileCars[k].numRightLanes > numLanes)
|
||||
numLanes = InfoForTileCars[k].numLeftLanes + InfoForTileCars[k].numRightLanes;
|
||||
numLanes = Max(numLanes, InfoForTileCars[k].numLeftLanes + InfoForTileCars[k].numRightLanes);
|
||||
maxX = Max(maxX, Abs(InfoForTileCars[k].x));
|
||||
maxY = Max(maxY, Abs(InfoForTileCars[k].y));
|
||||
}else if(InfoForTileCars[k].type == NodeTypeIntern)
|
||||
@ -417,7 +416,7 @@ CPathFind::PreparePathData(void)
|
||||
|
||||
if(numIntern == 1 && numExtern == 2){
|
||||
if(numLanes < 4){
|
||||
if((i & 7) == 4){ // WHAT?
|
||||
if((i & 7) == 4){ // 1/8 probability
|
||||
m_objectFlags[i] |= UseInRoadBlock;
|
||||
if(maxX > maxY)
|
||||
m_objectFlags[i] |= ObjectEastWest;
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "AudioScriptObject.h"
|
||||
#include "RpAnimBlend.h"
|
||||
#include "AnimBlendAssociation.h"
|
||||
#include "soundlist.h"
|
||||
#ifdef FIX_BUGS
|
||||
#include "Replay.h"
|
||||
#endif
|
||||
@ -65,7 +66,7 @@ CPhoneInfo::Update(void)
|
||||
endAssoc->flags &= ~ASSOC_DELETEFADEDOUT;
|
||||
endAssoc->SetFinishCallback(PhonePutDownCB, player);
|
||||
} else {
|
||||
CPad::GetPad(0)->DisablePlayerControls &= ~PLAYERCONTROL_DISABLED_40;
|
||||
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_PHONE);
|
||||
if (player->m_nPedState == PED_MAKE_CALL)
|
||||
player->m_nPedState = PED_IDLE;
|
||||
}
|
||||
@ -97,7 +98,7 @@ CPhoneInfo::Update(void)
|
||||
if (scratchTheCabinet) {
|
||||
m_aPhones[phoneId].m_pEntity->GetUp().z = (CGeneral::GetRandomNumber() % 1024) / 16000.0f + 1.0f;
|
||||
if (!phoneRings)
|
||||
PlayOneShotScriptObject(_SCRSOUND_PHONE_RING, m_aPhones[phoneId].m_pEntity->GetPosition());
|
||||
PlayOneShotScriptObject(SCRIPT_SOUND_PAYPHONE_RINGING, m_aPhones[phoneId].m_pEntity->GetPosition());
|
||||
} else {
|
||||
m_aPhones[phoneId].m_pEntity->GetUp().z = 1.0f;
|
||||
}
|
||||
@ -115,7 +116,7 @@ CPhoneInfo::Update(void)
|
||||
player->m_fRotationDest = angleToFace;
|
||||
player->SetHeading(angleToFace);
|
||||
player->m_nPedState = PED_MAKE_CALL;
|
||||
CPad::GetPad(0)->DisablePlayerControls |= PLAYERCONTROL_DISABLED_40;
|
||||
CPad::GetPad(0)->SetDisablePlayerControls(PLAYERCONTROL_PHONE);
|
||||
TheCamera.SetWideScreenOn();
|
||||
playerInfo->MakePlayerSafe(true);
|
||||
CAnimBlendAssociation *phonePickAssoc = CAnimManager::BlendAnimation(player->GetClump(), ASSOCGRP_STD, ANIM_PHONE_IN, 4.0f);
|
||||
@ -136,7 +137,7 @@ CPhoneInfo::Update(void)
|
||||
if (scratchTheCabinet) {
|
||||
m_aPhones[phoneId].m_pEntity->GetUp().z = (CGeneral::GetRandomNumber() % 1024) / 16000.0f + 1.0f;
|
||||
if (!phoneRings)
|
||||
PlayOneShotScriptObject(_SCRSOUND_PHONE_RING, m_aPhones[phoneId].m_pEntity->GetPosition());
|
||||
PlayOneShotScriptObject(SCRIPT_SOUND_PAYPHONE_RINGING, m_aPhones[phoneId].m_pEntity->GetPosition());
|
||||
} else {
|
||||
m_aPhones[phoneId].m_pEntity->GetUp().z = 1.0f;
|
||||
}
|
||||
@ -339,7 +340,7 @@ PhonePutDownCB(CAnimBlendAssociation *assoc, void *arg)
|
||||
{
|
||||
assoc->flags |= ASSOC_DELETEFADEDOUT;
|
||||
assoc->blendDelta = -1000.0f;
|
||||
CPad::GetPad(0)->DisablePlayerControls &= ~PLAYERCONTROL_DISABLED_40;
|
||||
CPad::GetPad(0)->SetEnablePlayerControls(PLAYERCONTROL_PHONE);
|
||||
CPed *ped = (CPed*)arg;
|
||||
|
||||
if (assoc->blendAmount > 0.5f)
|
||||
|
@ -132,58 +132,58 @@ CRoadBlocks::GenerateRoadBlocks(void)
|
||||
CColModel *pVehicleColModel = CModelInfo::GetModelInfo(vehicleId)->GetColModel();
|
||||
float fModelRadius = 2.0f * pVehicleColModel->boundingSphere.radius + 0.25f;
|
||||
int16 radius = (int16)(fMapObjectRadius / fModelRadius);
|
||||
if (radius > 0 && radius < 6) {
|
||||
CVector2D vecDistanceToCamera = TheCamera.GetPosition() - mapObject->GetPosition();
|
||||
float fDotProduct = DotProduct2D(vecDistanceToCamera, mapObject->GetForward());
|
||||
float fOffset = 0.5f * fModelRadius * (float)(radius - 1);
|
||||
for (int16 i = 0; i < radius; i++) {
|
||||
uint8 nRoadblockType = fDotProduct < 0.0f;
|
||||
if (CGeneral::GetRandomNumber() & 1) {
|
||||
offsetMatrix.SetRotateZ(((CGeneral::GetRandomNumber() & 0xFF) - 128.0f) * 0.003f + HALFPI);
|
||||
if (radius >= 6)
|
||||
continue;
|
||||
CVector2D vecDistanceToCamera = TheCamera.GetPosition() - mapObject->GetPosition();
|
||||
float fDotProduct = DotProduct2D(vecDistanceToCamera, mapObject->GetForward());
|
||||
float fOffset = 0.5f * fModelRadius * (float)(radius - 1);
|
||||
for (int16 i = 0; i < radius; i++) {
|
||||
uint8 nRoadblockType = fDotProduct < 0.0f;
|
||||
if (CGeneral::GetRandomNumber() & 1) {
|
||||
offsetMatrix.SetRotateZ(((CGeneral::GetRandomNumber() & 0xFF) - 128.0f) * 0.003f + HALFPI);
|
||||
}
|
||||
else {
|
||||
nRoadblockType = !nRoadblockType;
|
||||
offsetMatrix.SetRotateZ(((CGeneral::GetRandomNumber() & 0xFF) - 128.0f) * 0.003f - HALFPI);
|
||||
}
|
||||
if (ThePaths.m_objectFlags[RoadBlockObjects[nRoadblockNode]] & ObjectEastWest)
|
||||
offsetMatrix.GetPosition() = CVector(0.0f, i * fModelRadius - fOffset, 0.6f);
|
||||
else
|
||||
offsetMatrix.GetPosition() = CVector(i * fModelRadius - fOffset, 0.0f, 0.6f);
|
||||
CMatrix vehicleMatrix = mapObject->m_matrix * offsetMatrix;
|
||||
float fModelRadius = CModelInfo::GetModelInfo(vehicleId)->GetColModel()->boundingSphere.radius - 0.25f;
|
||||
int16 colliding = 0;
|
||||
CWorld::FindObjectsKindaColliding(vehicleMatrix.GetPosition(), fModelRadius, 0, &colliding, 2, nil, false, true, true, false, false);
|
||||
if (!colliding) {
|
||||
CAutomobile *pVehicle = new CAutomobile(vehicleId, RANDOM_VEHICLE);
|
||||
pVehicle->SetStatus(STATUS_ABANDONED);
|
||||
// pVehicle->GetHeightAboveRoad(); // called but return value is ignored?
|
||||
vehicleMatrix.GetPosition().z += fModelRadius - 0.6f;
|
||||
pVehicle->m_matrix = vehicleMatrix;
|
||||
pVehicle->PlaceOnRoadProperly();
|
||||
pVehicle->bIsStatic = false;
|
||||
pVehicle->m_matrix.UpdateRW();
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->bIsLocked = false;
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
|
||||
pVehicle->AutoPilot.m_nTempAction = TEMPACT_NONE;
|
||||
pVehicle->AutoPilot.m_nCurrentLane = 0;
|
||||
pVehicle->AutoPilot.m_nNextLane = 0;
|
||||
pVehicle->AutoPilot.m_fMaxTrafficSpeed = 0.0f;
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = 0.0f;
|
||||
pVehicle->bExtendedRange = true;
|
||||
if (pVehicle->UsesSiren(pVehicle->GetModelIndex()) && CGeneral::GetRandomNumber() & 1)
|
||||
pVehicle->m_bSirenOrAlarm = true;
|
||||
if (pVehicle->GetUp().z > 0.94f) {
|
||||
CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0);
|
||||
CWorld::Add(pVehicle);
|
||||
pVehicle->bCreateRoadBlockPeds = true;
|
||||
pVehicle->m_nRoadblockType = nRoadblockType;
|
||||
pVehicle->m_nRoadblockNode = nRoadblockNode;
|
||||
}
|
||||
else {
|
||||
nRoadblockType = !nRoadblockType;
|
||||
offsetMatrix.SetRotateZ(((CGeneral::GetRandomNumber() & 0xFF) - 128.0f) * 0.003f - HALFPI);
|
||||
}
|
||||
if (ThePaths.m_objectFlags[RoadBlockObjects[nRoadblockNode]] & ObjectEastWest)
|
||||
offsetMatrix.GetPosition() = CVector(0.0f, -fOffset, 0.6f);
|
||||
else
|
||||
offsetMatrix.GetPosition() = CVector(-fOffset, 0.0f, 0.6f);
|
||||
CMatrix vehicleMatrix = mapObject->m_matrix * offsetMatrix;
|
||||
float fModelRadius = CModelInfo::GetModelInfo(vehicleId)->GetColModel()->boundingSphere.radius - 0.25f;
|
||||
int16 colliding = 0;
|
||||
CWorld::FindObjectsKindaColliding(vehicleMatrix.GetPosition(), fModelRadius, 0, &colliding, 2, nil, false, true, true, false, false);
|
||||
if (!colliding) {
|
||||
CAutomobile *pVehicle = new CAutomobile(vehicleId, RANDOM_VEHICLE);
|
||||
pVehicle->SetStatus(STATUS_ABANDONED);
|
||||
// pVehicle->GetHeightAboveRoad(); // called but return value is ignored?
|
||||
vehicleMatrix.GetPosition().z += fModelRadius - 0.6f;
|
||||
pVehicle->m_matrix = vehicleMatrix;
|
||||
pVehicle->PlaceOnRoadProperly();
|
||||
pVehicle->bIsStatic = false;
|
||||
pVehicle->m_matrix.UpdateRW();
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
pVehicle->bIsLocked = false;
|
||||
pVehicle->AutoPilot.m_nCarMission = MISSION_NONE;
|
||||
pVehicle->AutoPilot.m_nTempAction = TEMPACT_NONE;
|
||||
pVehicle->AutoPilot.m_nCurrentLane = 0;
|
||||
pVehicle->AutoPilot.m_nNextLane = 0;
|
||||
pVehicle->AutoPilot.m_fMaxTrafficSpeed = 0.0f;
|
||||
pVehicle->AutoPilot.m_nCruiseSpeed = 0.0f;
|
||||
pVehicle->bExtendedRange = true;
|
||||
if (pVehicle->UsesSiren(pVehicle->GetModelIndex()) && CGeneral::GetRandomNumber() & 1)
|
||||
pVehicle->m_bSirenOrAlarm = true;
|
||||
if (pVehicle->GetForward().z > 0.94f) {
|
||||
CVisibilityPlugins::SetClumpAlpha(pVehicle->GetClump(), 0);
|
||||
CWorld::Add(pVehicle);
|
||||
pVehicle->bCreateRoadBlockPeds = true;
|
||||
pVehicle->m_nRoadblockType = nRoadblockType;
|
||||
pVehicle->m_nRoadblockNode = nRoadblockNode;
|
||||
}
|
||||
else {
|
||||
delete pVehicle;
|
||||
}
|
||||
delete pVehicle;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -350,6 +350,7 @@ private:
|
||||
static bool IsPlayerStopped(CPlayerInfo*);
|
||||
static bool IsVehicleStopped(CVehicle*);
|
||||
|
||||
static void PrintListSizes();
|
||||
static void ReadObjectNamesFromScript();
|
||||
static void UpdateObjectIndices();
|
||||
static void ReadMultiScriptFileOffsetsFromScript();
|
||||
@ -372,6 +373,9 @@ private:
|
||||
friend class CRunningScript;
|
||||
friend class CHud;
|
||||
friend void CMissionCleanup::Process();
|
||||
#ifdef FIX_BUGS
|
||||
friend void RetryMission(int, int);
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@ -479,6 +483,15 @@ private:
|
||||
void CharInAreaCheckCommand(int32, uint32*);
|
||||
void CarInAreaCheckCommand(int32, uint32*);
|
||||
|
||||
#ifdef MISSION_REPLAY
|
||||
bool CanAllowMissionReplay();
|
||||
#endif
|
||||
|
||||
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
int CollectParameterForDebug(char* buf, bool& var);
|
||||
void GetStoredParameterForDebug(char* buf);
|
||||
#endif
|
||||
|
||||
float LimitAngleOnCircle(float angle) { return angle < 0.0f ? angle + 360.0f : angle; }
|
||||
|
||||
bool ThisIsAValidRandomPed(uint32 pedtype) {
|
||||
@ -502,3 +515,19 @@ private:
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
#ifdef MISSION_REPLAY
|
||||
extern int AllowMissionReplay;
|
||||
extern uint32 WaitForMissionActivate;
|
||||
extern uint32 WaitForSave;
|
||||
extern uint32 MissionStartTime;
|
||||
extern int missionRetryScriptIndex;
|
||||
extern bool doingMissionRetry;
|
||||
|
||||
uint32 AddExtraDeathDelay();
|
||||
void RetryMission(int, int);
|
||||
#endif
|
||||
|
||||
#ifdef USE_DEBUG_SCRIPT_LOADER
|
||||
extern int scriptToLoad;
|
||||
#endif
|
@ -1157,7 +1157,38 @@ enum {
|
||||
COMMAND_CAN_CHAR_SEE_DEAD_CHAR,
|
||||
COMMAND_SET_ENTER_CAR_RANGE_MULTIPLIER,
|
||||
#ifndef GTA3_1_1_PATCH
|
||||
COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER
|
||||
COMMAND_SET_THREAT_REACTION_RANGE_MULTIPLIER,
|
||||
#endif
|
||||
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
LAST_SCRIPT_COMMAND
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
#ifdef USE_ADVANCED_SCRIPT_DEBUG_OUTPUT
|
||||
|
||||
enum eScriptArgument
|
||||
{
|
||||
ARGTYPE_NONE = 0,
|
||||
ARGTYPE_INT,
|
||||
ARGTYPE_FLOAT,
|
||||
ARGTYPE_STRING,
|
||||
ARGTYPE_LABEL,
|
||||
ARGTYPE_BOOL,
|
||||
ARGTYPE_PED_HANDLE,
|
||||
ARGTYPE_VEHICLE_HANDLE,
|
||||
ARGTYPE_OBJECT_HANDLE,
|
||||
ARGTYPE_ANDOR
|
||||
};
|
||||
|
||||
struct tScriptCommandData
|
||||
{
|
||||
int id;
|
||||
const char name[64];
|
||||
eScriptArgument input[18];
|
||||
eScriptArgument output[18];
|
||||
bool cond;
|
||||
int position;
|
||||
const char name_override[8];
|
||||
};
|
||||
#endif
|
Reference in New Issue
Block a user