Hmm, imo, i would go for an action struct, something like that:
This is your action:
struct Action:
{
std::function<void(Actor&, sf::Time)> action
Category category
}
Which contain a function and the category of the entities targeted. You create some lambdas in another/same file to make your actions, then you just have to make your Node's actors bearing a method like this one:
void Actor::receiveOrder(const Action& order, sf::Time dt)
{
if (order.category == mCategory)
{
order.action(this, dt)
}
// Then you distribute this order to all the other nodes
}
This way you may make an queue of actions, so you're sure they are triggered in the right order.
Well there are better system than categories, like a ID with specials value for differents actor or make category an array of categories and then check if the actor category fit one of the categories set ( 'cause you can use
variadic functions, but I dislike it) or use bit shif (<<) to assign a int to each category in order to use the bitwise operator . . . But at your place, I would go for something like that