1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-21 07:07:44 +00:00

Add //gm wireframe command

This commit is contained in:
Joshua Goins 2025-03-29 00:39:00 -04:00
parent 63bc9031c9
commit 227c8c1eb2
4 changed files with 45 additions and 17 deletions

View file

@ -93,3 +93,4 @@ These GM commands are implemented in the FFXIV protocol, but only some of them a
* `//gm teri <id>`: Changes to the specified territory
* `//gm weather <id>`: Changes the weather
* `//gm wireframe`: Toggle wireframe rendering for the environment

View file

@ -602,9 +602,7 @@ async fn main() {
connection.change_zone(*arg as u16).await
}
GameMasterCommandType::ToggleInvisibility => {
// Control Data
{
let ipc = ServerZoneIpcSegment {
let ipc = ServerZoneIpcSegment {
op_code: ServerZoneIpcType::ActorControlSelf,
timestamp: timestamp_secs(),
data: ServerZoneIpcData::ActorControlSelf(
@ -618,20 +616,46 @@ async fn main() {
..Default::default()
};
connection
.send_segment(PacketSegment {
source_actor: connection
.player_data
.actor_id,
target_actor: connection
.player_data
.actor_id,
segment_type: SegmentType::Ipc {
data: ipc,
},
})
.await;
}
connection
.send_segment(PacketSegment {
source_actor: connection
.player_data
.actor_id,
target_actor: connection
.player_data
.actor_id,
segment_type: SegmentType::Ipc {
data: ipc,
},
})
.await;
}
GameMasterCommandType::ToggleWireframe => {
let ipc = ServerZoneIpcSegment {
op_code: ServerZoneIpcType::ActorControlSelf,
timestamp: timestamp_secs(),
data: ServerZoneIpcData::ActorControlSelf(
ActorControlSelf {
category:
ActorControlCategory::ToggleWireframeRendering(),
},
),
..Default::default()
};
connection
.send_segment(PacketSegment {
source_actor: connection
.player_data
.actor_id,
target_actor: connection
.player_data
.actor_id,
segment_type: SegmentType::Ipc {
data: ipc,
},
})
.await;
}
}
}

View file

@ -28,6 +28,8 @@ pub enum ActorControlCategory {
#[brw(pad_before = 2)]
icon: OnlineStatus,
},
#[brw(magic = 0x261u16)]
ToggleWireframeRendering(),
}
#[binrw]

View file

@ -129,6 +129,7 @@ pub struct ActorSetPos {
pub enum GameMasterCommandType {
ChangeWeather = 0x6,
ToggleInvisibility = 0xD,
ToggleWireframe = 0x26,
ChangeTerritory = 0x58,
}