Skip to content

Small improvements for #3592 #3792

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
5 changes: 3 additions & 2 deletions Client/game_sa/CVehicleSA.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1592,9 +1592,10 @@ bool CVehicleSA::SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComp
if (removalTime <= -1 || !componentObject)
return true;

std::uint32_t CTimer_ms = *reinterpret_cast<std::uint32_t*>(VAR_CTimer_snTimeInMilliseconds);
componentObject->uiObjectRemovalTime = CTimer_ms + static_cast<std::uint32_t>(removalTime);
// Set double-sided
componentObject->bBackfaceCulled = true;

componentObject->uiObjectRemovalTime = pGame->GetSystemTime() + static_cast<std::uint32_t>(removalTime);
return true;
}

Expand Down
2 changes: 0 additions & 2 deletions Client/game_sa/CVehicleSA.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ struct RwTexture;
#define OFFSET_CBike_Nodes 0x5A0
#define OFFSET_CBoat_Nodes 0x5B0

#define VAR_CTimer_snTimeInMilliseconds 0xB7CB84

struct SRailNodeSA
{
short sX; // x coordinate times 8
Expand Down
Loading