Relevant warning on ShooterGame

Hi!

I found the following **warning **on a clean vanila ShooterGame:


LogNet:Warning: UIpNetDriver::ProcesRemoteFunction: No owning connection for actor WeapGun_C_1. Function ServerStopFire will not be processed.

**How to replicate it [Listen Server]:
**1.- Open 2 Clients with DC Server setting turned off
2.- Meet them at any point of the map
3.- On the player which is the server swap weapon
4.- The warning will appear
5.- This warning won’t appear if the swap weapon is executed on the client

**How to replicate it [DCServer]:
**1.- Open 2 Clients with DC Server setting turned on
2.- Meet them at any point of the map
3.- On one of the clients swap weapon
4.- The warning will appear

**Known information about the bug:
**- It appeared on 4.16.0 ±

  • It happens when the weapon is “OnUnEquip” (line 133 on ShooterWeapon.cpp)
  • Cheap workaround: Not replicate this function on this situation.
  • This warning will produce very large log files on a normal gaming session

I get this as well. Been going on for several builds now.

Here is my solution! Willing to see better ones!

Before:


     void AShooterWeapon::StopFire()
     {
         if (Role < ROLE_Authority)
         {
             ServerStopFire();
         }

         if (bWantsToFire)
         {
             bWantsToFire = false;
             DetermineWeaponState();
         }
     }

After:


     void AShooterWeapon::StopFire()
     {
         if (Role < ROLE_Authority && MyPawn && MyPawn->IsLocallyControlled())
         {
             ServerStopFire();
         }

         if (bWantsToFire)
         {
             bWantsToFire = false;
             DetermineWeaponState();
         }
     }

Nice to see you solved it : )

This has been fixed on the most current version of ShooterGame