mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
added new ctf sounds
This commit is contained in:
parent
1f41af2964
commit
87cf8cc5ac
|
@ -200,10 +200,14 @@ sounds {
|
||||||
"data/audio/sfx_ctf_rtn.wv"
|
"data/audio/sfx_ctf_rtn.wv"
|
||||||
}
|
}
|
||||||
|
|
||||||
ctf_grab {
|
ctf_grab_pl {
|
||||||
"data/audio/sfx_ctf_grab_pl.wv"
|
"data/audio/sfx_ctf_grab_pl.wv"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctf_grab_en {
|
||||||
|
"data/audio/sfx_ctf_grab_en.wv"
|
||||||
|
}
|
||||||
|
|
||||||
ctf_capture {
|
ctf_capture {
|
||||||
"data/audio/sfx_ctf_cap_pl.wv"
|
"data/audio/sfx_ctf_cap_pl.wv"
|
||||||
}
|
}
|
||||||
|
|
|
@ -119,7 +119,17 @@ void gameobject_ctf::tick()
|
||||||
f->at_stand = 0;
|
f->at_stand = 0;
|
||||||
f->carrying_player = players[i];
|
f->carrying_player = players[i];
|
||||||
f->carrying_player->score += 1;
|
f->carrying_player->score += 1;
|
||||||
create_sound_global(SOUND_CTF_GRAB);
|
|
||||||
|
for(int c = 0; c < MAX_CLIENTS; c++)
|
||||||
|
{
|
||||||
|
if(!players[c])
|
||||||
|
continue;
|
||||||
|
|
||||||
|
if(players[c]->team == fi)
|
||||||
|
create_sound_global(SOUND_CTF_GRAB_EN, c);
|
||||||
|
else
|
||||||
|
create_sound_global(SOUND_CTF_GRAB_PL, c);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1550,7 +1550,7 @@ void create_sound_global(int sound, int target)
|
||||||
|
|
||||||
msg_pack_start(MSG_SOUND_GLOBAL, MSGFLAG_VITAL);
|
msg_pack_start(MSG_SOUND_GLOBAL, MSGFLAG_VITAL);
|
||||||
msg_pack_int(sound);
|
msg_pack_int(sound);
|
||||||
server_send_msg(-1);
|
server_send_msg(target);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: should be more general
|
// TODO: should be more general
|
||||||
|
|
Loading…
Reference in a new issue