Excluding a specific client from a multicast?

How do I exclude a specific client from a multicast?

Hello, I’m working on a coop game on which the pawn are physics driven only (only applying forces at some locations of the skeletal mesh according to user inputs - airplane simulation). And I am having a hard time replicating correctly over the network.

I choosed to make every client in full control of their movments (not asking the server to apply forces), because it’ll be a coop/solo only game and cheating is none of my concerns.

I’m not using the “replicate movment” code in the actors as it is not working right for me with the “physics only” based movements.

here is the shema of my intended networking right now:

I already tried to get player id from the client who ask to update in the first place, then get the player id in the multicast and compare, but the player id in the multicast is always 0.

Thanks for reading, any suggestions will be appreciated :slight_smile:

2 Likes

OK, I figured it out myself, it’s currently in blueprints (faster to test) but I’ll be putting this logic inside my aircraft class today. I just do a is local controller on the controller of the pawn i want to update, and if it’s true, that’s mean we are about to update the pawn locally controlled (we don’t want to do this), add an inverter a branch and it’s done. I have a multicast that doesn’t fire on the client who requested it. Which makes client authoritive coop game possible (not good for cheating). I got a lot of valuable info on this thread (thx rama): [Video] Player-Controlled Replicating Physics Movement, Simulating Physics! - C++ - Epic Developer Community Forums!

4 Likes

Awesome. This is exactly what I need. Thanks for posting your solution!

thanks for your valuable question and answer :]
going to use that.

by the way why don’t you mark your own answer as accepted?

I haven’t figured how to do that yet ^^"

Really appreciate this! Hope more people find this!

The only issue with this approach is that – I think – the network is still being used, but the client will simply run nothing other than the if statement. Does anyone know if there’s a way to do it without the network being involved? (Sorry for bumping an old thread, I have been searching for literally 40 minutes.)