mirror of
https://github.com/redstrate/Kawari.git
synced 2025-06-30 11:47:45 +00:00
Fix signedness of scene yield params
According to the decompiled Lua code, they sometimes can return negative numbers (like -1, to indicate an error.) I also improved the debug display of these in the server log a bit.
This commit is contained in:
parent
476958a054
commit
d292e1d676
3 changed files with 3 additions and 3 deletions
|
@ -874,7 +874,7 @@ async fn client_loop(
|
|||
}
|
||||
}
|
||||
ClientZoneIpcData::EventHandlerReturn { handler_id, scene, error_code, num_results, params } => {
|
||||
tracing::info!("Finishing this event... {handler_id} {error_code} {scene} {params:#?}");
|
||||
tracing::info!("Finishing this event... {handler_id} {error_code} {scene} {:?}", ¶ms[..*num_results as usize]);
|
||||
|
||||
connection
|
||||
.event
|
||||
|
|
|
@ -418,7 +418,7 @@ pub enum ClientZoneIpcData {
|
|||
scene: u16,
|
||||
error_code: u8,
|
||||
num_results: u8,
|
||||
params: [u32; 2],
|
||||
params: [i32; 2],
|
||||
},
|
||||
#[br(pre_assert(*magic == ClientZoneIpcType::Config))]
|
||||
Config(Config),
|
||||
|
|
|
@ -86,7 +86,7 @@ impl Event {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn finish(&mut self, scene: u16, results: &[u32], player: &mut LuaPlayer) {
|
||||
pub fn finish(&mut self, scene: u16, results: &[i32], player: &mut LuaPlayer) {
|
||||
let mut run_script = || {
|
||||
self.lua.scope(|scope| {
|
||||
let player = scope.create_userdata_ref_mut(player)?;
|
||||
|
|
Loading…
Add table
Reference in a new issue