Reloading done on Server Side Instead of Client Side


I am trying to do an authoritative server where the reloading is implemented on the server side instead of the function side. Can anyone give me some tips on how to do this? I believe the attached ShooterWeapon_Instant.cpp is the server side code, and the pasted code below is the ShooterWeapon.cpp client code. Thanks!

Hi lilshadowy13 - I’ve removed the code etc. from your post, please avoid posting engine source code or template source code on the forums unless it’s in small snippets :slight_smile:

The part you’re looking for is in ShooterWeapon.cpp, which shares all common logic for the two weapon types (instant and projectile). Server and Client code exists in all the weapon classes. You will notice that the weapon’s clips and current ammo are only ever modified by a function called only on the Server.