Bug:
When calling the code
PHP Code:
MakeEngineer(client)
{
TF2_SetPlayerClass(client, TFClass_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.
__________________