1
Fork 0
mirror of https://github.com/redstrate/Kawari.git synced 2025-04-20 06:37:45 +00:00

Use bool type in ToggleInvisible Actor Control

This commit is contained in:
Joshua Goins 2025-04-11 08:46:54 -04:00
parent b3b816c511
commit dbfd5fccc4
2 changed files with 8 additions and 4 deletions

View file

@ -608,7 +608,7 @@ async fn client_loop(
.actor_control_self(ActorControlSelf {
category:
ActorControlCategory::ToggleInvisibility {
invisible: 1,
invisible: true,
},
})
.await

View file

@ -1,5 +1,7 @@
use binrw::binrw;
use crate::common::{read_bool_from, write_bool_as};
use super::OnlineStatus;
// See https://github.com/awgil/ffxiv_reverse/blob/f35b6226c1478234ca2b7149f82d251cffca2f56/vnetlog/vnetlog/ServerIPC.cs#L266 for a REALLY useful list of known values
@ -9,7 +11,9 @@ pub enum ActorControlCategory {
#[brw(magic = 0x26u16)]
ToggleInvisibility {
#[brw(pad_before = 2)]
invisible: u32, // FIXME: change to bool
#[br(map = read_bool_from::<u32>)]
#[bw(map = write_bool_as::<u32>)]
invisible: bool,
},
#[brw(magic = 0xC8u16)]
ZoneIn {
@ -43,7 +47,7 @@ pub struct ActorControl {
impl Default for ActorControl {
fn default() -> Self {
Self {
category: ActorControlCategory::ToggleInvisibility { invisible: 1 },
category: ActorControlCategory::ToggleInvisibility { invisible: false },
}
}
}
@ -60,7 +64,7 @@ pub struct ActorControlSelf {
impl Default for ActorControlSelf {
fn default() -> Self {
Self {
category: ActorControlCategory::ToggleInvisibility { invisible: 1 },
category: ActorControlCategory::ToggleInvisibility { invisible: false },
}
}
}