View Single Post
HarryPotter
Veteran Member
Join Date: Sep 2017
Location: Taiwan, Asia
Old 04-26-2022 , 21:25   Re: [ANY] Hit Registration Fix Plugin (bullet displacement by 1 tick)
Reply With Quote #107

Quote:
Originally Posted by Krevik View Post
Remember not to use this plugin with l4d2 - it breaks physics therefore tank hittables are flying totally random
Because in l4d2, you have to check if attacker is survivor.
PHP Code:
public MRESReturn Weapon_ShootPosition_Post(int clientHandle hReturn)
{
    if (
IsSurvivor(client)) 
    {
        
// At this point we always want to use our old origin.
        
DHookSetReturnVector(hReturng_vecOldWeaponShootPos[client]);
        return 
MRES_Supercede;
    }
    return 
MRES_Ignored;
}

public 
bool IsSurvivor(client)
{
    return 
client && client <= MaxClients && IsClientInGame(client) && GetClientTeam(client) == 2;

firebulletsfix for L4D1&2 --> click me to download
__________________

Last edited by HarryPotter; 09-05-2023 at 18:56.
HarryPotter is offline