saltyhotdog / BattletechIssueTracker

Public issue tracker to communicate with modders and HBS.
MIT License
6 stars 0 forks source link

Despawned mechs count as killed #8

Closed Morphyum closed 6 years ago

Morphyum commented 6 years ago

Describe the problem Despawned mechs get handled by the game as a killed mech. That only does not make a problem in vanilla, because the perma death option also checks for CT destroyed. Since my mod removes the CT check all despawned mechs(Extraction Zone) will count as dead too.

Provide an example of the code where the problem occurs In AbstractActor:

public virtual void FlagForDeath(string reason, DeathMethod deathMethod, int location, int stackItemID, string attackerID, bool isSilent)
        {
            if (!this._flaggedForDeath)
            {
                string message = this.BuildLogMessage(string.Format("{0} FLAGGED FOR DEATH! Reason: {1}", this.LogDisplayName, reason));
                AbstractActor.attackLogger.Log(message, this.GameRep);
                this._flaggedForDeath = true;

The flagged for death gets set to true even so the DeathMethod is despawn.

Provide an example of your proposed solution I don't know if this flag is important for the despawn somewhere else, but if not, the fix is a simple check for Deathmethod before setting the flag.

I would suggest looking at this, because it feels not right that escaped mechs get handled as dead by the code, this might lead to unexpected problems in upcoming patches and DLCs.

saltyhotdog commented 6 years ago

Flagging HBS Ready due to clear description of the problem. If we need more clarification for a proposed solution please tag as "Not Ready"

caardappel-hbs commented 6 years ago

IsFlaggedForDeath is used to determine availability by the turn manager. Updating this is a larger refactor and is unlikely to be addressed until future features require it. This ticket has been forwarded to the combat team for deeper assessment.

Morphyum commented 6 years ago

Closed for now, since this was only a warning for HBS and they received it.