View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 07-18-2020 , 11:44   Re: [L4D1 AND L4D2] Survivor Respawn
Reply With Quote #9

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_DeadSurvivorVisibleEvent hEvent, const char[] sNamebool bDontBroadcast )
{    
    
int DeadBody hEvent.GetInt"subject" );
    
int DeadPlayer GetClientOfUserIdhEvent.GetInt"deadplayer" ) );
    
    if ( !
DeadPlayer || !DeadBody 
        return;
    
    if ( 
IsFakeClientDeadPlayer ) )                 return;
    else if ( 
GetClientTeamDeadPlayer ) != )     return;
    else if ( 
IsPlayerAliveDeadPlayer ) )         AcceptEntityInputDeadBody"Kill" );
    
//    PrintToChatAll( "\x03%N\x01's body has been removed", DeadPlayer ); // Test.
//    PrintToChatAll( "\x03%i \x01Client Index", DeadBody ); // Test.

__________________

Last edited by HarryPotter; 07-20-2020 at 19:06.
HarryPotter is offline