Raised This Month: $ Target: $400
 0% 

Solved [TF2] TF2_SetPlayerClass bug after recent TF2 update


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
heavyisgps
Member
Join Date: Aug 2018
Old 10-26-2021 , 18:33   [TF2] TF2_SetPlayerClass bug after recent TF2 update
Reply With Quote #1

Bug:

When calling the code
PHP Code:
MakeEngineer(client)
{
TF2_SetPlayerClass(clientTFClass_Engineer);
    
TF2_RegeneratePlayer(client);

from another plugin. It doesn't change the class correctly.

Scenario 1:
1. My class is scout
2. I trigger the code from Plugin A
3. Plugin A makes the call from Plugin B
4. Plugin B executes the code snippet above.
5. I am now an Engineer, but with scout weapons, and without a builder and destroyer tool. Not able to build even with build commands.

Scenario 2:
1. My class is scout
2. I trigger the code from Plugin B
3. Plugin B executes the code snippet from above.
4. I am now an Engineer with my current Engineer loadout, I can build and destroy my buildings normally.

This was not an issue previously, and I think the issue first was discovered when the latest TF2 update hit.

The same issue goes for spy as well. Where you can't disguise as you don't have a disguise kit.

If you already are the class you change to, it works normally.

The same thing also happens if you already are a spy, or engineer and switch to another class, then you keep your disguise kit and builder items.
__________________
Creator of the Hi GPS Balance mod for TF2.

www.higps.no

Last edited by heavyisgps; 10-27-2021 at 16:27.
heavyisgps is offline
 



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


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