From: Samual Lenks Date: Fri, 1 Mar 2013 19:55:53 +0000 (-0500) Subject: Working more on keyhunt X-Git-Tag: xonotic-v0.7.0~62^2~23^2~56 X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=commitdiff_plain;h=c5030e698d62549b15f6ce877774d9586da3f7da Working more on keyhunt --- diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 1b205cee8f..421e958be9 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -276,10 +276,10 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, MSG_INFO_NOTIF(2, INFO_JOIN_PLAY, 1, 0, "s1", "", "", _("^BG%s^F3 is now playing\n"), "") \ MSG_INFO_NOTIF(1, INFO_KEEPAWAY_DROPPED, 1, 0, "s1", "s1", "notify_balldropped", _("^BG%s^BG has dropped the ball!\n"), "") \ MSG_INFO_NOTIF(1, INFO_KEEPAWAY_PICKUP, 1, 0, "s1", "s1", "notify_ballpickedup", _("^BG%s^BG has picked up the ball!\n"), "") \ - MSG_INFO_NOTIF(1, INFO_KEYHUNT_CAPTURE, 2, 0, "s1 s2", "", "", _("^BG%s captured the keys for the %s\n"), "") \ - MSG_INFO_NOTIF(1, INFO_KEYHUNT_DROP, 2, 0, "s1 s2", "", "", _("^BG%s^BG dropped the %s\n"), "") \ - MSG_INFO_NOTIF(1, INFO_KEYHUNT_LOST, 2, 0, "s1 s2", "", "", _("^BGThe %s^BG could not take care of the %s\n"), "") \ - MSG_INFO_NOTIF(1, INFO_KEYHUNT_PICKUP, 2, 0, "s1 s2", "", "", _("^BG%s^BG picked up the %s\n"), "") \ + MULTITEAM_INFO(1, INFO_KEYHUNT_CAPTURE_, 4, 1, 0, "s1", "", "", _("^BG%s captured the keys for the ^TC^TT team\n"), "") \ + MULTITEAM_INFO(1, INFO_KEYHUNT_DROP_, 4, 1, 0, "s1", "", "", _("^BG%s^BG dropped the ^TC^TT key\n"), "") \ + MULTITEAM_INFO(1, INFO_KEYHUNT_LOST_, 4, 1, 0, "s1", "", "", _("^BG%s^BG could not take care of the ^TC^TT key\n"), "") \ + MULTITEAM_INFO(1, INFO_KEYHUNT_PICKUP_, 4, 1, 0, "s1", "", "", _("^BG%s^BG picked up the ^TC^TT key\n"), "") \ MSG_INFO_NOTIF(1, INFO_LMS_NOLIVES, 1, 0, "s1", "", "", _("^BG%s^F3 has no more lives left\n"), "") \ MSG_INFO_NOTIF(1, INFO_LMS_FORFEIT, 1, 0, "s1", "", "", _("^BG%s^F3 forfeited\n"), "") \ MSG_INFO_NOTIF(1, INFO_POWERUP_INVISIBILITY, 1, 0, "s1", "s1", "strength", _("^BG%s^K1 picked up Invisibility\n"), "") \ @@ -443,13 +443,13 @@ void Send_CSQC_Centerprint_Generic(entity e, float id, string s, float duration, MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_UNAVAILABLE, 0, 1, "item_wepname", CPID_ITEM, "item_centime 0", _("^F1%s^BG is ^F4not available^BG on this map"), "") \ MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_DROPPED, 1, 0, "s1", CPID_KEEPAWAY, "0 0", _("^BG%s^BG has dropped the ball!"), "") \ MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_PICKUP, 1, 0, "s1", CPID_KEEPAWAY, "0 0", _("^BG%s^BG has picked up the ball!"), "") \ - MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_WARN, 0, 0, "", CPID_KA_WARN, "0 0", _("^BGKilling people while you don't have the ball gives no points!"), "") \ - MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_HELP, 0, 0, "", CPID_KEYHUNT, "0 0", _("^BGAll keys are in your team's hands!"), _("Help the key carriers to meet!")) \ - MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_INTERFERE, 1, 0, "s1", CPID_KEYHUNT, "0 0", _("^BGAll keys are in %s's hands!"), _("Interfere ^F4NOW^BG!")) \ - MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_MEET, 0, 0, "", CPID_KEYHUNT, "0 0", _("^BGAll keys are in your team's hands!"), _("Meet the other key carriers ^F4NOW^BG!")) \ + MSG_CENTER_NOTIF(1, CENTER_KEEPAWAY_WARN, 0, 0, "", CPID_KEEPAWAY_WARN, "0 0", _("^BGKilling people while you don't have the ball gives no points!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_HELP, 0, 0, "", CPID_KEYHUNT, "0 0", _("^BGAll keys are in your team's hands!\nHelp the key carriers to meet!"), "") \ + MULTITEAM_CENTER(1, CENTER_KEYHUNT_INTERFERE_, 4, 0, 0, "", CPID_KEYHUNT, "0 0", _("^BGAll keys are in ^TC^TT team^BG's hands!\nInterfere ^F4NOW^BG!"), "") \ + MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_MEET, 0, 0, "", CPID_KEYHUNT, "0 0", _("^BGAll keys are in your team's hands!\nMeet the other key carriers ^F4NOW^BG!"), "") \ MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_SCAN, 0, 0, "", CPID_KEYHUNT, "-1 0", _("^BGScanning frequency range..."), "") \ - MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_START, 1, 0, "s1", CPID_KEYHUNT, "0 0", _("^BGYou are starting with the %s"), "") \ - MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_WAIT, 1, 0, "s1", CPID_KEYHUNT, "-1 0", _("^BGWaiting for players to join..."), _("Need active players for: %s")) \ + MULTITEAM_CENTER(1, CENTER_KEYHUNT_START_, 4, 0, 0, "", CPID_KEYHUNT, "0 0", _("^BGYou are starting with the ^TC^TT key"), "") \ + MSG_CENTER_NOTIF(1, CENTER_KEYHUNT_WAIT, 0, 4, "kh_teams", CPID_KEYHUNT, "-1 0", _("^BGWaiting for players to join...\nNeed active players for: %s"), "") \ MSG_CENTER_NOTIF(1, CENTER_LMS_CAMPCHECK, 0, 0, "", CPID_LMS_CAMP, "0 0", _("^F2Don't camp!"), "") \ MSG_CENTER_NOTIF(1, CENTER_MOTD, 1, 0, "s1", CPID_MOTD, "-1 0", _("^BG%s"), "") \ MSG_CENTER_NOTIF(1, CENTER_MINSTA_FINDAMMO, 0, 0, "", CPID_MINSTA_FINDAMMO, "1 9", _("^F4^COUNT^BG left to find some ammo!"), "") \ diff --git a/qcsrc/server/mutators/gamemode_keyhunt.qc b/qcsrc/server/mutators/gamemode_keyhunt.qc index 3bdfcf778e..078c3d9951 100644 --- a/qcsrc/server/mutators/gamemode_keyhunt.qc +++ b/qcsrc/server/mutators/gamemode_keyhunt.qc @@ -398,7 +398,7 @@ void kh_Key_Collect(entity key, entity player) //a player picks up a dropped ke PlayerScore_Add(player, SP_KH_PICKUPS, 1); } key.kh_dropperteam = 0; - Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEYHUNT_PICKUP, player.netname, key.netname); + Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_PICKUP_), player.netname); kh_Key_AssignTo(key, player); // this also updates .kh_state } @@ -476,7 +476,7 @@ void kh_FinishRound() // runs when a team captures the keys kh_Controller_SetThink(autocvar_g_balance_keyhunt_delay_round, kh_StartRound); } -void kh_WinnerTeam(float teem) // runs when a team wins +void kh_WinnerTeam(float teem) // runs when a team wins // Samual: Teem?.... TEEM?!?! what the fuck is wrong with you people { // all key carriers get some points vector firstorigin, lastorigin, midpoint; @@ -506,7 +506,7 @@ void kh_WinnerTeam(float teem) // runs when a team wins first = FALSE; } - Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEYHUNT_CAPTURE, keyowner, Team_ColoredFullName(teem)); + Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_NUM_4(teem, INFO_KEYHUNT_CAPTURE_), keyowner); first = TRUE; midpoint = '0 0 0'; @@ -621,7 +621,7 @@ void kh_LoserTeam(float teem, entity lostkey) // runs when a player pushes a fl } } - Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEYHUNT_LOST, Team_ColoredFullName(teem), lostkey.netname); + Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_4(lostkey, INFO_KEYHUNT_LOST_), lostkey.kh_previous_owner.netname); play2all(kh_sound_destroy); te_tarexplosion(lostkey.origin); @@ -680,7 +680,7 @@ void kh_Key_Think() // runs all the time else Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_KEYHUNT_HELP); else - Send_Notification(NOTIF_ONE, head, MSG_CENTER, CENTER_KEYHUNT_INTERFERE, Team_ColoredFullName(kh_interferemsg_team)); + Send_Notification(NOTIF_ONE, head, MSG_CENTER, APP_TEAM_NUM_4(kh_interferemsg_team, CENTER_KEYHUNT_INTERFERE_)); } } @@ -739,7 +739,7 @@ void kh_Key_Spawn(entity initial_owner, float angle, float i) // runs every tim key.kh_worldkeynext = kh_worldkeylist; kh_worldkeylist = key; - Send_Notification(NOTIF_ONE, initial_owner, MSG_CENTER, CENTER_KEYHUNT_START, key.netname); + Send_Notification(NOTIF_ONE, initial_owner, MSG_CENTER, APP_TEAM_ENT_4(key, CENTER_KEYHUNT_START_)); WaypointSprite_Spawn("key-dropped", 0, 0, key, '0 0 1' * KH_KEY_WP_ZSHIFT, world, key.team, key, waypointsprite_attachedforcarrier, FALSE, RADARICON_FLAG, '0 1 1'); key.waypointsprite_attachedforcarrier.waypointsprite_visible_for_player = kh_Key_waypointsprite_visible_for_player; @@ -782,7 +782,7 @@ void kh_Key_DropOne(entity key) kh_Scores_Event(player, key, "dropkey", 0, 0); PlayerScore_Add(player, SP_KH_LOSSES, 1); - Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEYHUNT_DROP, player.netname, key.netname); + Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_DROP_), player.netname); kh_Key_AssignTo(key, world); makevectors(player.v_angle); @@ -808,7 +808,7 @@ void kh_Key_DropAll(entity player, float suicide) // runs whenever a player dies { kh_Scores_Event(player, key, "losekey", 0, 0); PlayerScore_Add(player, SP_KH_LOSSES, 1); - Send_Notification(NOTIF_ANY, world, MSG_INFO, INFO_KEYHUNT_LOST, player.netname, key.netname); + Send_Notification(NOTIF_ANY, world, MSG_INFO, APP_TEAM_ENT_4(key, INFO_KEYHUNT_LOST_), player.netname); kh_Key_AssignTo(key, world); makevectors('-1 0 0' * (45 + 45 * random()) + '0 360 0' * random()); key.velocity = W_CalculateProjectileVelocity(player.velocity, autocvar_g_balance_keyhunt_dropvelocity * v_forward, FALSE); @@ -866,7 +866,7 @@ void kh_WaitForPlayers() // delay start of the round until enough players are p } else { - Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_KEYHUNT_WAIT, teams_missing); + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_KEYHUNT_WAIT, 1, 2, 3, 4); kh_Controller_SetThink(1, kh_WaitForPlayers); } } @@ -894,7 +894,7 @@ void kh_StartRound() // runs at the start of each round if(teams_missing != "") { kh_Controller_SetThink(1, kh_WaitForPlayers); - Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_KEYHUNT_WAIT, teams_missing); + Send_Notification(NOTIF_ANY, world, MSG_CENTER, CENTER_KEYHUNT_WAIT, 1, 2, 3, 4); return; }