#ENet Multiplayer physics impulse - pushing other players

1 messages · Page 1 of 1 (latest)

leaden vortex
#

I want each player to be able to push other players, when _raycast is colliding with them and "attack" action is pressed, this seems to work so far, but since I've never done multiplayer in Godot before, I'm wondering if there is anything wrong with this code.

Perhaps there are better ways to do it? I'm open to suggestions!

This is the script for player: (C#)
https://pastebin.com/Ejk3SU0D

lapis night
#

This looks fine, given players are client authoritative, and assuming cheating is not of great concern?

Obviously the risk vector here is that in a modified client, any player can send "I pushed this player" with no validation, and any player could just throw away requests to be pushed (but given that this looks like client authority, I'm assuming neither of these are of concern)

lapis night
#

(And what little processing it takes to get the node on push)