Skip to content

Clear one ally bit, not the whole record, in Make_Enemy #79

Description

@ZivDero

HouseClass::Make_Enemy (code/house.cpp) clears the scenario-supplied ally record with Control.Allies &= !(1L << house->HeapID); — logical negation where bitwise complement was meant. For any house the expression evaluates to 0 or 1, so breaking one alliance during scenario setup erases the entire recorded mask (or all but bit zero) instead of the one bit.

The neighboring bilateral branch uses ~ correctly but clears this->Control.Allies where the other house's record looks intended; verify both against the original executable before fixing, since Control.Allies is serialized state and the ally record feeds scenario restarts.

Found by source audit during the client-launch work; not triggered by it (the launch path only makes allies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions