From 1c1c2a06b5cb7ce1473a2e6961565275accf50bb Mon Sep 17 00:00:00 2001 From: metamuffin Date: Thu, 9 Jan 2025 14:46:18 +0100 Subject: fix clear option always enabled --- world/src/main.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'world') diff --git a/world/src/main.rs b/world/src/main.rs index 7b5afc3..eeea1c9 100644 --- a/world/src/main.rs +++ b/world/src/main.rs @@ -165,10 +165,12 @@ fn main() -> Result<()> { } } Packet::Add(ob_a, _) => { - if Some(ob_a) != ob { - info!("removing object {ob_a}"); - Packet::Remove(ob_a).write(&mut sock)?; - sock.flush()?; + if args.clear { + if Some(ob_a) != ob { + info!("removing object {ob_a}"); + Packet::Remove(ob_a).write(&mut sock)?; + sock.flush()?; + } } } _ => (), -- cgit v1.2.3-70-g09d2