Skip to content

Commit 1644552

Browse files
committed
исправил кнопки для выбора игроков
1 parent 6343366 commit 1644552

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

ChangedScripts/ScoreboardCommon.as

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ SColor getNameColour(CPlayer@ p)
2121
c = SColor(0xffb400ff); //dev
2222
} else if (username == "TerminalHash") {
2323
c = SColor(0xff75507b);
24+
} else if (username == "kusaka79") {
25+
c = SColor(0xff000000);
2426
} else if (p.isGuard() && showColor) {
2527
c = SColor(0xffa0ffa0); //guard
2628
} else if (isAdmin(p) && showColor) {

ChangedScripts/ScoreboardRender.as

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ float drawScoreboard(CPlayer@ localplayer, CPlayer@[] players, Vec2f topleft, CT
587587
s32 kills = p.getKills();
588588
s32 deaths = p.getDeaths();
589589
s32 assists = p.getAssists();
590-
590+
591591
if (old_stats)
592592
{
593593
OldPlayerStatsCore@ old_player_stats_core;
@@ -616,7 +616,7 @@ float drawScoreboard(CPlayer@ localplayer, CPlayer@[] players, Vec2f topleft, CT
616616
GUI::DrawText("" + deaths, Vec2f(bottomright.x - 190, topleft.y), kdr_color);
617617
GUI::DrawText("" + assists, Vec2f(bottomright.x - 120, topleft.y), kdr_color);
618618
GUI::DrawText("" + formatFloat(kills / Maths::Max(f32(deaths), 1.0f), "", 0, 2), Vec2f(bottomright.x - 50, topleft.y), kdr_color);
619-
619+
620620
bool local_is_captain = localplayer !is null && localplayer.getUsername()==rules.get_string("team_"+localplayer.getTeamNum()+"_leader");
621621
bool player_is_our_guy = localplayer !is null && localplayer.getTeamNum()==p.getTeamNum() || localplayer !is null && 200 == p.getTeamNum();
622622
bool player_isnt_local = localplayer !is null && p !is localplayer;
@@ -626,15 +626,17 @@ float drawScoreboard(CPlayer@ localplayer, CPlayer@[] players, Vec2f topleft, CT
626626
MakeScoreboardButton(Vec2f(bottomright.x - 330, topleft.y-7), "spec", p.getUsername());
627627
MakeScoreboardButton(Vec2f(bottomright.x - 400, topleft.y-7), "red", p.getUsername());
628628
MakeScoreboardButton(Vec2f(bottomright.x - 470, topleft.y-7), "blue", p.getUsername());
629-
}
629+
}
630+
630631
else if (local_is_captain && player_is_our_guy && player_isnt_local) //&& !isPickingEnded()
631632
{
632-
MakeScoreboardButton(Vec2f(bottomright.x - 330, topleft.y-7), "spec", p.getUsername());
633-
if (localplayer.getTeamNum() == 0){
633+
if(p.getTeamNum() != 200) {
634+
MakeScoreboardButton(Vec2f(bottomright.x - 400, topleft.y-7), "spec", p.getUsername());
635+
}
636+
else if (localplayer.getTeamNum() == 0) {
634637
MakeScoreboardButton(Vec2f(bottomright.x - 400, topleft.y-7), "blue", p.getUsername());
635-
}
636-
else
637-
{
638+
}
639+
else if (localplayer.getTeamNum() == 1) {
638640
MakeScoreboardButton(Vec2f(bottomright.x - 400, topleft.y-7), "red", p.getUsername());
639641
}
640642
}
@@ -703,7 +705,7 @@ void onRenderScoreboard(CRules@ this)
703705
redplayers.push_back(p);
704706

705707
} /*
706-
else
708+
else
707709
{
708710
for (u32 j = 0; j < spectators.length; j++)
709711
{
@@ -859,7 +861,7 @@ void onRestart(CRules@ this)
859861
{
860862
continue;
861863
}
862-
864+
863865
// Cache previous game
864866
if (old_player_stats_core !is null)
865867
{

0 commit comments

Comments
 (0)