Skip to content

Support L4D(2) Friendly Fire In Basetriggers.sp #1522

@CanadianJeff

Description

@CanadianJeff

I was thinking something along the lines of????

	EngineVersion test = GetEngineVersion();
	if ( test == Engine_Left4Dead2 || test == Engine_Left4Dead ){
		g_Cvar_Difficulty = FindConVar("z_difficulty");
		char g_Difficulty[64];
		if (g_Cvar_Difficulty == "Easy"){g_Difficulty = "easy"}};
		if (g_Cvar_Difficulty == "Normal"){g_Difficulty = "normal"}};
		if (g_Cvar_Difficulty == "Hard"){g_Difficulty = "hard"}};
		if (g_Cvar_Difficulty == "Impossible"){g_Difficulty = "expert"}};
		g_Cvar_FriendlyFire = FindConVar("survivor_friendly_fire_factor_%s", g_Difficulty);
	} else {
		g_Cvar_FriendlyFire = FindConVar("mp_friendlyfire");
	}

the above code is broken and not even tested but the concept is there because L4D ignores mp_friendlyfire

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