• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Stable Feedback
  • /DZG-1544
Back
1

SymptomSyncData.Serialize reads instead of writes, so the faint and irritated-eyes parameters arrive empty on the client

CharacterBugErrorClient
1

State

Open
Issue key
DZG-1544
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
bench
Created
Oct 19, 2026
Views
11
Platform
Playstation
What happened?

scripts/4_World/Classes/PlayerSymptoms/StateManager.c lines 50-102: the new SymptomSyncData : Param is sent server → client in RPC_SYMPTOM_PARAM_SYNC by FaintSymptom.SetParam (FaintState.c:52) and IrritatedEyes.SetParam (IrritatedEyes.c:26). Its Serialize(Serializer ctx) calls ctx.Read(i) instead of ctx.Write(i), and it never writes the array lengths. Both Serialize and Deserializer loop over the class's own arrays, which are always empty on the receiving side. The float loop also uses foreach (int f : m_FloatArray), which truncates the values to integers.

On the client, StateManager.c:684-686 reads into an empty SymptomSyncData and calls SetParam. FaintState.c:32 then reads faintData.m_IntArray[0] from an empty array.

Reproduction steps
  1. Get a character's thermal bias high enough to trigger heat stroke, for example by sprinting in heavy clothing in the Nasdara heat.

  2. Wait for a faint event.

  3. The faint vignette doesn't appear on the client, and the client script log shows an array index error in FaintSymptom.SetParam. Irritated eyes in a sandstorm behaves the same way.

Exact build version (optional)
1.30.164078
Where did it happen?
Community
Is it modded?
No
Expected result

Expected result: The client receives the int and float values and plays the faint or irritated-eyes effect.

Actual result: The client receives empty data, no effect plays, and a script error is logged.

Suggested fix: Write the array lengths and values, then read them back:

override bool Serialize(Serializer ctx)
{
    if (!ctx.Write(m_IntArray.Count())) return false;
    foreach (int i : m_IntArray)   if (!ctx.Write(i)) return false;
    if (!ctx.Write(m_FloatArray.Count())) return false;
    foreach (float f : m_FloatArray) if (!ctx.Write(f)) return false;
    return true;
}

override bool Deserializer(Serializer ctx)
{
    int n; float fv; int iv;
    if (!ctx.Read(n)) return false;
    m_IntArray.Clear();
    for (int a = 0; a < n; a++) { if (!ctx.Read(iv)) return false; m_IntArray.Insert(iv); }
    if (!ctx.Read(n)) return false;
    m_FloatArray.Clear();
    for (int b = 0; b < n; b++) { if (!ctx.Read(fv)) return false; m_FloatArray.Insert(fv); }
    return true;
}

Also guard FaintState.SetParam and IrritatedEyes.SetParam with if (faintData && faintData.m_IntArray.Count() > 0).

Possibly related: DZG-1425, "Nasdara - heatstroke issues, and killed in sandstorm(?)".

Reactions

Activity

    about 5 hours ago
  • bench
    created issueabout 5 hours ago

You are not signed in. Please sign in to see more details and to reply.

State

Open
Issue key
DZG-1544
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
bench
Created
Oct 19, 2026
Views
11