@@ -22,6 +22,7 @@ namespace ArkApi
2222 DECLARE_HOOK (AGameState_DefaultTimer, void , AGameState*);
2323 DECLARE_HOOK (AShooterGameMode_BeginPlay, void , AShooterGameMode*);
2424 DECLARE_HOOK (URCONServer_Init, bool , URCONServer*, FString, int , UShooterCheatManager*);
25+ DECLARE_HOOK (APlayerController_ServerReceivedPlayerControllerAck_Implementation, void , APlayerController*);
2526 DECLARE_HOOK (AShooterPlayerController_Possess, void , AShooterPlayerController*, APawn*);
2627 DECLARE_HOOK (AShooterGameMode_Logout, void , AShooterGameMode*, AController*);
2728
@@ -45,6 +46,8 @@ namespace ArkApi
4546 hooks->SetHook (" AShooterGameMode.BeginPlay" , &Hook_AShooterGameMode_BeginPlay,
4647 &AShooterGameMode_BeginPlay_original);
4748 hooks->SetHook (" URCONServer.Init" , &Hook_URCONServer_Init, &URCONServer_Init_original);
49+ hooks->SetHook (" APlayerController.ServerReceivedPlayerControllerAck_Implementation" , &Hook_APlayerController_ServerReceivedPlayerControllerAck_Implementation,
50+ &APlayerController_ServerReceivedPlayerControllerAck_Implementation_original);
4851 hooks->SetHook (" AShooterPlayerController.Possess" , &Hook_AShooterPlayerController_Possess,
4952 &AShooterPlayerController_Possess_original);
5053 hooks->SetHook (" AShooterGameMode.Logout" , &Hook_AShooterGameMode_Logout, &AShooterGameMode_Logout_original);
@@ -167,6 +170,17 @@ namespace ArkApi
167170 return URCONServer_Init_original (_this, Password, InPort, SCheatManager);
168171 }
169172
173+ void Hook_APlayerController_ServerReceivedPlayerControllerAck_Implementation (APlayerController* _this)
174+ {
175+ APlayerController_ServerReceivedPlayerControllerAck_Implementation_original (_this);
176+
177+ if (_this)
178+ {
179+ AShooterPlayerController* ASPC = static_cast <AShooterPlayerController*>(_this);
180+ dynamic_cast <ApiUtils&>(*API ::game_api->GetApiUtils ()).SetPlayerController (ASPC );
181+ }
182+ }
183+
170184 void Hook_AShooterPlayerController_Possess (AShooterPlayerController* _this, APawn* inPawn)
171185 {
172186 dynamic_cast <ApiUtils&>(*API ::game_api->GetApiUtils ()).SetPlayerController (_this);
0 commit comments