Exemplo n.º 1
0
        private void ClientRemote_OnWeaponInputStop(ICharacter whoFires)
        {
            if (whoFires == null ||
                !whoFires.IsInitialized)
            {
                return;
            }

            WeaponSystemClientDisplay.OnWeaponInputStop(whoFires);
        }
Exemplo n.º 2
0
        private static void SharedCallOnWeaponInputStop(WeaponState state, ICharacter character)
        {
            Api.Assert(state.IsEventWeaponStartSent, "Firing event must be set");
            state.IsEventWeaponStartSent = false;

            if (IsClient)
            {
                // finished firing weapon on Client-side
                WeaponSystemClientDisplay.OnWeaponInputStop(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_OnWeaponInputStop(character));
            }
        }
Exemplo n.º 3
0
 private void ClientRemote_OnWeaponInputStop(ICharacter whoFires)
 {
     WeaponSystemClientDisplay.OnWeaponInputStop(whoFires);
 }