foxssake / netfox

Addons for building multiplayer games with Godot
https://foxssake.github.io/netfox/
MIT License
389 stars 16 forks source link

Projectiles can be spawned by NetworkWeapon without an ID in their name #235

Closed Lexari0 closed 1 month ago

Lexari0 commented 2 months ago

_accept_projectile in network_weapon.gd has a code path which calls _spawn() without calling _save_projectile(...) on the result, leading to a server with the correct name (eg: "Bullet IDIDIDIDID") and a client with an incorrect name (eg: "Bullet").

This leads all future projectile spawns to desync as their names will be different on the server (eg: "Bullet IDIDIDIDID") and client (eg: "Bullet2 IDIDIDID"), causing RPCs to fall.

elementbound commented 2 months ago

Thanks for the catch! Created draft PR #237