• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Game Feedback
  • /ARGF-965
Back
1

Broken contextTemplate in SCR_DamageManagerComponent

Character
1

State

Open
Issue key
ARGF-965
Access
Public
Space
Arma Reforger
Project
Game Feedback
Creator
gramps
Created
Dec 5, 2026
Views
2
Platform
PC
Game Version
1.9.0.42
Mission
—
Is it modded?
no
Description

In HealHitZones() when contextTemplate is null, the fallback fails. Assign it to a local variable and it works fine. In the example below, when contextTemplate is null, damageEffect still returns null after the fallback and causes a VME.

if (!contextTemplate)
{
	vector hitPosDirNorm[3];
	contextTemplate = SCR_DamageContext(EDamageType.HEALING, 0, hitPosDirNorm, GetOwner(), null, null, null, 0, 0);
}

if (!contextTemplate.damageEffect)
	contextTemplate.damageEffect = new SCR_HealingDamageEffect();

If you use a local variable, it works just fine. Suggested fix, create local context and replace all instances of contextTemplate with context as follows:

SCR_DamageContext context = contextTemplate;
if (!context)
{
	vector hitPosDirNorm[3];
	context = SCR_DamageContext(EDamageType.HEALING, 0, hitPosDirNorm, GetOwner(), null, null, null, 0, 0);
}

if (!context.damageEffect)
	context.damageEffect = new SCR_HealingDamageEffect();

if (sequential)
	healthToDistribute = HealHitZonesInSequence(healthToDistribute, maxHealThresholdScaled, targetHitZones, context);
else // if in Parallel
	healthToDistribute = HealHitZonesInParallel(healthToDistribute, maxHealThresholdScaled, targetHitZones, context);
Reactions

Activity

    21 minutes ago
  • gramps
    created issue21 minutes ago

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

State

Open
Issue key
ARGF-965
Access
Public
Space
Arma Reforger
Project
Game Feedback
Creator
gramps
Created
Dec 5, 2026
Views
2