Skip to content

Commit d3c0478

Browse files
committed
Don't read scene from game, only load rpkgs if alocs are needed
1 parent b40c131 commit d3c0478

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/connect/game_connection.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ impl GameConnection {
1717
let mut socket = GameConnection::connect_to_game();
1818

1919
GameConnection::send_hello_message(&mut socket);
20-
GameConnection::send_message(&mut socket, "{\"type\":\"rebuildEntityTree\"}".to_string());
20+
GameConnection::send_message(&mut socket, r#"{"type":"rebuildEntityTree"}"#.to_string());
2121
GameConnection::send_message(&mut socket, r#"{"type":"listAlocEntities"}"#.to_string());
2222
GameConnection::send_message(&mut socket, r#"{"type":"listPfBoxEntities"}"#.to_string());
2323
GameConnection::send_message(&mut socket, r#"{"type":"listPfSeedPointEntities"}"#.to_string());

src/json_serde/entities_json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ pub struct PfBox {
9292
pub rotation: Rotation,
9393
#[serde(rename = "type")]
9494
pub r#type: Type,
95-
pub size: Scale,
95+
pub scale: Scale,
9696
}
9797

9898
#[derive(Debug, Serialize, Deserialize)]

src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ pub fn main() {
1111
}
1212

1313
io::stdout().flush().unwrap();
14-
let partition_manager = PackageScan::scan_packages(args[1].clone(), args[2].clone()).unwrap();
15-
16-
GameConnection::get_entity_list_from_game(args[3].as_str());
14+
// GameConnection::get_entity_list_from_game(args[3].as_str());
1715
let nav_json = EntitiesJson::build_from_nav_json_file(args[3].clone());
1816
let needed_aloc_hashes = AlocExtraction::get_all_aloc_hashes(&nav_json, args[5].clone());
1917

@@ -23,7 +21,7 @@ pub fn main() {
2321
} else {
2422
println!("Extracting {} alocs.", needed_aloc_hashes.len());
2523
io::stdout().flush().unwrap();
26-
24+
let partition_manager = PackageScan::scan_packages(args[1].clone(), args[2].clone()).unwrap();
2725
AlocExtraction::extract_alocs(args[4].clone(), needed_aloc_hashes, &partition_manager, args[5].clone());
2826
}
2927
println!("Done building extracting alocs, pf boxes, and pf seed points from scenario and building output.nav.json.");

0 commit comments

Comments
 (0)