Here is the rep notify called by the server. Hit actor is correct, all other values are correct, but the impact point is 0,0.0 no matter what I do. Is this an engine failure or am I doing something wrong?
Here is the image of impact point and sphere trace.
Since there is already a repnotify event called from the server, the same information is sent to everyone at the same time and in response to the problem it returns 0,0,0 on both the clients and the server.
One thing that might be causing problems is that you are setting impactpoint in a loop.
Perhaps you should convert it to an array and then iterate over it in onrep impact point?
Also maybe debug the points during AttackOnServer with some points of spheres to see if they are in the right place.
I tried this way without loop, the result is still the same 0 point.
The person he hit is normal, the system is working properly, but this 0,0,0 return seems to be a problem for me in the future.
I added a control to the get weapon cd interface here and if there is a cool down inside, it does not deal new damage. After adding this the error was fixed. But I still don’t understand why it is getting better when I add it.