1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-20 14:47:45 +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 teri <id>`: Changes to the specified territory
* `//gm weather <id>`: Changes the weather * `//gm weather <id>`: Changes the weather
* `//gm wireframe`: Toggle wireframe rendering for the environment

View file

@ -602,8 +602,6 @@ async fn main() {
connection.change_zone(*arg as u16).await connection.change_zone(*arg as u16).await
} }
GameMasterCommandType::ToggleInvisibility => { GameMasterCommandType::ToggleInvisibility => {
// Control Data
{
let ipc = ServerZoneIpcSegment { let ipc = ServerZoneIpcSegment {
op_code: ServerZoneIpcType::ActorControlSelf, op_code: ServerZoneIpcType::ActorControlSelf,
timestamp: timestamp_secs(), timestamp: timestamp_secs(),
@ -632,6 +630,32 @@ async fn main() {
}) })
.await; .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)] #[brw(pad_before = 2)]
icon: OnlineStatus, icon: OnlineStatus,
}, },
#[brw(magic = 0x261u16)]
ToggleWireframeRendering(),
} }
#[binrw] #[binrw]

View file

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