Skip to content

Commit

Permalink
remove unnecessary player reservation
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdean authored and igorlira committed Aug 30, 2024
1 parent 35db7c9 commit e064e4b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions vm-rust/src/player/handlers/datum_handlers/script.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ impl ScriptDatumHandlers {
let lctx: &crate::director::lingo::script::ScriptContext = get_lctx_for_script(player, script).unwrap();
let instance = ScriptInstance::new(instance_id, script_ref.to_owned(), script, lctx);
let instance_ref = player.allocator.alloc_script_instance(instance);
let datum_ref = reserve_player_mut(|player| {
player.alloc_datum(Datum::ScriptInstanceRef(instance_ref.clone()))
});
let datum_ref = player.alloc_datum(Datum::ScriptInstanceRef(instance_ref.clone()));
(instance_ref, datum_ref)
})
}
Expand Down

0 comments on commit e064e4b

Please sign in to comment.