2756 {
2757
2758 super.OnRPC(sender, rpc_type,ctx);
2759
2760
2761 switch (rpc_type)
2762 {
2763 #ifndef SERVER
2764 #ifndef NO_GUI
2765 case ERPCs.RPC_SOUND_LOCK_ATTACH:
2766 {
2768
2770 return;
2771
2772 bool play = p.param1;
2773 string soundSet = p.param2;
2774
2775 if (play)
2776 {
2778 {
2780 {
2782 }
2783 }
2784 else
2785 {
2787 }
2788 }
2789 else
2790 {
2792 }
2793
2794 break;
2795 }
2796 case ERPCs.RPC_ITEM_SOUND_PLAY:
2797 {
2798 int count;
2799 if (!ctx.
Read(count))
2800 return;
2801
2802 for (int i = 0; i < count; i++)
2803 {
2804 int soundIdPlay, slotIdPlay;
2805 if (!ctx.
Read(soundIdPlay))
2806 return;
2807
2808 if (!ctx.
Read(slotIdPlay))
2809 return;
2810
2813 }
2814 break;
2815 }
2816 case ERPCs.RPC_ITEM_SOUND_STOP:
2817 {
2818 int soundIdStop;
2819 if (!ctx.
Read(soundIdStop))
2820 return;
2821
2824 break;
2825 }
2826 #endif
2827 #endif
2828
2829 }
2830
2832 {
2834 }
2835 }
WrittenNoteData GetWrittenNoteData()
ref ItemSoundHandler m_ItemSoundHandler
EffectSound m_LockingSound
static EffectSound PlaySound(string sound_set, vector position, float play_fade_in=0, float stop_fade_out=0, bool loop=false)
Create and play an EffectSound.
static void DestroyEffect(Effect effect)
Unregisters, stops and frees the Effect.
Manager class for managing Effect (EffectParticle, EffectSound)
proto bool Read(void value_in)
void OnRPC(PlayerIdentity sender, int rpc_type, ParamsReadContext ctx)
vector GetPosition()
Get the world position of the Effect.