-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/rewrite/v3' into rewrite/v3
- Loading branch information
Showing
7 changed files
with
33 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
**/target | ||
.idea | ||
.vscode | ||
/crates/lib/dummy_lib/Cargo.lock | ||
|
||
Cargo.lock | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
use std::sync::Arc; | ||
use ferrumc_ecs::Universe; | ||
use ferrumc_macros::bake_packet_registry; | ||
use std::sync::{atomic::AtomicBool, Arc}; | ||
|
||
pub mod connection; | ||
pub mod errors; | ||
pub mod packets; | ||
pub mod connection; | ||
pub mod server; | ||
pub mod utils; | ||
pub type NetResult<T> = Result<T, errors::NetError>; | ||
|
||
|
||
pub struct ServerState { | ||
pub universe: Universe | ||
pub universe: Universe, | ||
pub log_packets: AtomicBool, | ||
} | ||
|
||
pub type GlobalState = Arc<ServerState>; | ||
|
||
impl ServerState { | ||
pub fn new(universe: Universe) -> Self { | ||
pub fn new(universe: Universe, log_packets: AtomicBool) -> Self { | ||
Self { | ||
universe | ||
universe, | ||
log_packets, | ||
} | ||
} | ||
} | ||
|
||
|
||
bake_packet_registry!("\\src\\packets\\incoming"); | ||
bake_packet_registry!("\\src\\packets\\incoming"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters