mirror of
https://github.com/halpz/re3.git
synced 2025-07-04 05:20:45 +00:00
Merge branch 'miami' into VC/Pickups
# Conflicts: # src/control/Pickups.cpp
This commit is contained in:
@ -855,7 +855,7 @@ CPickups::Update()
|
||||
#ifdef CAMERA_PICKUP
|
||||
if ( bPickUpcamActivated ) // taken from PS2
|
||||
{
|
||||
float dist = (FindPlayerCoors() - StaticCamCoors).Magnitude2D();
|
||||
float dist = Distance2D(StaticCamCoors, FindPlayerCoors());
|
||||
float mult;
|
||||
if ( dist < 10.0f )
|
||||
mult = 1.0f - (dist / 10.0f );
|
||||
@ -871,8 +871,7 @@ CPickups::Update()
|
||||
TheCamera.TakeControl(FindPlayerVehicle(), CCam::MODE_FIXED, JUMP_CUT, CAMCONTROL_SCRIPT);
|
||||
}
|
||||
|
||||
if ( FindPlayerVehicle() != pPlayerVehicle
|
||||
|| (FindPlayerCoors() - StaticCamCoors).Magnitude() > 40.0f
|
||||
if ( FindPlayerVehicle() != pPlayerVehicle || Distance(StaticCamCoors, FindPlayerCoors()) > 40.0f
|
||||
|| ((CTimer::GetTimeInMilliseconds() - StaticCamStartTime) > 60000) )
|
||||
{
|
||||
TheCamera.RestoreWithJumpCut();
|
||||
|
@ -236,7 +236,7 @@ CRoadBlocks::CreateRoadBlockBetween2Points(CVector point1, CVector point2)
|
||||
tmp.GetPosition().z += fModelRadius - 0.6f;
|
||||
pVehicle->m_matrix = tmp;
|
||||
pVehicle->PlaceOnRoadProperly();
|
||||
pVehicle->bIsStatic = false;
|
||||
pVehicle->SetIsStatic(false);
|
||||
pVehicle->m_matrix.UpdateRW();
|
||||
pVehicle->m_nDoorLock = CARLOCK_UNLOCKED;
|
||||
CCarCtrl::JoinCarWithRoadSystem(pVehicle);
|
||||
|
@ -1704,7 +1704,7 @@ static void PossiblyWakeThisEntity(CPhysical* pEntity, bool ifColLoaded = false)
|
||||
return;
|
||||
if (!ifColLoaded || CColStore::HasCollisionLoaded(pEntity->GetPosition())) {
|
||||
pEntity->bIsStaticWaitingForCollision = false;
|
||||
if (!pEntity->IsStatic())
|
||||
if (!pEntity->GetIsStatic())
|
||||
pEntity->AddToMovingList();
|
||||
}
|
||||
}
|
||||
@ -2381,9 +2381,11 @@ void CTheScripts::Process()
|
||||
case 4:
|
||||
AllowMissionReplay = 5;
|
||||
RetryMission(0, 0);
|
||||
break;
|
||||
case 6:
|
||||
AllowMissionReplay = 7;
|
||||
TimeToWaitTill = CTimer::GetTimeInMilliseconds() + 500;
|
||||
break;
|
||||
case 7:
|
||||
if (TimeToWaitTill < CTimer::GetTimeInMilliseconds()) {
|
||||
AllowMissionReplay = 0;
|
||||
@ -3971,7 +3973,7 @@ int8 CRunningScript::ProcessCommands100To199(int32 command)
|
||||
if (pos.z <= MAP_Z_LOW_LIMIT)
|
||||
pos.z = CWorld::FindGroundZForCoord(pos.x, pos.y);
|
||||
pos.z += car->GetDistanceFromCentreOfMassToBaseOfModel();
|
||||
car->bIsStatic = false;
|
||||
car->SetIsStatic(false);
|
||||
/* Again weird usage of virtual functions. */
|
||||
if (car->IsBoat()) {
|
||||
car->Teleport(pos);
|
||||
@ -9647,13 +9649,13 @@ int8 CRunningScript::ProcessCommands900To999(int32 command)
|
||||
script_assert(pObject);
|
||||
if (ScriptParams[1]) {
|
||||
if (pObject->bIsStatic) {
|
||||
pObject->bIsStatic = false;
|
||||
pObject->SetIsStatic(false);
|
||||
pObject->AddToMovingList();
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!pObject->bIsStatic) {
|
||||
pObject->bIsStatic = true;
|
||||
pObject->SetIsStatic(true);
|
||||
pObject->RemoveFromMovingList();
|
||||
}
|
||||
}
|
||||
@ -13725,7 +13727,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
||||
pVehicle->bDontLoadCollision = true;
|
||||
if (pVehicle->bIsStaticWaitingForCollision) {
|
||||
pVehicle->bIsStaticWaitingForCollision = false;
|
||||
if (!pVehicle->IsStatic())
|
||||
if (!pVehicle->GetIsStatic())
|
||||
pVehicle->AddToMovingList();
|
||||
}
|
||||
}
|
||||
@ -13748,7 +13750,7 @@ int8 CRunningScript::ProcessCommands1400To1499(int32 command)
|
||||
pPed->bDontLoadCollision = true;
|
||||
if (pPed->bIsStaticWaitingForCollision) {
|
||||
pPed->bIsStaticWaitingForCollision = false;
|
||||
if (!pPed->IsStatic())
|
||||
if (!pPed->GetIsStatic())
|
||||
pPed->AddToMovingList();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user