예제 #1
0
        private static void SharedCallOnWeaponFinished(WeaponState state, ICharacter character)
        {
            if (IsServer)
            {
                ServerCheckFiredShotsMismatch(state, character);
            }

            state.IsEventWeaponStartSent = false;

            if (IsClient)
            {
                // finished firing weapon on Client-side
                WeaponSystemClientDisplay.OnWeaponFinished(character);
            }
            else // if this is Server
            {
                // notify other clients about finished firing weapon
                using (var scopedBy = Api.Shared.GetTempList <ICharacter>())
                {
                    Server.World.GetScopedByPlayers(character, scopedBy);
                    Instance.CallClient(
                        scopedBy,
                        _ => _.ClientRemote_OnWeaponFinished(character));
                }
            }
        }
예제 #2
0
        private void ClientRemote_OnWeaponFinished(ICharacter whoFires)
        {
            if (whoFires == null ||
                !whoFires.IsInitialized)
            {
                return;
            }

            WeaponSystemClientDisplay.OnWeaponFinished(whoFires);
        }
예제 #3
0
 private void ClientRemote_OnWeaponFinished(ICharacter whoFires)
 {
     WeaponSystemClientDisplay.OnWeaponFinished(whoFires);
 }