AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   [TF2] An attempt to fix the missing disguise shotgun (https://forums.alliedmods.net/showthread.php?t=329876)

Shadowysn 01-11-2021 12:41

[TF2] An attempt to fix the missing disguise shotgun
 
3 Attachment(s)
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!

StrikeR14 01-11-2021 13:34

Re: [TF2] An attempt to fix the missing disguise shotgun
 
Quote:

Originally Posted by Shadowysn (Post 2732235)
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.

Shadowysn 01-11-2021 13:44

Re: [TF2] An attempt to fix the missing disguise shotgun
 
Quote:

Originally Posted by StrikeR14 (Post 2732241)
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.

nosoop 01-13-2021 02:50

Re: [TF2] An attempt to fix the missing disguise shotgun
 
1 Attachment(s)
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.

Shadowysn 01-13-2021 06:02

Re: [TF2] An attempt to fix the missing disguise shotgun
 
Quote:

Originally Posted by nosoop (Post 2732406)
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!


All times are GMT -4. The time now is 12:49.

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