Skip to content

Commit

Permalink
Small improvements for #3592 (#3792)
Browse files Browse the repository at this point in the history
  • Loading branch information
FileEX authored Oct 13, 2024
1 parent d2f62b8 commit f1991d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
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

0 comments on commit f1991d0

Please sign in to comment.