Ejemplo n.º 1
0
	private void CmdEnterVehicle(uint vehicleNetId) {
		var vehicle = NetworkIdentity.spawned[vehicleNetId].gameObject;
		if (vehicle.GetComponent<Owned>().owner != connectionToClient.connectionId) return;
		SetKinematic(vehicle, true);
		vehicle.GetComponent<NetworkIdentity>().AssignClientAuthority(connectionToClient);
		_vehicleCtrl = vehicle.GetComponent<Controllable>();
		_vehicleCtrl.SetPlayer(gameObject);
		TargetSetVehicle(vehicleNetId);
	}