Skip to content

Commit

Permalink
Merge pull request #1910 from tornac1234/1.7.0.0
Browse files Browse the repository at this point in the history
1.7.0.0
  • Loading branch information
dartasen authored Dec 8, 2022
2 parents 899dde6 + 104c1d1 commit 0b06511
Show file tree
Hide file tree
Showing 163 changed files with 197 additions and 3,355 deletions.
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project InitialTargets="PrepareForModding">
<!-- Set default properties for all projects (can be overridden per project) -->
<PropertyGroup>
<Version>1.6.0.1</Version>
<Version>1.7.0.0</Version>
<LangVersion>10</LangVersion>
<NitroxProject>false</NitroxProject>
<TestLibrary>false</TestLibrary>
Expand Down
2 changes: 0 additions & 2 deletions NitroxClient/ClientAutoFacRegistrar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
using NitroxClient.GameLogic.FMOD;
using NitroxClient.GameLogic.HUD;
using NitroxClient.GameLogic.InitialSync.Base;
using NitroxClient.GameLogic.PlayerLogic;
using NitroxClient.GameLogic.PlayerLogic.PlayerModel;
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
using NitroxClient.GameLogic.PlayerLogic.PlayerPreferences;
Expand Down Expand Up @@ -141,7 +140,6 @@ private static void RegisterCoreDependencies(ContainerBuilder containerBuilder)
containerBuilder.RegisterType<LiveMixinManager>().InstancePerLifetimeScope();
containerBuilder.RegisterType<NitroxSettingsManager>().InstancePerLifetimeScope();
containerBuilder.RegisterType<ThrottledPacketSender>().InstancePerLifetimeScope();
containerBuilder.RegisterType<PlayerCinematics>().InstancePerLifetimeScope();
containerBuilder.RegisterType<NitroxPDATabManager>().InstancePerLifetimeScope();
}

Expand Down

This file was deleted.

2 changes: 1 addition & 1 deletion NitroxClient/Debuggers/NetworkDebugger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class NetworkDebugger : BaseDebugger, INetworkDebugger

private readonly List<string> filter = new()
{
nameof(PlayerMovement), nameof(EntityTransformUpdates), nameof(PlayerStats), nameof(CellEntities), nameof(VehicleMovement), nameof(PlayerCinematicControllerCall),
nameof(PlayerMovement), nameof(EntityTransformUpdates), nameof(PlayerStats), nameof(CellEntities), nameof(VehicleMovement),
nameof(PlayFMODAsset), nameof(PlayFMODCustomEmitter), nameof(PlayFMODStudioEmitter), nameof(PlayFMODCustomLoopingEmitter)
};
private readonly List<PacketDebugWrapper> packets = new List<PacketDebugWrapper>(PACKET_STORED_COUNT);
Expand Down
7 changes: 0 additions & 7 deletions NitroxClient/GameLogic/EscapePodManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,6 @@ public GameObject CreateNewEscapePod(EscapePodModel model)
DamageEscapePod(model.Damaged, model.RadioDamaged);
FixStartMethods(escapePod);

// Start() isn't executed for the EscapePod, why? Idk, maybe because it's a scene...
MultiplayerCinematicReference reference = escapePod.AddComponent<MultiplayerCinematicReference>();
foreach (PlayerCinematicController controller in escapePod.GetComponentsInChildren<PlayerCinematicController>())
{
reference.AddController(controller);
}

SURPRESS_ESCAPE_POD_AWAKE_METHOD = false;

return escapePod;
Expand Down
25 changes: 0 additions & 25 deletions NitroxClient/GameLogic/PlayerLogic/PlayerCinematics.cs

This file was deleted.

2 changes: 1 addition & 1 deletion NitroxClient/GameLogic/RemotePlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
using NitroxClient.GameLogic.PlayerLogic.PlayerModel.Abstract;
using NitroxClient.MonoBehaviours;
using NitroxClient.Unity.Helper;
using NitroxModel.Helper;
using NitroxModel.MultiplayerSession;
using UnityEngine;
using UWE;
Expand Down Expand Up @@ -69,6 +68,7 @@ public RemotePlayer(GameObject playerBody, PlayerContext playerContext, List<Tec
PlayerModel.GetComponent<ConditionRules>().enabled = false;

AnimationController = PlayerModel.AddComponent<AnimationController>();
AnimationController.Initialize(this);

Transform inventoryTransform = new GameObject("Inventory").transform;
inventoryTransform.SetParent(Body.transform);
Expand Down
15 changes: 10 additions & 5 deletions NitroxClient/GameLogic/Terrain.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using NitroxClient.Communication.Abstract;
using NitroxClient.Map;
Expand Down Expand Up @@ -103,10 +104,14 @@ public static IEnumerator WaitForWorldLoad()
// In WorldStreamer.CreateStreamers() three coroutines are created to constantly call UpdateCenter() on the streamers
// We force these updates so that the world streamer gets busy instantly
WorldStreamer streamerV2 = LargeWorldStreamer.main.streamerV2;
streamerV2.UpdateStreamingCenter(MainCamera.camera.transform.position);
streamerV2.octreesStreamer.UpdateCenter(streamerV2.streamingCenter);
streamerV2.lowDetailOctreesStreamer.UpdateCenter(streamerV2.streamingCenter);
streamerV2.clipmapStreamer.UpdateCenter(streamerV2.streamingCenter);
// Sometimes, the world streamers can't find any cells to load and will throw an error, in which case we just skip the cell loading
try
{
streamerV2.UpdateStreamingCenter(MainCamera.camera.transform.position);
streamerV2.octreesStreamer.UpdateCenter(streamerV2.streamingCenter);
streamerV2.lowDetailOctreesStreamer.UpdateCenter(streamerV2.streamingCenter);
streamerV2.clipmapStreamer.UpdateCenter(streamerV2.streamingCenter);
} catch (Exception) { }

yield return new WaitUntil(() => LargeWorldStreamer.main.IsWorldSettled());
Player.main.cinematicModeActive = false;
Expand Down
21 changes: 20 additions & 1 deletion NitroxClient/MonoBehaviours/AnimationController.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using UnityEngine;
using NitroxClient.GameLogic;
using UnityEngine;

namespace NitroxClient.MonoBehaviours
{
Expand All @@ -7,6 +8,7 @@ public class AnimationController : MonoBehaviour
{
private const float SMOOTHING_SPEED = 4f;
private Animator animator;
private RemotePlayer remotePlayer;

public bool UpdatePlayerAnimations { get; set; } = true;
public Quaternion AimingRotation { get; set; }
Expand All @@ -23,6 +25,23 @@ public void Awake()
this["is_underwater"] = true;
}

public void Initialize(RemotePlayer remotePlayer)
{
this.remotePlayer = remotePlayer;
remotePlayer.PlayerDeathEvent.AddHandler(this, Reset);
}

public void OnDestroy()
{
remotePlayer?.PlayerDeathEvent.RemoveHandler(this, Reset);
}

private void Reset(RemotePlayer remotePlayer)
{
animator.Rebind();
animator.Update(0);
}

public void FixedUpdate()
{
if (UpdatePlayerAnimations)
Expand Down

This file was deleted.

Loading

0 comments on commit 0b06511

Please sign in to comment.