fixed incorrect script message delivery in case of targeted mode
@@ -175,6 +175,7 @@ impl ScriptMessageDispatcher {
if let Some(receivers) = self.type_groups.get(&payload.deref().type_id()) {
match message.kind {
ScriptMessageKind::Targeted(target) => {
+ if receivers.contains(&target) {
let mut context = ScriptMessageContext {
dt,
elapsed_time,
@@ -189,6 +190,7 @@ impl ScriptMessageDispatcher {
s.on_message(&mut *payload, ctx)
})
}
+ }
ScriptMessageKind::Hierarchical { root, routing } => match routing {
RoutingStrategy::Up => {
let mut node = root;
