Has anyone tried adding more info_survivor_position in other maps to see if this fixes it?
Edit: So I modified this plugin a bit;
Quote:
Originally Posted by Shadowysn
A long time ago, I made a private plugin that attempts to prevent Survivors from dying or getting incapped when the rescue cutscene plays.
It even adds extra info_survivor_position entities to The Sacrifice finale, but only for 8 survivors.
Maybe in the future, it could be updated to visually hide the survivors via SetTransmit or teleport the rest to a survivor that's already set to a position.
I modified the check done for The Sacrifice finale, instead I check entities for a valid info_survivor_position entity, I store the position of the first one found, and then made the extra ones use that position instead of the hardcoded one in the plugin, so far testing with bots it seems to have worked?
Screenshot
In this same exact finale before with real players, we had the bug.
Edited Code
PHP Code:
#pragma newdecls required
#pragma semicolon 1
#include <sourcemod>
#include <sdktools>
#define PLUGIN_NAME_SHORT "Finale Finish Godmode"
#define PLUGIN_NAME "[L4D2] Finale Finish Godmode"
#define PLUGIN_AUTHOR "Shadowysn"
#define PLUGIN_DESC "Give godmode to survivors upon finale vehicle leaving."
#define PLUGIN_VERSION "1.0.0"
#define PLUGIN_URL ""
//releaseFromPos = CreateConVar("sm_finalefinish_start_releasefrompos", "1.0", "Release survivors from position on start?", FCVAR_ARCHIVE, true, 0.0, true, 1.0);
int finale_ent = FindEntityByClassname(-1, "trigger_finale");
int finale_ent_dlc3 = FindEntityByClassname(-1, "trigger_finale_dlc3");
if (!IsValidEntity(finale_ent) || IsValidEntity(finale_ent_dlc3)) return;
bool isSacrificeFinale = view_as<bool>(GetEntProp(finale_ent, Prop_Data, "m_bIsSacrificeFinale"));
if (isSacrificeFinale) return;
for (int loopclient = 1; loopclient <= MAXPLAYERS; loopclient++) {
if (!IsValidClient(loopclient)) continue;
if (!IsSurvivor(loopclient) || !IsPlayerAlive(loopclient)) continue;
int takedamage = GetEntProp(loopclient, Prop_Data, "m_takedamage");
if (takedamage <= 0) continue;
SetEntProp(loopclient, Prop_Send, "m_currentReviveCount", GetConVarInt(FindConVar(CVAR_INCAPMAX)));
SetEntProp(loopclient, Prop_Data, "m_takedamage", 0);
}
}
bool IsValidClient(int client, bool replaycheck = true)
{
if (!IsValidEntity(client)) return false;
if (client <= 0 || client > MaxClients) return false;
if (!IsClientInGame(client)) return false;
//if (GetEntProp(client, Prop_Send, "m_bIsCoaching")) return false;
if (replaycheck)
{
if (IsClientSourceTV(client) || IsClientReplay(client)) return false;
}
return true;
}
bool IsSurvivor(int client)
{
if (!IsValidClient(client)) return false;
if (GetClientTeam(client) == 2) return true;
return false;
}