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

[CS:GO] Missing ViewModel Fix v1.1 [2017-02-02]


Post New Thread Reply   
 
Thread Tools Display Modes
Author
ch4os
Member
Join Date: Jun 2014
Plugin ID:
4962
Plugin Version:
1.1
Plugin Category:
Gameplay
Plugin Game:
Counter-Strike: GO
Plugin Dependencies:
    Servers with this Plugin:
     
    Plugin Description:
    This plugin tries to prevent the annoying bug of sometimes losing your viewmodel after someone else joins spectator
    Old 12-21-2015 , 10:07   [CS:GO] Missing ViewModel Fix v1.1 [2017-02-02]
    Reply With Quote #1

    Description

    Did you ever experience this strange bug where your viewmodel suddenly disappears and you didn't do anything?
    This is actually an engine bug Valve should try to fix.

    This plugin tries to prevent this bug from happening on your server.



    Installation

    - Drop missing_viewmodel_fix.smx into addons/sourcemod/plugins.
    - Restart server and you're good to go.

    Explanation of the bug

    If someone joins spectator mode and watches someone else in first person mode, the player still alive can't see their viewmodel (weapon and hands) anymore. It looks like "r_drawviewmodel 0" was executed. This only happens if "mp_death_drop_gun" is set to 1.

    How can this be replicated exactly?
    1) Run your server with default competitive settings, with or without MetaMod/SourceMod.
    2) Start up de_dust2.
    3) Join CT team together with a friend.
    4) You have to be apart enough for this to work (as this bug seems to only happen when transition effect is not visible), so let your friend walk all the way on A long until he reaches pit.
    5) You stay on CT spawn, make sure you've set "cl_spec_mode" to 4 (firstperson) - this is part of the bug.
    6) Join spectator mode - your friend's viewmodel is now gone.

    What this plugin does

    This plugin intercepts teamjoins to spectator and forces the client to set "cl_spec_mode" to 6 (free look) first. As soon as the client has set freelook mode the teamjoin is performed. This causes the client to start in freelook mode and therefore prevents the bug.

    Limitations

    This plugin may not work if you use other plugins that intercept teamjoins as well (like TeamChange Unlimited).

    Fix for TeamChange Unlimited:

    Change this:
    PHP Code:
    TeamChangeActual(clienttoteam); 
    To this:
    PHP Code:
    if (toteam == TEAM_SPECTATE) {
       return 
    Plugin_Continue;
    } else {
       
    TeamChangeActual(clienttoteam);

    Valve?

    Hopefully Valve will fix this bug so this plugin won't be needed anymore soon.


    **EDIT** There's an updated version by SHUFEN.jp (thanks!) -> see post #5 for download link


    Old download
    Attached Files
    File Type: sp Get Plugin or Get Source (missing_viewmodel_fix.sp - 2142 views - 1.9 KB)

    Last edited by ch4os; 04-12-2017 at 14:34. Reason: New version by SHUFEN.jp, see #5
    ch4os is offline
    whtevrwt
    AlliedModders Donor
    Join Date: Apr 2015
    Old 12-21-2015 , 13:38   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #2

    I've honestly never experienced this bug. But, I'm sorry for those who do.
    __________________
    whtevrwt is offline
    ch4os
    Member
    Join Date: Jun 2014
    Old 12-21-2015 , 14:14   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #3

    Well, problem with this bug is:

    On normal match servers you probably won't see this as people usually join T or CT to play. So they won't join spectator to trigger the bug.

    And on bigger community servers where people more often join spectator mode, you still need a greater distance to not trigger the transition effect. Which is highly unlikely if there are many people on the server. So the bug won't be seen often there, too.

    You will probably most likely see this bug on private servers when you practice smoke grenades and tactics with your buddies. Or on servers with large maps like surf maps, where the transition effect is less likely to happen when joining spectator.

    That's probably why noone really knows this bug so far. Which makes it even harder for Valve to recognize

    Last edited by ch4os; 12-21-2015 at 14:19.
    ch4os is offline
    zipcore
    Veteran Member
    Join Date: Mar 2010
    Location: m_flZipcore
    Old 12-22-2015 , 07:11   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #4

    Great!
    __________________
    zipcore is offline
    SHUFEN
    Senior Member
    Join Date: Jun 2014
    Location: Japan, Tokyo
    Old 02-02-2017 , 11:00   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #5

    I fixed some things of this, now working fine always.
    I publish it here.
    Attached Files
    File Type: sp Get Plugin or Get Source (missing_viewmodel_fix.sp - 1562 views - 2.4 KB)
    SHUFEN is offline
    Send a message via Skype™ to SHUFEN
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-02-2017 , 11:02   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #6

    has anybody tried sv_force_transmit_ents?

    Last edited by Mitchell; 02-02-2017 at 12:55.
    Mitchell is offline
    sneaK
    SourceMod Moderator
    Join Date: Feb 2015
    Location: USA
    Old 02-02-2017 , 12:26   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #7

    Quote:
    Originally Posted by Mitchell View Post
    has anybody tried sv_force_transmit_entities?
    Code:
    sv_force_transmit_ents - Will transmit all entities to client, regardless of PVS conditions (will still skip based on transmit flags, however).
    Would this even fix the issue? Also seems like it would increase server load significantly.

    Thank you shufen for the changes, will check this out!!
    __________________
    sneaK is offline
    Mitchell
    ~lick~
    Join Date: Mar 2010
    Old 02-02-2017 , 12:53   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #8

    Quote:
    Originally Posted by blackhawk74 View Post
    Code:
    sv_force_transmit_ents - Will transmit all entities to client, regardless of PVS conditions (will still skip based on transmit flags, however).
    Would this even fix the issue? Also seems like it would increase server load significantly.

    Thank you shufen for the changes, will check this out!!
    Yeah that's the one, this was introduced with the transmit players iirc. Could be issues with the predicted viewmodel and the player's position, a bug that you see some times with players that "teleport" into your view. Here's a quick reference what i'm talking about: https://www.youtube.com/watch?v=4Uw8VkxpDzg
    Edit: also I have no idea if that convar will impact performance, especially since one would normally think that hiding things from a player and calculating if they can see it may take more resources, but it's valve and they may have not skipped this check if the convar is set to 1.

    Last edited by Mitchell; 02-02-2017 at 12:57.
    Mitchell is offline
    ch4os
    Member
    Join Date: Jun 2014
    Old 04-12-2017 , 14:32   Re: [CS:GO] Missing ViewModel Fix v1.0.0 [2015-12-21]
    Reply With Quote #9

    Thanks for the update, SHUFEN.jp! Just saw this today. I updated the description to use your version instead.
    ch4os is offline
    Neuro Toxin
    Veteran Member
    Join Date: Oct 2013
    Location: { closing the void; }
    Old 04-12-2017 , 18:10   Re: [CS:GO] Missing ViewModel Fix v1.1 [2017-02-02]
    Reply With Quote #10

    Bad spectator plugins cause this.

    How to replicate.

    1. Join a server
    2. Join a team
    3. Make plugin change you to spec with the iteam netprop
    4. The person you are specing bugs out as per OP

    This is not a game bug. This is caused by bad plugins.
    __________________
    Neuro Toxin is offline
    Reply



    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 13:18.


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