-
-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #442 from hubastard/upgrade-0.8.21
Support for DSP 0.8.21
- Loading branch information
Showing
27 changed files
with
430 additions
and
251 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
## Changelog | ||
|
||
1.1.0: | ||
|
||
- Float3 IPlayerData.MechaColor has been changed to Float4[] IPlayerData.MechaColors in line with changes introduced in DSP version 0.8.21.8562. | ||
- Edited description. | ||
|
||
1.0.0: | ||
|
||
- initial release on thunderstore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,49 @@ | ||
using NebulaAPI; | ||
using NebulaModel.DataStructures; | ||
using Unity; | ||
using UnityEngine; | ||
|
||
namespace NebulaModel.Packets.Players | ||
{ | ||
[HidePacketInDebugLogs] | ||
public class PlayerAnimationUpdate | ||
{ | ||
public ushort PlayerId { get; set; } | ||
public float JumpWeight { get; set; } | ||
public float JumpNormalizedTime { get; set; } | ||
public int IdleAnimIndex { get; set; } | ||
public int SailAnimIndex { get; set; } | ||
public float MiningWeight { get; set; } | ||
public int MiningAnimIndex { get; set; } | ||
|
||
// TODO: They don't use a finite state machine for there animation. But we need to find a way to optimized this packet. | ||
// maybe we could only send the variables that are used to changed the animation state. | ||
// See: (Game: PlayerAnimator class) | ||
public NebulaAnimationState Idle { get; set; } | ||
public NebulaAnimationState RunSlow { get; set; } | ||
public NebulaAnimationState RunFast { get; set; } | ||
public NebulaAnimationState Drift { get; set; } | ||
public NebulaAnimationState DriftF { get; set; } | ||
public NebulaAnimationState DriftL { get; set; } | ||
public NebulaAnimationState DriftR { get; set; } | ||
public NebulaAnimationState Fly { get; set; } | ||
public NebulaAnimationState Sail { get; set; } | ||
public NebulaAnimationState Mining0 { get; set; } | ||
// some extra values to compute backpack flame size | ||
// i put them here because i update the player fx together with the animation update | ||
public float vertSpeed { get; set; } | ||
public float horzSpeed { get; set; } | ||
public EMovementState MovementState { get; set; } | ||
public float HorzSpeed { get; set; } | ||
public float VertSpeed { get; set; } | ||
public float Turning { get; set; } | ||
public float Altitude { get; set; } | ||
|
||
public PlayerAnimationUpdate() { } | ||
|
||
public PlayerAnimationUpdate(ushort playerId, PlayerAnimator animator) | ||
{ | ||
PlayerId = playerId; | ||
|
||
JumpWeight = animator.jumpWeight; | ||
JumpNormalizedTime = animator.jumpNormalizedTime; | ||
IdleAnimIndex = animator.idleAnimIndex; | ||
SailAnimIndex = animator.sailAnimIndex; | ||
MiningWeight = animator.miningWeight; | ||
MiningAnimIndex = animator.miningAnimIndex; | ||
|
||
MovementState = animator.movementState; | ||
HorzSpeed = animator.controller.horzSpeed; | ||
VertSpeed = animator.controller.vertSpeed; | ||
Turning = animator.turning; | ||
Altitude = 1f; | ||
if (GameMain.localPlanet != null) | ||
{ | ||
Altitude = Mathf.Clamp01((animator.player.position.magnitude - GameMain.localPlanet.realRadius - 7f) * 0.15f); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.