mirror of
https://github.com/redstrate/Kawari.git
synced 2025-04-21 23:17:45 +00:00
Fix crash when entering certain zones, remove stuff doesn't work
There's some fadein/fadeout nonsense that isn't really doing anything right now, and can be killed.
This commit is contained in:
parent
f961d7a78e
commit
89db2ce920
3 changed files with 12 additions and 43 deletions
|
@ -256,6 +256,11 @@
|
|||
"name": "EventRelatedUnk",
|
||||
"opcode": 861,
|
||||
"size": 16
|
||||
},
|
||||
{
|
||||
"name": "Unk19",
|
||||
"opcode": 379,
|
||||
"size": 16
|
||||
}
|
||||
],
|
||||
"ServerLobbyIpcType": [
|
||||
|
|
|
@ -719,7 +719,6 @@ async fn main() {
|
|||
.unwrap()
|
||||
.find_exit_box(*exit_box_id)
|
||||
.unwrap();
|
||||
tracing::info!("exit box: {:#?}", exit_box);
|
||||
|
||||
// find the pop range on the other side
|
||||
let new_zone = Zone::load(exit_box.territory_type);
|
||||
|
@ -736,48 +735,6 @@ async fn main() {
|
|||
new_territory = exit_box.territory_type;
|
||||
}
|
||||
|
||||
// fade out?
|
||||
{
|
||||
let ipc = ServerZoneIpcSegment {
|
||||
op_code: ServerZoneIpcType::PrepareZoning,
|
||||
timestamp: timestamp_secs(),
|
||||
data: ServerZoneIpcData::PrepareZoning {
|
||||
unk: [0x01000000, 0, 0, 0],
|
||||
},
|
||||
..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;
|
||||
}
|
||||
|
||||
// fade out? x2
|
||||
{
|
||||
let ipc = ServerZoneIpcSegment {
|
||||
op_code: ServerZoneIpcType::PrepareZoning,
|
||||
timestamp: timestamp_secs(),
|
||||
data: ServerZoneIpcData::PrepareZoning {
|
||||
unk: [0, 0x00000085, 0x00030000, 0x000008ff], // last thing is probably a float?
|
||||
},
|
||||
..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;
|
||||
}
|
||||
|
||||
tracing::info!("sending them to {:#?}", new_territory);
|
||||
|
||||
connection.change_zone(new_territory).await;
|
||||
}
|
||||
ClientZoneIpcData::ActionRequest(request) => {
|
||||
|
@ -885,6 +842,9 @@ async fn main() {
|
|||
event.scene_finished(&mut lua_player, *unk2);
|
||||
}
|
||||
}
|
||||
ClientZoneIpcData::Unk19 { .. } => {
|
||||
tracing::info!("Recieved Unk19!");
|
||||
}
|
||||
}
|
||||
}
|
||||
SegmentType::KeepAlive { id, timestamp } => {
|
||||
|
|
|
@ -362,6 +362,10 @@ pub enum ClientZoneIpcData {
|
|||
unk3: u32,
|
||||
unk4: u32,
|
||||
},
|
||||
#[br(pre_assert(*magic == ClientZoneIpcType::Unk19))]
|
||||
Unk19 {
|
||||
unk: [u8; 16], // TODO: unknown
|
||||
},
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
|
Loading…
Add table
Reference in a new issue