mirror of
https://github.com/halpz/re3.git
synced 2025-06-30 15:56:20 +00:00
Merge branch 'miami' of https://github.com/GTAmodding/re3 into VCSanim
This commit is contained in:
@ -52,8 +52,8 @@ void CAutoPilot::Save(uint8*& buf)
|
||||
WriteSaveBuf<int32>(buf, m_nCurrentRouteNode);
|
||||
WriteSaveBuf<int32>(buf, m_nNextRouteNode);
|
||||
WriteSaveBuf<int32>(buf, m_nPrevRouteNode);
|
||||
WriteSaveBuf<uint32>(buf, m_nTimeEnteredCurve);
|
||||
WriteSaveBuf<uint32>(buf, m_nTimeToSpendOnCurrentCurve);
|
||||
WriteSaveBuf<int32>(buf, m_nTimeEnteredCurve);
|
||||
WriteSaveBuf<int32>(buf, m_nTimeToSpendOnCurrentCurve);
|
||||
WriteSaveBuf<uint32>(buf, m_nCurrentPathNodeInfo);
|
||||
WriteSaveBuf<uint32>(buf, m_nNextPathNodeInfo);
|
||||
WriteSaveBuf<uint32>(buf, m_nPreviousPathNodeInfo);
|
||||
@ -95,8 +95,8 @@ void CAutoPilot::Load(uint8*& buf)
|
||||
m_nCurrentRouteNode = ReadSaveBuf<int32>(buf);
|
||||
m_nNextRouteNode = ReadSaveBuf<int32>(buf);
|
||||
m_nPrevRouteNode = ReadSaveBuf<int32>(buf);
|
||||
m_nTimeEnteredCurve = ReadSaveBuf<uint32>(buf);
|
||||
m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<uint32>(buf);
|
||||
m_nTimeEnteredCurve = ReadSaveBuf<int32>(buf);
|
||||
m_nTimeToSpendOnCurrentCurve = ReadSaveBuf<int32>(buf);
|
||||
m_nCurrentPathNodeInfo = ReadSaveBuf<uint32>(buf);
|
||||
m_nNextPathNodeInfo = ReadSaveBuf<uint32>(buf);
|
||||
m_nPreviousPathNodeInfo = ReadSaveBuf<uint32>(buf);
|
||||
|
@ -64,8 +64,8 @@ public:
|
||||
int32 m_nCurrentRouteNode;
|
||||
int32 m_nNextRouteNode;
|
||||
int32 m_nPrevRouteNode;
|
||||
uint32 m_nTimeEnteredCurve;
|
||||
uint32 m_nTimeToSpendOnCurrentCurve;
|
||||
int32 m_nTimeEnteredCurve;
|
||||
int32 m_nTimeToSpendOnCurrentCurve;
|
||||
uint32 m_nCurrentPathNodeInfo;
|
||||
uint32 m_nNextPathNodeInfo;
|
||||
uint32 m_nPreviousPathNodeInfo;
|
||||
|
@ -2757,7 +2757,7 @@ void CCarCtrl::SteerAIPlaneTowardsTargetCoors(CAutomobile* pPlane)
|
||||
up.Normalise();
|
||||
CVector forward(Cos(pPlane->m_fOrientation), Sin(pPlane->m_fOrientation), fForwardZ);
|
||||
forward.Normalise();
|
||||
CVector right = CrossProduct(forward, up);
|
||||
CVector right = CrossProduct(up, forward);
|
||||
right.z -= 5.0f * pPlane->m_fPlaneSteer;
|
||||
right.Normalise();
|
||||
up = CrossProduct(forward, right);
|
||||
|
@ -1285,7 +1285,7 @@ bool CGarage::IsAnyOtherCarTouchingGarage(CVehicle * pException)
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
while (i--) {
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (!pVehicle || pVehicle == pException)
|
||||
if (!pVehicle || pVehicle == pException || pVehicle->GetStatus() == STATUS_WRECKED)
|
||||
continue;
|
||||
if (!IsEntityTouching3D(pVehicle))
|
||||
continue;
|
||||
@ -1997,7 +1997,11 @@ float CGarages::FindDoorHeightForMI(int32 mi)
|
||||
void CGarage::TidyUpGarage()
|
||||
{
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
#ifdef FIX_BUGS
|
||||
while (i--) {
|
||||
#else
|
||||
while (--i) {
|
||||
#endif
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (pVehicle && (pVehicle->IsCar() || pVehicle->IsBike())) {
|
||||
if (IsPointInsideGarage(pVehicle->GetPosition())) {
|
||||
@ -2013,7 +2017,11 @@ void CGarage::TidyUpGarage()
|
||||
void CGarage::TidyUpGarageClose()
|
||||
{
|
||||
uint32 i = CPools::GetVehiclePool()->GetSize();
|
||||
#ifdef FIX_BUGS
|
||||
while (i--) {
|
||||
#else
|
||||
while (--i) {
|
||||
#endif
|
||||
CVehicle* pVehicle = CPools::GetVehiclePool()->GetSlot(i);
|
||||
if (!pVehicle)
|
||||
continue;
|
||||
@ -2226,6 +2234,8 @@ void CGarages::SetAllDoorsBackToOriginalHeight()
|
||||
default:
|
||||
aGarages[i].RefreshDoorPointers(true);
|
||||
if (aGarages[i].m_pDoor1) {
|
||||
aGarages[i].m_pDoor1->GetMatrix().GetPosition().x = aGarages[i].m_fDoor1X;
|
||||
aGarages[i].m_pDoor1->GetMatrix().GetPosition().y = aGarages[i].m_fDoor1Y;
|
||||
aGarages[i].m_pDoor1->GetMatrix().GetPosition().z = aGarages[i].m_fDoor1Z;
|
||||
if (aGarages[i].m_pDoor1->IsObject())
|
||||
((CObject*)aGarages[i].m_pDoor1)->m_objectMatrix.GetPosition().z = aGarages[i].m_fDoor1Z;
|
||||
@ -2235,6 +2245,8 @@ void CGarages::SetAllDoorsBackToOriginalHeight()
|
||||
aGarages[i].m_pDoor1->UpdateRwFrame();
|
||||
}
|
||||
if (aGarages[i].m_pDoor2) {
|
||||
aGarages[i].m_pDoor2->GetMatrix().GetPosition().x = aGarages[i].m_fDoor2X;
|
||||
aGarages[i].m_pDoor2->GetMatrix().GetPosition().y = aGarages[i].m_fDoor2Y;
|
||||
aGarages[i].m_pDoor2->GetMatrix().GetPosition().z = aGarages[i].m_fDoor2Z;
|
||||
if (aGarages[i].m_pDoor2->IsObject())
|
||||
((CObject*)aGarages[i].m_pDoor2)->m_objectMatrix.GetPosition().z = aGarages[i].m_fDoor2Z;
|
||||
|
@ -859,7 +859,7 @@ CPathFind::PreparePathDataForType(uint8 type, CTempNode *tempnodes, CPathInfoFor
|
||||
mag = Sqrt(dx*dx + dy*dy);
|
||||
dx /= mag;
|
||||
dy /= mag;
|
||||
int width = Max(m_pathNodes[i].width, m_pathNodes[j].width);
|
||||
uint8 width = Max(m_pathNodes[i].width, m_pathNodes[j].width);
|
||||
if(i < j){
|
||||
dx = -dx;
|
||||
dy = -dy;
|
||||
|
@ -120,7 +120,7 @@ struct CCarPathLink
|
||||
uint8 trafficLightDirection : 1;
|
||||
uint8 trafficLightType : 2;
|
||||
uint8 bBridgeLights : 1; // at least in LCS...
|
||||
int8 width;
|
||||
uint8 width;
|
||||
|
||||
CVector2D GetPosition(void) { return CVector2D(x/8.0f, y/8.0f); }
|
||||
CVector2D GetDirection(void) { return CVector2D(dirX/100.0f, dirY/100.0f); }
|
||||
@ -151,7 +151,7 @@ struct CPathInfoForObject
|
||||
int8 numLeftLanes;
|
||||
int8 numRightLanes;
|
||||
int8 speedLimit;
|
||||
int8 width;
|
||||
uint8 width;
|
||||
|
||||
uint8 crossing : 1;
|
||||
uint8 onlySmallBoats : 1;
|
||||
@ -177,7 +177,7 @@ struct CTempNode
|
||||
int16 link2;
|
||||
int8 numLeftLanes;
|
||||
int8 numRightLanes;
|
||||
int8 width;
|
||||
uint8 width;
|
||||
bool isCross;
|
||||
int8 linkState;
|
||||
};
|
||||
@ -188,7 +188,7 @@ struct CTempNodeExternal // made up name
|
||||
int16 next;
|
||||
int8 numLeftLanes;
|
||||
int8 numRightLanes;
|
||||
int8 width;
|
||||
uint8 width;
|
||||
bool isCross;
|
||||
};
|
||||
|
||||
|
@ -1701,6 +1701,7 @@ int8 CRunningScript::ProcessCommands700To799(int32 command)
|
||||
pBoat->AutoPilot.m_nCarMission = MISSION_GOTOCOORDS_ASTHECROWSWIMS;
|
||||
pBoat->AutoPilot.m_vecDestinationCoors = pos;
|
||||
pBoat->SetStatus(STATUS_PHYSICS);
|
||||
pBoat->bEngineOn = true;
|
||||
pBoat->AutoPilot.m_nCruiseSpeed = Max(1, pBoat->AutoPilot.m_nCruiseSpeed);
|
||||
pBoat->AutoPilot.m_nAntiReverseTimer = CTimer::GetTimeInMilliseconds();
|
||||
return 0;
|
||||
|
@ -431,12 +431,12 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
|
||||
CPed* pPed = CPools::GetPedPool()->GetAt(ScriptParams[0]);
|
||||
script_assert(pPed);
|
||||
if (ScriptParams[1]) {
|
||||
pPed->bIsDucking = true;
|
||||
pPed->bCrouchWhenShooting = true;
|
||||
pPed->SetDuck(ScriptParams[2], true);
|
||||
}
|
||||
else {
|
||||
pPed->ClearDuck(true);
|
||||
pPed->bIsDucking = false;
|
||||
pPed->bCrouchWhenShooting = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user