Skip to content

Soldiers play 'squadmate dead' voicelines when a mimic beacon is killed #1501

@BlackDog86

Description

@BlackDog86

Squadmate dead voicelines are handled in XGUnit::OnDeath -

There is no check in the dead unit visualizer (in this case 'self') that the squad member is someone whose death we should care about. As a minimum, we should introduce a check something like if(self.GetVisualizedGameState.GetMyTemplateName() != 'MimicBeacon' etc. before doing SurvivingUnit.UnitSpeak.

Apparently there are also other possible scenarios where this can happen - it would be good to understand what these are so we can properly guard them.

private function DelaySpeechSquadMemberDead()
{
	local XGUnit	SurvivingUnit;	

	SurvivingUnit = GetSquad().GetNextGoodMember();
	
	if (SurvivingUnit != none && !IsRobotic() && !IsAlien_CheckByCharType())
	{
		SurvivingUnit.UnitSpeak( 'SquadMemberDead' );
	}
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions