Raised This Month: $12 Target: $400
 3% 

[L4D/L4D2]ThirdPersonShoulder_Detect(1.5.3 - 08/06/2020)


Post New Thread Reply   
 
Thread Tools Display Modes
Author
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Plugin ID:
5665
Plugin Version:
1.5.3
Plugin Category:
Server Management
Plugin Game:
Left 4 Dead
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    Forwards the varable of c_thirdpersonshoulder client convar
    Old 06-19-2017 , 06:03   [L4D/L4D2]ThirdPersonShoulder_Detect(1.5.3 - 08/06/2020)
    Reply With Quote #1

    Simple Forwarding plugin so querying the client convar c_thirdpersonshoulder only happens once not multiple at once by otherplugins to lower client upstream, just by using a simple forward.

    PHP Code:
    /**
    *    @param     iClient            Client Index.
    *    @param     bIsThirdPerson    true = Is in thirdperson shoulder, false otherwise.
    */
    forward void TP_OnThirdPersonChanged(int iClientbool bIsThirdPerson); 
    Plugin Includes fixes when c_thirdpersonshoulder = true
    but client is still first person.

    Plugins that use this:
    [L4D/L4D2]Lux's Model Changer
    [L4D/L4D2] Shotgun Sound Fix
    [L4D2]Survivor_Legs

    GitHub
    Attached Files
    File Type: inc ThirdPersonShoulder_Detect.inc (315 Bytes, 5484 views)
    File Type: sp Get Plugin or Get Source (ThirdPersonShoulder_Detect.sp - 9274 views - 4.5 KB)
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 06-09-2020 at 03:48. Reason: Added "RegPluginLibrary("ThirdPersonShoulder_Detect")"
    Lux is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 06-27-2017 , 22:00   What's updated Pointer
    Reply With Quote #2

    update to 1.2 please refer to Github on code changes
    https://github.com/LuxLuma/-L4D-L4D2...a?diff=unified
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 07-18-2017 , 11:26   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.2.2 - 28/6/2017)
    Reply With Quote #3

    1.4
    Rolled back to more simple backend

    Alot of bug regarding map changing reporting invalid varables for non thirdperson should users i can't replicate it so until i can, i'm rolling back update.

    please refer to Github on code changes
    https://github.com/LuxLuma/-L4D-L4D2...f916ce7bfa0f84
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    ShineKia
    Junior Member
    Join Date: Apr 2017
    Old 04-27-2018 , 04:35   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.4 - 18/7/2017)
    Reply With Quote #4

    So I found a bug that sometimes when your teammate is incapped, you can see their drop down animation gets repeated more than several times. It has fixed the defib animation being two models though. Possible to fix right?
    ShineKia is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 04-27-2018 , 11:08   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.4 - 18/7/2017)
    Reply With Quote #5

    Quote:
    Originally Posted by ShineKia View Post
    So I found a bug that sometimes when your teammate is incapped, you can see their drop down animation gets repeated more than several times. It has fixed the defib animation being two models though. Possible to fix right?
    All this plugin does is query a cvar and forwards it query,
    also minor fixes to stop it being in your face, but does no checking at all with incapped stuff.

    What plugin are you talking about?
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    ShineKia
    Junior Member
    Join Date: Apr 2017
    Old 05-27-2018 , 07:27   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.4 - 18/7/2017)
    Reply With Quote #6

    I have no idea, I'm just reporting the problem I have to see if you might have a solution. So with the survivor_leg plugin, we'd have the defib animation being weird seeing multiple models of yourself when you wake up. After installing this, that problem is fixed, but sometimes when your teammate incapped, the drop down animation will repeat multiple times
    ShineKia is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 06-02-2018 , 07:59   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.4 - 18/7/2017)
    Reply With Quote #7

    dunno i don't mess with drop down anims on clients
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D
    Lux is offline
    axelnieves2012
    Senior Member
    Join Date: Oct 2014
    Location: Argentina
    Old 01-30-2019 , 15:14   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.4 - 18/7/2017)
    Reply With Quote #8

    can you please make a "3rd person detect" (for L4D1) too, please?
    Survivors can get into 3rd person when:
    # start healing
    # pounced by hunter
    # tied by smoker
    # stuned when a hunter pounces other survivor (in survival and vs mode).
    # stuned by boomer
    # stuned by witch
    #stuned by close explosion
    axelnieves2012 is offline
    Lux
    Veteran Member
    Join Date: Jan 2015
    Location: Cat
    Old 03-02-2019 , 22:57   RE: Dragokas
    Reply With Quote #9

    Quote:
    Originally Posted by axelnieves2012 View Post
    can you please make a "3rd person detect" (for L4D1) too, please?
    Survivors can get into 3rd person when:
    # start healing
    # pounced by hunter
    # tied by smoker
    # stuned when a hunter pounces other survivor (in survival and vs mode).
    # stuned by boomer
    # stuned by witch
    #stuned by close explosion
    This is just for querying "c_thirdpersonshoulder" clientcvar.

    Quote:
    Originally Posted by Dragokas View Post
    However, in that case, the name of the forward does not match the meaning. Why not make that forward do exactly how it is named, call the forward only once when person view mode is really changed instead of spamming.
    I changed this to match forward meaning,
    Even tho english is my native language i'm very bad at it

    Quote:
    Originally Posted by Dragokas View Post
    You are creating forward call every time QueryClientConVarCallback of "c_thirdpersonshoulder" is raised. It's incorrect. Because if you set third person view, next exit the server, next enter the server again, "c_thirdpersonshoulder" will be initially == 1, but player is in 1st person mode! As soon as I use command "thirdpersonshoulder", "c_thirdpersonshoulder" is changed to "0", but real person view is not changed and at the same time according your logic new forward will be created when it shouldn't. I see you are using some fix, but it is intended for "bIsThirdPerson" value correction only.
    Using "sm_map" will put you in firstperson, however using map_vote function built into l4d will leave you in firstperson this is apart of the fix.

    I only try to guarantee that they are first person to avoid any mishap with people who don't use thirdperson shoulder, as I can't guarantee weather they are in firstperson or thirdpersonshoulder I can only try to make a best guess, people who actively use thirdpersonshoulder should can always toggle again this is due to valve not matching the cvar with the clientview correctly.

    Thanks for your input i'v improved the plugin and optimized with reducing other plugins receiving forward calls.
    __________________
    Connect
    My Plugins: KlickME
    [My GitHub]

    Commission me for L4D

    Last edited by Lux; 03-02-2019 at 22:59.
    Lux is offline
    Dragokas
    Veteran Member
    Join Date: Nov 2017
    Location: Ukraine on fire
    Old 03-02-2019 , 16:26   Re: [L4D/L4D2]ThirdPersonShoulder_Detect(1.4 - 18/7/2017)
    Reply With Quote #10

    Quote:
    Originally Posted by Lux View Post
    ... so querying the client convar c_thirdpersonshoulder only happens once not multiple at once by otherplugins, just by using a simple forward.
    That is not correct at all.
    Otherplugins, using your plugin's forward, never query for that convar.
    And vice versa, your plugin query for that convar multiple times (once each 0.25 sec.).

    Also, I noticed several bugs when testing and when observing the source code.
    1) I don't see a description of your forward meaning. However "TP_OnThirdPersonChanged" - I think that should mean - call forward only once as soon as person view mode is changed.
    However, it is called infinite times for me (see screenshot) - L4d1. Test plugin:

    Code:
    #pragma semicolon 1
    #pragma newdecls required
    
    #include <sourcemod>
    
    public void TP_OnThirdPersonChanged(int iClient, bool bIsThirdPerson)
    {
    	PrintToChat(iClient, "3rd person is changed to: %b", bIsThirdPerson);
    }
    EDIT. Ok, I found description of forward: "Forwards the varable of c_thirdpersonshoulder client convar".
    However, in that case, the name of the forward does not match the meaning. Why not make that forward do exactly how it is named, call the forward only once when person view mode is really changed instead of spamming.

    2) You are creating forward call every time QueryClientConVarCallback of "c_thirdpersonshoulder" is raised. It's incorrect. Because if you set third person view, next exit the server, next enter the server again, "c_thirdpersonshoulder" will be initially == 1, but player is in 1st person mode! As soon as I use command "thirdpersonshoulder", "c_thirdpersonshoulder" is changed to "0", but real person view is not changed and at the same time according your logic new forward will be created when it shouldn't. I see you are using some fix, but it is intended for "bIsThirdPerson" value correction only.
    Attached Images
    File Type: jpg notify.jpg (36.7 KB, 901 views)
    __________________
    Expert of CMD/VBS/VB6. Malware analyst. L4D fun (Bloody Witch & FreeZone)
    [My plugins] [My tools] [GitHub] [Articles] [HiJackThis+] [Donate]

    Last edited by Dragokas; 03-02-2019 at 16:35.
    Dragokas is offline
    Reply


    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is Off

    Forum Jump


    All times are GMT -4. The time now is 07:11.


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