AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugin/Gameplay Ideas and Requests (https://forums.alliedmods.net/forumdisplay.php?f=60)
-   -   [L4D2]Survivor_Legs remove two entities/clone when smoked (https://forums.alliedmods.net/showthread.php?t=333912)

ddd123 08-16-2021 21:17

[L4D2]Survivor_Legs remove two entities/clone when smoked
 
I'm using [L4D2]Survivor_Legs(1.5.2 - 20/09/20) and almost always you can see a "clone(survivor model)"(aka the leg you see on firstperson view) when i get choked or pulled by smoker

I'd rather edit to remove the clone when you get attacked by smoker (since is not like i'm viewing my camera to ground when i get pulled and i get force to view thirdperson when i get choked) and back to normal again when i escape pulled/choked from smoker
Or better, remove it when the camera switch into thirdperson view

But i don't know how and i need someone help

Marttt 08-17-2021 10:04

Re: [L4D2]Survivor_Legs remove two entities/clone when smoked
 
Didn't test but you can try searching some smoker/tongue netprops.

I found these, check if returns some usefull result.
Code:

  Member: m_tongueVictim (offset 13268) (type integer) (bits 21) (Unsigned|NoScale)
  Member: m_tongueOwner (offset 13272) (type integer) (bits 21) (Unsigned|NoScale)
  Member: m_isHangingFromTongue (offset 13296) (type integer) (bits 1) (Unsigned)
  Member: m_reachedTongueOwner (offset 13297) (type integer) (bits 1) (Unsigned)
  Member: m_isProneTongueDrag (offset 13304) (type integer) (bits 1) (Unsigned)


ddd123 08-28-2021 14:49

Re: [L4D2]Survivor_Legs remove two entities/clone when smoked
 
1 Attachment(s)
Update:
Okay, i redid the Marttt code(Thank you btw!) and solve spam console error by myself
Now i need to know how to delay the reappear the clone after hiding since i still can see the clone short time after third person view go to first person view (What i mean is the camera zooming in player and back to first person view)

What i did and added
Code:

static bool ShouldHideLegs(int iClient)
{
        if(bThirdPerson[iClient])
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_hZoomOwner") == iClient)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_hViewEntity") > 0)
                return true;
        if(GetEntPropFloat(iClient, Prop_Send, "m_TimeForceExternalView") > GetGameTime())
                return true;
        if(GetEntProp(iClient, Prop_Send, "m_iObserverMode") == 1)
                return true;
        if(GetEntProp(iClient, Prop_Send, "m_isIncapacitated") > 0)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_pummelAttacker") > 0)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_carryAttacker") > 0)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_pounceAttacker") > 0)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_jockeyAttacker") > 0)
                return true;
        if(GetEntProp(iClient, Prop_Send, "m_isHangingFromLedge") > 0)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_reviveTarget") > 0)
                return true; 
        if(GetEntPropFloat(iClient, Prop_Send, "m_staggerTimer", 1) > -1.0)
                return true;
        if(GetEntPropEnt(iClient, Prop_Send, "m_tongueOwner") > 0) //added
                return true;
        if(GetEntProp(iClient, Prop_Send, "m_isHangingFromTongue") > 0) //added
                return true;
        if(GetEntProp(iClient, Prop_Send, "m_reachedTongueOwner") > 0) //added
                return true;
        if(GetEntProp(iClient, Prop_Send, "m_isProneTongueDrag") > 0) //added
                return true;
        switch(GetEntProp(iClient, Prop_Send, "m_iCurrentUseAction"))
        {


Can anyone please teach me how delay the entities or something?


All times are GMT -4. The time now is 08:17.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.