X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Ftarget_music.qc;h=cd1b374e6b247fab04cf6d8d85cfea5f67c7da6f;hb=9179659ce2defb99b5a599ef799bb7905824b9bc;hp=daab6469981c021bf8224e4bf5816a9705876d08;hpb=21cd0bef7a9329d0201610bccedf8a29048b0291;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/target_music.qc b/qcsrc/server/target_music.qc index daab64699..cd1b374e6 100644 --- a/qcsrc/server/target_music.qc +++ b/qcsrc/server/target_music.qc @@ -28,8 +28,13 @@ void target_music_use() { if(!activator) return; - msg_entity = activator; - target_music_sendto(MSG_ONE, 1); + if(IS_REAL_CLIENT(activator)) + { + msg_entity = activator; + target_music_sendto(MSG_ONE, 1); + } + entity head; + FOR_EACH_SPEC(head) if(head.enemy == activator) { msg_entity = head; target_music_sendto(MSG_ONE, 1); } } void spawnfunc_target_music() { @@ -63,7 +68,7 @@ void TargetMusic_RestoreGame() float trigger_music_SendEntity(entity to, float sf) { WriteByte(MSG_ENTITY, ENT_CLIENT_TRIGGER_MUSIC); - sf &~= 0x80; + sf &= ~0x80; if(self.cnt) sf |= 0x80; WriteByte(MSG_ENTITY, sf);