I found a bug when playing l4d2 5+ players !!
It removes the player's body when dead,
player can't use defibrillator to save player's body that has disappeared automatically.
People can use
Defib_Fix[Left 4 Fix] instead to prevent bugs with the defibrillator.
I remove the following code and no bugs happen anymore.
PHP Code:
if ( bL4D2 )
HookEvent("dead_survivor_visible", Event_DeadSurvivorVisible);
public void Event_DeadSurvivorVisible( Event hEvent, const char[] sName, bool bDontBroadcast )
{
int DeadBody = hEvent.GetInt( "subject" );
int DeadPlayer = GetClientOfUserId( hEvent.GetInt( "deadplayer" ) );
if ( !DeadPlayer || !DeadBody )
return;
if ( IsFakeClient( DeadPlayer ) ) return;
else if ( GetClientTeam( DeadPlayer ) != 2 ) return;
else if ( IsPlayerAlive( DeadPlayer ) ) AcceptEntityInput( DeadBody, "Kill" );
// PrintToChatAll( "\x03%N\x01's body has been removed", DeadPlayer ); // Test.
// PrintToChatAll( "\x03%i \x01Client Index", DeadBody ); // Test.
}
__________________