Skip to content

[ZH] Previously introduced hashmap in PR676 is causing mismatches in replays with AI players #733

Closed
@roossienb

Description

@roossienb

Prerequisites

  • I have searched for similar issues and confirmed this is not a duplicate

Game Version

  • Command & Conquer Generals
  • Command & Conquer Generals: Zero Hour
  • Other (please specify below)

Bug Description

The main branch is no longer compatible with vanilla build of Zero Hour. Replays that have been created in vanilla with at least 1 AI player (skirmish or MP) will mismatch in builds created from commit 4fe88de and later
The cause is the switch from vectors to hashmaps in PR 676 created by @Mauller

The hashmap in GameClient is fine. It is the hashmap in GameLogic that causes the issue

I tried having both the vector and hashmap next to each other for logging purposes, but then frequently in doesn't mismatch. This makes it difficult to find what the cause of the mismatch is. Educated guess this has something to do with destructor kind of stuff.

The problem only occurs for VC6 builds. For VS2022 builds, there is no compatibility between version that are created pre- and post this PR. This was tested by @ZenBre4ker

I recommend reverting the hashmap implementation for now to ensure compatibility and giving us time.

Reproduction Steps

Use any replay created with vanilla or a build from commit e5243f1 or earlier.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working right⚠️ TriageIssues requiring initial review and prioritization

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions