Fix building materials and road/aqueduct rotation for remote players
Add UpdateMaterialSelection() and UpdateRotation() calls after building placement to fix visual issues when host views client's buildings. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -125,6 +125,23 @@ namespace KCM.Packets.Game.GameWorld
|
||||
Main.helper.Log("unpack stage 2");
|
||||
structureData.UnpackStage2(building);
|
||||
|
||||
// Update materials/textures for correct display
|
||||
building.UpdateMaterialSelection();
|
||||
|
||||
// Update road rotation for proper visuals
|
||||
Road roadComp = building.GetComponent<Road>();
|
||||
if (roadComp != null)
|
||||
{
|
||||
roadComp.UpdateRotation();
|
||||
}
|
||||
|
||||
// Update aqueduct rotation
|
||||
Aqueduct aqueductComp = building.GetComponent<Aqueduct>();
|
||||
if (aqueductComp != null)
|
||||
{
|
||||
aqueductComp.UpdateRotation();
|
||||
}
|
||||
|
||||
building.SetVisibleForFog(false);
|
||||
|
||||
Main.helper.Log("Landmass owner take ownership");
|
||||
|
||||
Reference in New Issue
Block a user