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

[TF2] Client Crash When Sprite Isn't Downloaded


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Malachi
Senior Member
Join Date: Jun 2010
Location: USA
Old 07-12-2014 , 19:56   [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #1

Normally I do a lot more research on an issue before I ask for help, but since there is a lot of ground to cover and time is important...

It appears (confirmed on two clients) that TF2 clients are crashing to the desktop the instant a sprite is displayed to them if they haven't downloaded it in advance. While I am using PrecacheGeneric and AddFileToDownloadsTable for the sprites, this doesn't prevent players from blocking the download (e.g. Options -> Multiplayer -> Custom Content = Only Allow Map Files) and inadvertantly causing them to instantly crash to the desktop.

This strikes me as strange, as when map textures are missing you just see the famous purple/black checkerboard.

Ok, now for some specifics.

.VMT file:
Code:
"Sprite"
{
    "$spriteorigin" "[ 0.50 0.50 ]"
    "$basetexture" "custom/ngc/ngc28"
    "$spriteorientation" "vp_facing_upright"
    "$translucent" "1"
}
Code Snippet:
Code:
             // Add each path to the download table/precache.
            FormatEx(szBuffer, sizeof(szBuffer), "%s.vmt", sSpritePath);
            PrecacheGeneric(szBuffer, true);
            AddFileToDownloadsTable(szBuffer);
            FormatEx(szBuffer, sizeof(szBuffer), "%s.vtf", sSpritePath);
            PrecacheGeneric(szBuffer, true);
            AddFileToDownloadsTable(szBuffer);
The original plugin (used on 140+ servers - can anyone confirm it is also affecting players?) is HERE and my modified version is up on GitHub. Basically, the modified version uses a config file and cleans up a few things. There's a changelog at the beginning that summarizes whats been done.

I don't know that this is a plugin issue. It could be an sv_pure issue, a VMT issue, a VTF issue (sample attached), or ??? Or maybe it is the plugin.

All help greatly appreciated!
Attached Files
File Type: zip ngc28.zip (5.0 KB, 84 views)
Malachi is offline
MasterOfTheXP
Veteran Member
Join Date: Aug 2011
Location: Cloudbank
Old 07-12-2014 , 21:25   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #2

This appears to simply be an unfortunate issue with displaying sprites. Be careful when using custom sprites.
__________________
Plugins / My Steam / TF2 Sandbox (plugin beta testing!)
MasterOfTheXP is offline
Sreaper
髪を用心
Join Date: Nov 2009
Old 07-13-2014 , 02:39   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #3

Alternatively, you can automatically kick clients who refuse to download your server files by checking their cvar value. A friendlier method would be to hide the sprites on players that have that option enabled.

Last edited by Sreaper; 07-13-2014 at 02:43.
Sreaper is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 07-13-2014 , 10:13   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #4

There is a trick that used to work, idk if it still does.
There are some hl1 shard vmt files that arn't used and they had random letter names. So you used to be ables to override those with your custom sprite. If they failed to download them, they would load those instead. However, with steampipe I think servers can no longer easily override files.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.
friagram is offline
Root_
Veteran Member
Join Date: Jan 2012
Location: ryssland
Old 07-13-2014 , 10:19   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #5

You might want to give it a shot https://forums.alliedmods.net/showthread.php?t=233549
__________________


dodsplugins.com - Plugins and Resources for Day of Defeat
http://twitch.tv/zadroot
Root_ is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 07-13-2014 , 11:57   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #6

I would think that the best solution would be to report the problem to Valve.
__________________
Not currently working on SourceMod plugin development.
Powerlord is offline
Malachi
Senior Member
Join Date: Jun 2010
Location: USA
Old 07-13-2014 , 14:41   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #7

Quote:
Originally Posted by MasterOfTheXP View Post
This appears to simply be an unfortunate issue with displaying sprites. Be careful when using custom sprites.
What would be a good way to be more careful?
Malachi is offline
Malachi
Senior Member
Join Date: Jun 2010
Location: USA
Old 07-13-2014 , 14:43   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #8

Quote:
Originally Posted by Sreaper View Post
...hide the sprites on players that have that option enabled.
I would be up for this. Is there a way to only show a sprite to certain clients?
Malachi is offline
Malachi
Senior Member
Join Date: Jun 2010
Location: USA
Old 07-13-2014 , 14:43   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #9

Quote:
Originally Posted by Root_ View Post
Thanks! Definitely looks interesting, and given the small size of the sprite files...
Malachi is offline
Malachi
Senior Member
Join Date: Jun 2010
Location: USA
Old 07-13-2014 , 14:44   Re: [TF2] Client Crash When Sprite Isn't Downloaded
Reply With Quote #10

Quote:
Originally Posted by Powerlord View Post
I would think that the best solution would be to report the problem to Valve.
What's the best way to report bugs?
Malachi 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 13:40.


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