X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fmutators%2Fmutator%2Fgamemode_keyhunt.qc;h=d1316d2883b64fbf5ff6c672e25700c9c00170c0;hp=dc34e08eca145a14dd1817996ab0b132889f60fc;hb=9a502b2b9be023833212363c9ce74a3471d4b9dc;hpb=39d7296bebbb6ea486c5cdb59c7f60d11aedd1c3 diff --git a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc index dc34e08ec..d1316d288 100644 --- a/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/mutator/gamemode_keyhunt.qc @@ -1,3 +1,4 @@ +#include "gamemode_keyhunt.qh" #ifndef GAMEMODE_KEYHUNT_H #define GAMEMODE_KEYHUNT_H @@ -759,7 +760,7 @@ void kh_Key_Think() // runs all the time if(vlen(key.owner.origin - p) > autocvar_g_balance_keyhunt_maxdist) goto not_winning; kh_WinnerTeam(self.team); -:not_winning +LABEL(not_winning) } if(kh_interferemsg_time && time > kh_interferemsg_time) @@ -919,7 +920,7 @@ float kh_CheckPlayers(float num) float t_team = kh_Team_ByID(num); float players = 0; FOREACH_CLIENT(IS_PLAYER(it), LAMBDA( - if(!IS_DEAD(it) && !it.BUTTON_CHAT && it.team == t_team) + if(!IS_DEAD(it) && !PHYS_INPUT_BUTTON_CHAT(it) && it.team == t_team) ++players; )); @@ -943,7 +944,7 @@ void kh_WaitForPlayers() // delay start of the round until enough players are p if(KH_READY_TEAMS_OK()) { if(prev_missing_teams_mask > 0) - Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_MISSING_TEAMS); + Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_MISSING_TEAMS); prev_missing_teams_mask = -1; Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_KEYHUNT_ROUNDSTART, autocvar_g_balance_keyhunt_delay_round); kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound); @@ -953,7 +954,7 @@ void kh_WaitForPlayers() // delay start of the round until enough players are p if(player_count == 0) { if(prev_missing_teams_mask > 0) - Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_MISSING_TEAMS); + Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_MISSING_TEAMS); prev_missing_teams_mask = -1; } else @@ -973,8 +974,8 @@ void kh_WaitForPlayers() // delay start of the round until enough players are p void kh_EnableTrackingDevice() // runs after each round { - Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT); - Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER); + Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT); + Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT_OTHER); kh_tracking_enabled = true; } @@ -996,8 +997,8 @@ void kh_StartRound() // runs at the start of each round return; } - Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT); - Kill_Notification(NOTIF_ALL, world, MSG_CENTER_CPID, CPID_KEYHUNT_OTHER); + Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT); + Kill_Notification(NOTIF_ALL, world, MSG_CENTER, CPID_KEYHUNT_OTHER); for(i = 0; i < kh_teams; ++i) { @@ -1005,7 +1006,7 @@ void kh_StartRound() // runs at the start of each round players = 0; entity my_player = world; FOREACH_CLIENT(IS_PLAYER(it), LAMBDA( - if(!IS_DEAD(it) && !it.BUTTON_CHAT && it.team == teem) + if(!IS_DEAD(it) && !PHYS_INPUT_BUTTON_CHAT(it) && it.team == teem) { ++players; if(random() * players <= 1) @@ -1352,6 +1353,7 @@ MUTATOR_HOOKFUNCTION(kh, PlayerUseKey) MUTATOR_HOOKFUNCTION(kh, HavocBot_ChooseRole) { + SELFPARAM(); if(IS_DEAD(self)) return true;