Page MenuHomeFeedback Tracker

Transformations of world entities do not replicate
Assigned, NormalPublic

Description

If an entity is created in the World Editor, transformations performed in-game via scripts affect the authority but are not replicated on proxy machines.

This is problematic because proxies joining in-progress will not share the current state of these entities. You can have the proxy transform the entity itself, but this will be wildly out of sync based on how long the authority has been running before the proxy joins.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
General
Steps To Reproduce

Create a world:
world.ent

SubScene {
 Parent "worlds/Eden/Eden.ent"
}
Layer default {
 Index 0
}

Add entities with RplComponents in the world, and in Gamemode's OnFrame, transform entities only on the Authority side.

world_default.layer

SCR_BaseGameMode Gamemode : "{0F307326459A1395}Prefabs/MP/Modes/GameMode_Base.et" {
 components {
  SCR_RespawnHandlerComponent "{5A096710495BB28A}" {
  }
 }
 coords 6306.169 150.171 6328.887
 userScript "   float m_fScale = 1;"
 EOnFrame ""\
 "              if (Replication.IsClient()) return;"\
 "              m_fScale += timeSlice / 8;"\
 "              IEntity sign = GetGame().GetWorld().FindEntityByName(\"sign\");"\
 "              sign.SetScale(m_fScale);"\
 "              sign.Update();"\
 "              "\
 "              IEntity magazine = GetGame().GetWorld().FindEntityByName(\"magazine\");"\
 "              magazine.SetOrigin(magazine.GetOrigin() + (\"0.1 0 0\" * timeSlice) );"\
 "              "\
 "              vector transform[4];"\
 "              magazine.GetWorldTransform(transform);"\
 "              transform[3] = transform[3] + (\"0 0 0.1\" * timeSlice);"\
 "              magazine.SetWorldTransform(transform);"\
 "              "\
 "              magazine.Update();"\
 "      "
}

Test with PeerTool. The transformations will affect the default running game, but the PeerTool window will not feature the changes.

Additional Information

I've also tested setting RplProp on various properties in my Gamemode entity, and none of these seeem to replicate either.

Event Timeline

da-ding created this task.Fri, Aug 5, 12:08 PM
da-ding renamed this task from Transformation of world entities do not replicate to Transformations of world entities do not replicate.Fri, Aug 5, 3:32 PM
Geez changed the task status from New to Assigned.Mon, Aug 8, 11:04 PM