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:
parent
63bc9031c9
commit
227c8c1eb2
4 changed files with 45 additions and 17 deletions
1
USAGE.md
1
USAGE.md
|
@ -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
|
||||
|
|
|
@ -602,8 +602,6 @@ async fn main() {
|
|||
connection.change_zone(*arg as u16).await
|
||||
}
|
||||
GameMasterCommandType::ToggleInvisibility => {
|
||||
// Control Data
|
||||
{
|
||||
let ipc = ServerZoneIpcSegment {
|
||||
op_code: ServerZoneIpcType::ActorControlSelf,
|
||||
timestamp: timestamp_secs(),
|
||||
|
@ -632,6 +630,32 @@ async fn main() {
|
|||
})
|
||||
.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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,6 +28,8 @@ pub enum ActorControlCategory {
|
|||
#[brw(pad_before = 2)]
|
||||
icon: OnlineStatus,
|
||||
},
|
||||
#[brw(magic = 0x261u16)]
|
||||
ToggleWireframeRendering(),
|
||||
}
|
||||
|
||||
#[binrw]
|
||||
|
|
|
@ -129,6 +129,7 @@ pub struct ActorSetPos {
|
|||
pub enum GameMasterCommandType {
|
||||
ChangeWeather = 0x6,
|
||||
ToggleInvisibility = 0xD,
|
||||
ToggleWireframe = 0x26,
|
||||
ChangeTerritory = 0x58,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue