Skip to content

Commit

Permalink
actually fix it
Browse files Browse the repository at this point in the history
  • Loading branch information
jupyterkat committed Apr 7, 2024
1 parent 3aecf18 commit 7f42250
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/turfs/processing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,13 +396,11 @@ fn post_process() {
if should_react {
drop(sender.try_send(Box::new(move || {
let turf = ByondValue::new_ref(ValueType::Turf, id);
react_hook(
turf.read_var_id(byond_string!("air")).wrap_err_with(|| {
format!("Tried to call react on turf {turf:?} with invalid air!")
})?,
turf,
)
.wrap_err("Reacting")?;
//turf is no longer valid for reactions
let Ok(air) = turf.read_var_id(byond_string!("air")) else {
return Ok(());
};
react_hook(air, turf).wrap_err("Reacting")?;
Ok(())
})));
}
Expand Down

0 comments on commit 7f42250

Please sign in to comment.