Skip to content

[GEN][ZH] PoisonedBehavior damage over time ignores POISON resistance #1616

@alanblack166

Description

@alanblack166

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

Despite being triggered by POISON damage, and by design, needing to deliver POISON damage to the target, the UpdateSleepTime PoisonedBehavior::update() method is set to use UNRESISTABLE damage instead.

The developer comments explain that this is to prevent the module from being triggered again by its own damage.

The void PoisonedBehavior::onDamage( DamageInfo *damageInfo ) method needs to check for m_sourceID of the object that dealt damage, and prevent it from being triggered by damage that originates from itself.

You may refer to this commit from the modding fork for potential inspiration.

Reproduction Steps

  1. Research Toxin Shells for GLA (most straightforward way to deal a miniscule amount of POISON damage)
  2. Attack USA infantry upgraded Chemical Suits once, just to trigger the anthrax field from the shell
  3. Observe that the damage over time is significantly higher than it should be given the POISON damage resistance of Chemical Suits

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugSomething is not working right, typically is user facingGenRelates to GeneralsMinorSeverity: Minor < Major < Critical < BlockerUnit AIIs related to unit behaviorZHRelates to Zero Hour

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions