Opened 12 years ago
Closed 11 years ago
#1681 closed defect (fixed)
Serialization test fails due to projectiles
Reported by: | historic_bruno | Owned by: | Jonathan Waller |
---|---|---|---|
Priority: | Must Have | Milestone: | Alpha 12 |
Component: | Core engine | Keywords: | |
Cc: | Jonathan Waller | Patch: |
Description
Apparently projectiles are using model (VisualActor) data that influences the simulation via a projectileID. Models shouldn't influence the simulation because they aren't synchronization safe, but this test in particular is failing because it creates a secondary simulation to compare the predicted simulation state with the actual one. This secondary simulation has no visual components, which would cause e.g. CCmpProjectileManager::LaunchProjectile
to silently return 0 for an ID, which wouldn't match up with the actual projectileID.
It's very easy to reproduce this:
- set
CSimulation2Impl::m_EnableSerializationTest
totrue
and rebuild - create a test scenario with a ranged unit
- attack a target, and the test fails
I'm attaching the oos logs anyway, and here is the diff between the debug state logs:
--- debug.after.a 2012-09-24 17:32:36.730352300 -0400 +++ debug.after.b 2012-09-24 17:32:27.636832200 -0400 @@ -69430,7 +69430,7 @@ "x": 0.9986754490469063, "z": 0.051452380615089145 }, - "projectileId": 1 + "projectileId": 0 } ], "8": [ @@ -69451,7 +69451,7 @@ "x": -0.9993504712481683, "z": 0.03603658718668677 }, - "projectileId": 2 + "projectileId": 0 } ] }
Attachments (1)
Change History (4)
by , 12 years ago
Attachment: | oos_log.zip added |
---|
comment:2 by , 12 years ago
Milestone: | Backlog → Alpha 12 |
---|---|
Priority: | Should Have → Must Have |
I'm thinking this is also the cause of OOS errors during rejoin (to reproduce, start a multiplayer game with no AIs but have some ranged unit attacks going on while the client disconnects and rejoins). Either the projectile code needs to be redesigned or the
projectileID
needs to be a non-synced variable somehow.