yaw'll
This commit is contained in:
parent
c8d6af01d8
commit
cab5c3d80e
|
@ -11,6 +11,7 @@ internal class Message {
|
||||||
public float X { get; init; }
|
public float X { get; init; }
|
||||||
public float Y { get; init; }
|
public float Y { get; init; }
|
||||||
public float Z { get; init; }
|
public float Z { get; init; }
|
||||||
|
public float Yaw { get; init; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string Text { get; init; }
|
public string Text { get; init; }
|
||||||
|
@ -30,6 +31,7 @@ internal class MessageWithTerritory {
|
||||||
public float X { get; init; }
|
public float X { get; init; }
|
||||||
public float Y { get; init; }
|
public float Y { get; init; }
|
||||||
public float Z { get; init; }
|
public float Z { get; init; }
|
||||||
|
public float Yaw { get; init; }
|
||||||
|
|
||||||
[JsonProperty("message")]
|
[JsonProperty("message")]
|
||||||
public string Text { get; init; }
|
public string Text { get; init; }
|
||||||
|
|
|
@ -10,6 +10,7 @@ public class MessageRequest {
|
||||||
public float X { get; set; }
|
public float X { get; set; }
|
||||||
public float Y { get; set; }
|
public float Y { get; set; }
|
||||||
public float Z { get; set; }
|
public float Z { get; set; }
|
||||||
|
public float Yaw { get; set; }
|
||||||
public Guid PackId { get; set; }
|
public Guid PackId { get; set; }
|
||||||
|
|
||||||
[JsonProperty("template_1")]
|
[JsonProperty("template_1")]
|
||||||
|
|
|
@ -43,7 +43,8 @@ internal class Messages : IDisposable {
|
||||||
}
|
}
|
||||||
|
|
||||||
PluginLog.Log($"spawning vfx for {message.Id}");
|
PluginLog.Log($"spawning vfx for {message.Id}");
|
||||||
if (this.Plugin.Vfx.SpawnStatic(message.Id, VfxPath, message.Position) == null) {
|
var rotation = Quaternion.CreateFromYawPitchRoll(message.Yaw, 0, 0);
|
||||||
|
if (this.Plugin.Vfx.SpawnStatic(message.Id, VfxPath, message.Position, rotation) == null) {
|
||||||
PluginLog.Log("trying again");
|
PluginLog.Log("trying again");
|
||||||
this.SpawnQueue.Enqueue(message);
|
this.SpawnQueue.Enqueue(message);
|
||||||
}
|
}
|
||||||
|
|
|
@ -147,6 +147,7 @@ internal class Write : ITab {
|
||||||
X = player.Position.X,
|
X = player.Position.X,
|
||||||
Y = player.Position.Y,
|
Y = player.Position.Y,
|
||||||
Z = player.Position.Z,
|
Z = player.Position.Z,
|
||||||
|
Yaw = player.Rotation,
|
||||||
PackId = pack.Id,
|
PackId = pack.Id,
|
||||||
Template1 = this._part1,
|
Template1 = this._part1,
|
||||||
Word1List = this._word1.Item1 == -1 ? null : this._word1.Item1,
|
Word1List = this._word1.Item1 == -1 ? null : this._word1.Item1,
|
||||||
|
|
|
@ -35,7 +35,7 @@ internal unsafe class Vfx : IDisposable {
|
||||||
this.Spawned.Clear();
|
this.Spawned.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
internal VfxStruct* SpawnStatic(Guid id, string path, Vector3 pos) {
|
internal VfxStruct* SpawnStatic(Guid id, string path, Vector3 pos, Quaternion rotation) {
|
||||||
VfxStruct* vfx;
|
VfxStruct* vfx;
|
||||||
fixed (byte* p = Encoding.UTF8.GetBytes(path)) {
|
fixed (byte* p = Encoding.UTF8.GetBytes(path)) {
|
||||||
fixed (byte* pool = Pool) {
|
fixed (byte* pool = Pool) {
|
||||||
|
@ -54,6 +54,8 @@ internal unsafe class Vfx : IDisposable {
|
||||||
|
|
||||||
// update position
|
// update position
|
||||||
vfx->Position = new Vector3(pos.X, pos.Y, pos.Z);
|
vfx->Position = new Vector3(pos.X, pos.Y, pos.Z);
|
||||||
|
// update rotation
|
||||||
|
vfx->Rotation = new Quaternion(rotation.X, rotation.Y, rotation.Z, rotation.W);
|
||||||
|
|
||||||
// update
|
// update
|
||||||
vfx->Flags |= 2;
|
vfx->Flags |= 2;
|
||||||
|
@ -81,6 +83,9 @@ internal unsafe class Vfx : IDisposable {
|
||||||
[FieldOffset(0x50)]
|
[FieldOffset(0x50)]
|
||||||
public Vector3 Position;
|
public Vector3 Position;
|
||||||
|
|
||||||
|
[FieldOffset(0x60)]
|
||||||
|
public Quaternion Rotation;
|
||||||
|
|
||||||
[FieldOffset(0x70)]
|
[FieldOffset(0x70)]
|
||||||
public Vector3 Scale;
|
public Vector3 Scale;
|
||||||
|
|
||||||
|
|
|
@ -174,6 +174,9 @@ words:
|
||||||
- moogle
|
- moogle
|
||||||
- goblin
|
- goblin
|
||||||
- dragon
|
- dragon
|
||||||
|
- namazu
|
||||||
|
- goat
|
||||||
|
- mameshiba
|
||||||
|
|
||||||
- name: Situations
|
- name: Situations
|
||||||
words:
|
words:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user