Page MenuHomeFeedback Tracker

JIP damage is inconsistent with the server for both pre-placed objects and dynamically spawned ones
Feedback, NormalPublic

Description

JIP damage is inconsistent with the server, for both pre-placed objects and spawned through the game.

Pre-placed objects, If you change the damage through script, it doesn't sync it properly:

  • HandleDamage syncs damage to current clients properly, but not for JIP
  • setHit* command don't sync at all

Dynamically spawned objects sync damage properly for both normal and scripted damage, but a bit imprecise for some reason.

Details

Severity
Major
Resolution
Open
Reproducibility
Always
Operating System
Windows 10 x64
Category
Multiplayer
Steps To Reproduce
  1. Run attached mission as listen server
  2. Start the mission until you're controlling your character
  3. Join the server with another client
  4. Observe damage being different for both static and dynamic buildings
Additional Information

Main issue for me in this ticket is HandleDamage broadcasting damage to current clients but not JIP, this results in JIP seeing completely different picture from other clients, like them having no building at all because its dead for JIP but alive for other clients. HandleDamage used in repro mission is used to only allow damage to glass hit points, but ends up creating nasty desync situations like these:

Players being inside building that doesn't exist for JIP:

Ruins inside alive building:

Event Timeline

SaMatra created this task.May 18 2023, 5:20 PM
This comment was removed by Geez.
Geez added a subscriber: Geez.Jun 19 2023, 9:45 AM

HandleDamage is an event handler how can it broadcast anything?

BIS_fnc_KK changed the task status from New to Feedback.Nov 5 2023, 2:22 PM
BIS_fnc_KK changed the task status from Feedback to Need More Info.
SaMatra added a comment.EditedNov 5 2023, 3:02 PM

HandleDamage is an event handler how can it broadcast anything?

Engine broadcasts result of HandleDamage at some point, not the event handler itself. The issue is that engine seems to ignore result of HandleDamage when storing damage values for map objects that will be sent to JIP clients, but correctly broadcasts them for existing clients. Logic:

  • Building get damaged, should get 0.2 damage
  • HandleDamage fires, adjusts damage to 0.1
  • Engine broadcasts updated damage of 0.1 to existing clients
  • Future JIP clients will still get original unmodified 0.2 damage

Attached repro mission has this shown.

BIS_fnc_KK changed the task status from Need More Info to Assigned.
BIS_fnc_KK set Ref Ticket to AIII-56153.Dec 22 2023, 5:07 PM

Revision: 151240 Static buldings fix

HandleDamage and static buildings is a won’t fix, but might fix setHitxxx instead

HandleDamage and static buildings is a won’t fix, but might fix setHitxxx instead

Why leave it bugged for JIP? Too hard to fix? Do you suggest manually setHit'ing applied damage on server to make it JIP compatible? Will this work?

handledamage alters damage locally after all the networking is done but thats not all. static building damage isaccumulative dam = olddam + newdam, now say new damage is 0 because you handed it, see where Im going? setHit is actually implementable

handledamage alters damage locally after all the networking is done but thats not all. static building damage isaccumulative dam = olddam + newdam, now say new damage is 0 because you handed it, see where Im going? setHit is actually implementable

A command to force broadcast static building state to all clients and future JIP perhaps?

broadcastEntityState ENTITY which only works on primary entities (static buildings). This way I could at least script-queue this update on server side and broadcast it next frame? Or just for JIP since its the main issue?

Revision: 151241 repairing static building now repairs hitpoints for JIP as well

Revision: 151244

forceHitpointsDamageSync command
non-static building should now have the same values not nearly the same

BIS_fnc_KK removed BIS_fnc_KK as the assignee of this task.Dec 27 2023, 3:40 PM
BIS_fnc_KK changed the task status from Assigned to Feedback.