Skip to content
Permalink
Browse files

Trailer sync fix (#1247)

  • Loading branch information
tederis committed Feb 10, 2020
1 parent 198c813 commit 69c36880eac924092d9f63901c3cf059af74fd3e
@@ -24,7 +24,7 @@ CWorldSA::CWorldSA()
m_pDataBuildings = new std::multimap<unsigned short, sDataBuildingRemovalItem*>;
m_pBinaryBuildings = new std::multimap<unsigned short, sBuildingRemovalItem*>;

m_pSurfaceInfo = reinterpret_cast<CSurfaceType*>(ARRAY_SurfaceInfos);
m_pSurfaceInfo = reinterpret_cast<CSurfaceType*>(ARRAY_SurfaceInfos);

InstallHooks();
}
@@ -1362,7 +1362,7 @@ bool CWorldSA::CalculateImpactPosition(const CVector& vecInputStart, CVector& ve
MemPutFast<DWORD>(0xB7CD71, 0);
return false;
}


namespace
{
const unsigned char aOriginalSurfaceInfo[2292] = {
@@ -1272,7 +1272,7 @@ void CClientGame::DoPulses()
UpdateVehicleInOut();
UpdatePlayerTarget();
UpdatePlayerWeapons();
// UpdateTrailers (); // Test: Does it always work without this check?
UpdateTrailers (); // Test: Does it always work without this check?
UpdateStunts();
// Clear last damager if more than 2 seconds old
if (CClientTime::GetTime() - m_ulDamageTime > 2000)
@@ -2301,7 +2301,7 @@ void CClientVehicle::StreamedInPulse()
{
// Force the position to the last remembered matrix (..and make sure gravity doesn't pull it down)

if (GetVehicleType() != CLIENTVEHICLE_TRAIN || IsDerailed())
if (!m_pTowedByVehicle && (GetVehicleType() != CLIENTVEHICLE_TRAIN || IsDerailed()))
{
m_pVehicle->SetMatrix(&m_matFrozen);
CVector vec(0.0f, 0.0f, 0.0f);

0 comments on commit 69c3688

Please sign in to comment.
You can’t perform that action at this time.