So basically, in my combat system, I handle the visuals on the client, the client also detect eligible targets and then pass the info to the server. The server processes it, do sanity checks and verify if the client’s request was valid. I believe this works fine, however, there are problems that arose:
First, the client needs to pass a ‘waitT’, this basically indicates the amount of time that the server needs to wait before executing the actual attack (Eg: dmg, etc…) as there are actions that need to be done prior to it. I’m unsure if we should pass in that ‘waitT’ value from the client to the server or let the server do its own calculations to retrieve the waitT (Although the latter only applies to a minority of attacks as the waitT is dependent on distance between the target and the plr, and as you know positions do not replicate well at all so inaccuracies may occur)
Second, assuming that the attack was successful on the server, should an invocation for effects be made to the client ? Since I do not want to re-use the logic that sanitize the hitbox on the server to check if the attack WILL be valid on the client itself, I presume I would have to implement that. This question applies to debounces as well.