Raised This Month: $128 Target: $400
 32% 

[TF2] An attempt to fix the missing disguise shotgun


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 01-11-2021 , 13:41   [TF2] An attempt to fix the missing disguise shotgun
Reply With Quote #1

After watching this, I decided to try and fix the shotgun problem in the spare time I had tonight.

Unfortunately, it still results in the shotgun being invisible and now I've ran out of time, but at least the disguise no longer shows the Spy's weapons.

I'm a bit baffled at how this still wasn't fixed. At least, in plugin form.
If I missed out on something then sorry and dang, all that effort for nothing.

1/13/2021 7:05 PM EDIT: Updated ShotgunDisguiseFix.sp, engineer disguise shotguns now function and show properly. Other disguises are untested because bots on bot_mimic can't switch to sappers.
1/13/2021 11:54 PM EDIT: Decided to add debug command to remove the disguised weapons, shotguns are confirmed to be working for the other disguises. Hooray!
Attached Files
File Type: sp Get Plugin or Get Source (ShotgunDisguiseFix.sp - 65 views - 8.6 KB)
__________________
ragdoll spam, that is all

Steam profile, where I game, obviously.
Youtube channel, where I do Stick Death Maze animations and some other stuff.

Plugins:
1 | 2 | 3 | 4 | 5
Modified Plugins:
1 | 2 | 3

no plugin requests, sorry

Last edited by Shadowysn; 01-13-2021 at 11:55.
Shadowysn is offline
StrikeR14
AlliedModders Donor
Join Date: Apr 2016
Location: Behind my PC
Old 01-11-2021 , 14:34   Re: [TF2] An attempt to fix the missing disguise shotgun
Reply With Quote #2

Quote:
Originally Posted by Shadowysn View Post
it still results in the shotgun being invisible
Just to make sure, you're saying that the shotgun is invisible and the player is not t-posed anymore, right?
If so, just use:

PHP Code:
SetEntProp(weaponProp_Send"m_bValidatedAttachedEntity"true); 
Which will turn the spawned weapon into visible.
__________________
Currently taking TF2/CSGO paid private requests!

My Plugins | My Discord Account

Last edited by StrikeR14; 01-11-2021 at 14:35.
StrikeR14 is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 01-11-2021 , 14:44   Re: [TF2] An attempt to fix the missing disguise shotgun
Reply With Quote #3

Quote:
Originally Posted by StrikeR14 View Post
Just to make sure, you're saying that the shotgun is invisible and the player is not t-posed anymore, right?
If so, just use:

PHP Code:
SetEntProp(weaponProp_Send"m_bValidatedAttachedEntity"true); 
Which will turn the spawned weapon into visible.
Nope, the bot I tested with did not t-pose as an engineer. I could only test engineer because it seems that bots with bot_mimic are unable to switch to the sapper. Haven’t tested with a real player yet aside from myself, I’ll admit.

The shotgun properly appears on the HUD for me.

Already tried that net prop, there was no difference.

Last edited by Shadowysn; 01-13-2021 at 06:02.
Shadowysn is offline
nosoop
Veteran Member
Join Date: Aug 2014
Old 01-13-2021 , 03:50   Re: [TF2] An attempt to fix the missing disguise shotgun
Reply With Quote #4

I did a writeup of the bug here.

Attached below is the hotfix I wrote up as a prototype; it modifies the schema so the stock shotguns use the modified classname.

Depends on Econ Data.
Attached Files
File Type: sp Get Plugin or Get Source (tf_fix_spy_multiclass_disguise_weapon.sp - 13 views - 2.2 KB)
__________________
I do TF2, TF2 servers, and TF2 plugins.
I don't do DMs over Discord -- PM me on the forums regarding inquiries.
AlliedModders Releases / Github / TF2 Server / Donate (BTC / BCH / coffee)

Last edited by nosoop; 01-13-2021 at 03:51.
nosoop is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 01-13-2021 , 07:02   Re: [TF2] An attempt to fix the missing disguise shotgun
Reply With Quote #5

Quote:
Originally Posted by nosoop View Post
I did a writeup of the bug here.

Attached below is the hotfix I wrote up as a prototype; it modifies the schema so the stock shotguns use the modified classname.

Depends on Econ Data.
Ah, looks interesting. Definitely better than my hacky way of fixing this, although I'm also kind of striking for a fix without usage of external .txt gamedata.

I've decided to work on the code for my plugin more and found out that a few netprops weren't being replicated.
It now looks to be working properly on Engineer disguises!
(Updated the ShotgunDisguiseFix.sp file on the post above)

If only I can make the bots switch to their sappers, then I could test it out on the other disguises.

EDIT: Decided to kill the disguise weapons, and it works!

Last edited by Shadowysn; 01-13-2021 at 11:55.
Shadowysn 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:46.


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