sandbox
sandbox copied to clipboard
`PawnController` constructor is spamming clientside
Hello,
Describe the bug Like i said in early 2023 on Discord,
On sandbox, if you respawn your Pawn without changing his controller type (so if the controller is based on s&box PawnController
code), the clientside constructor of the controller starts to create infinite spam in the console for his constructor.
I know all this stuff is indicated as deprecated but i'm still curious about this issue.
To Reproduce
- Download this sandbox game
- Add
ConCmd.Admin
to call Respawn() function
[ConCmd.Admin( "respawn" )]
static void TestRespawn()
{
if ( ConsoleSystem.Caller.Pawn is SandboxPlayer basePlayer )
{
basePlayer.Respawn();
}
}
- Add a Log for the
PawnController
constructor of thebase
addon :
public PawnController() {
Log.Info("PawnController constructor");
}
- Start a sandbox game and call 3 times the new
respawn
command - See that the Clientside constructor for
PawnController
start to be crazy
Old video on WalkController
:
https://github.com/Facepunch/sandbox/assets/5229571/d99ddd8a-837b-437e-add4-95c9ef128935
Regards