forked from StrafesNET/strafe-client
minor tweak to loading map from arg
This commit is contained in:
parent
34ac541260
commit
a8d54fdd7c
@ -217,9 +217,8 @@ pub fn setup_and_start(title:String){
|
|||||||
//the thread that spawns the physics thread
|
//the thread that spawns the physics thread
|
||||||
let mut window_thread=window.into_worker(setup_context);
|
let mut window_thread=window.into_worker(setup_context);
|
||||||
|
|
||||||
let args:Vec<String>=std::env::args().collect();
|
if let Some(arg)=std::env::args().nth(1){
|
||||||
if args.len()==2{
|
let path=std::path::PathBuf::from(arg);
|
||||||
let path=std::path::PathBuf::from(&args[1]);
|
|
||||||
window_thread.send(TimedInstruction{
|
window_thread.send(TimedInstruction{
|
||||||
time:integer::Time::ZERO,
|
time:integer::Time::ZERO,
|
||||||
instruction:WindowInstruction::WindowEvent(winit::event::WindowEvent::DroppedFile(path)),
|
instruction:WindowInstruction::WindowEvent(winit::event::WindowEvent::DroppedFile(path)),
|
||||||
|
Loading…
Reference in New Issue
Block a user