Skip to content
New issue

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

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

Already on GitHub? # to your account

Fixed beams not visible after spawn. #2722

Merged
merged 1 commit into from
Mar 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion source/main/physics/ActorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
}
Expand Down