public void ResetTimedRespawn(RoR2.NetworkUser user) { if (user) { usersRespawnTimers.ResetRespawnTimer(user.id); } }
private void NetworkUser_OnEnable(On.RoR2.NetworkUser.orig_OnEnable orig, RoR2.NetworkUser self) { orig(self); if (!deathTimerController) { deathTimerController = Instantiate(DeathTimerControllerPrefab); deathTimerController.transform.SetParent(self.transform, false); } }
public void StartTimedRespawn(RoR2.NetworkUser user) { if (user) { var respawnTime = RespawnTimeCalculation.GetRespawnTime(); usersRespawnTimers.StartRespawnTimer(user.id, respawnTime); ChatHelper.UserWillRespawnAfter(user.userName, respawnTime); } }
private UnityEngine.GameObject RunCameraManager_GetNetworkUserBodyObject(On.RoR2.RunCameraManager.orig_GetNetworkUserBodyObject orig, RoR2.NetworkUser networkUser) { var body = networkUser.GetCurrentBody(); if (body && body.baseNameToken == "ENGI_BODY_NAME" && body.currentVehicle && body.currentVehicle.gameObject.name == "EngiTurretVehicleSeat") { return(body.currentVehicle.transform.parent.gameObject); } else { return(orig(networkUser)); } }
private void Run_OnUserRemoved(On.RoR2.Run.orig_OnUserRemoved orig, RoR2.Run self, RoR2.NetworkUser user) { orig(self, user); usersRespawnTimers.RemoveUserRespawnTimer(user.id); }
private void UsersRespawnTimers_OnUserTimerRespawnTimerEnd(RoR2.NetworkUser user) { respawnController.RespawnUser(user); }