From 7576f632a88f5f5dc46d6bbcb4850745aef90e2a Mon Sep 17 00:00:00 2001
From: juliancoffee <lightdarkdaughter@gmail.com>
Date: Sun, 26 Sep 2021 20:34:54 +0300
Subject: [PATCH] Adress review

- Added comments on why Waypoint branch of NpcData is unreachable.
- Added comments on signature of get_adhoc_loadout.
---
 server/src/rtsim/entity.rs | 3 +++
 server/src/rtsim/tick.rs   | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/server/src/rtsim/entity.rs b/server/src/rtsim/entity.rs
index 8ffff701f5..5c4afcb4b9 100644
--- a/server/src/rtsim/entity.rs
+++ b/server/src/rtsim/entity.rs
@@ -96,6 +96,9 @@ impl Entity {
         }
     }
 
+    /// Escape hatch for runtime creation of loadout not covered by entity config.
+    // NOTE: Signature is part of interface of EntityInfo, and site information
+    // is not used for RtSim as of now.
     pub fn get_adhoc_loadout(
         &self,
     ) -> fn(LoadoutBuilder, Option<&trade::SiteInformation>) -> LoadoutBuilder {
diff --git a/server/src/rtsim/tick.rs b/server/src/rtsim/tick.rs
index abd0657f1b..3769526538 100644
--- a/server/src/rtsim/tick.rs
+++ b/server/src/rtsim/tick.rs
@@ -166,6 +166,9 @@ impl<'a> System<'a> for Sys {
                         rtsim_entity,
                         projectile: None,
                     },
+                    // EntityConfig can't represent Waypoints at all
+                    // as of now, and if someone will try to spawn
+                    // rtsim waypoint it is definitely error.
                     NpcData::Waypoint(_) => unimplemented!(),
                 }
             };