From 7e0215069656ce82292029d9a84bb75be5cb1995 Mon Sep 17 00:00:00 2001 From: Petr Ohlidal Date: Tue, 30 Mar 2021 23:29:52 +0200 Subject: [PATCH] :bug: Fixed beams not visible after spawn if truck has no cinecam. --- source/main/physics/ActorManager.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/main/physics/ActorManager.cpp b/source/main/physics/ActorManager.cpp index bc2f6b8eea..8be53cfcdc 100644 --- a/source/main/physics/ActorManager.cpp +++ b/source/main/physics/ActorManager.cpp @@ -259,7 +259,10 @@ void ActorManager::SetupActor(Actor* actor, ActorSpawnRequest rq, std::shared_pt actor->ToggleLights(); actor->GetGfxActor()->SetDebugView((GfxActor::DebugViewType)rq.asr_debugview); - if (actor->isPreloadedWithTerrain() || rq.asr_origin == ActorSpawnRequest::Origin::CONFIG_FILE) + // perform full visual update only if the vehicle won't be immediately driven by player. + if (actor->isPreloadedWithTerrain() || // .tobj file - Spawned sleeping somewhere on terrain + rq.asr_origin == ActorSpawnRequest::Origin::CONFIG_FILE || // RoR.cfg or commandline - not entered by default + actor->ar_num_cinecams == 0) // Not intended for player-controlling { actor->GetGfxActor()->UpdateSimDataBuffer(); // Initial fill of sim data buffers @@ -268,6 +271,7 @@ void ActorManager::SetupActor(Actor* actor, ActorSpawnRequest rq, std::shared_pt actor->GetGfxActor()->UpdateCabMesh(); actor->GetGfxActor()->UpdateWingMeshes(); actor->GetGfxActor()->UpdateProps(0.f, false); + actor->GetGfxActor()->UpdateRods(); // beam visuals actor->GetGfxActor()->FinishWheelUpdates(); // Sync tasks from threadpool actor->GetGfxActor()->FinishFlexbodyTasks(); // Sync tasks from threadpool }