Advertisement
Guest User

Untitled

a guest
Jan 4th, 2013
38
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.57 KB | None | 0 0
  1. class Misc_StatBoard extends DMStatsScreen;
  2.  
  3. var Texture Box;
  4. var Texture BaseTex;
  5.  
  6. var int KillsX;
  7. var int DamageX;
  8. var int FiredX;
  9. var int AccX;
  10.  
  11. var Misc_PRI OwnerPRI;
  12. var Misc_PRI ViewPRI;
  13.  
  14. var Color CurrentColor;
  15.  
  16. struct StatItem
  17. {
  18. var class<Weapon> WeaponClass;
  19. var string WeaponName;
  20. };
  21.  
  22. var StatItem StatData[10];
  23.  
  24. static function float GetPercentage(float f1, float f2)
  25. {
  26. if(f1 == 0.0)
  27. return 0.0;
  28. return FMin(100.0, ((f2 / f1) * 100.0));
  29. }
  30.  
  31. function GetStatsFor(class<Weapon> weaponClass, TeamPlayerReplicationInfo ThePRI, out int killsw)
  32. {
  33. local int i;
  34.  
  35. killsw = 0;
  36. for(i = 0; i < ThePRI.WeaponStatsArray.Length; i++)
  37. {
  38. if(ThePRI.WeaponStatsArray[i].WeaponClass == weaponClass)
  39. {
  40. killsw = ThePRI.WeaponStatsArray[i].Kills;
  41. break;
  42. }
  43. }
  44. }
  45.  
  46. simulated function DrawBars(Canvas C, int num, int x, int y, int w, int h)
  47. {
  48. // background
  49. C.SetPos(x, y);
  50. C.DrawColor = CurrentColor; //HUDClass.default.WhiteColor * 0.15;
  51. //C.DrawColor.A = 128;
  52. C.DrawRect(Box, w, h * num);
  53.  
  54. // outline
  55. C.DrawColor = HUDClass.default.WhiteColor * 0.4;
  56. C.SetPos(x, y);
  57. C.DrawRect(Box, w, 1);
  58. C.SetPos(x, y);
  59. C.DrawRect(Box, 1, h * num);
  60. C.SetPos(x + w, y);
  61. C.DrawRect(Box, 1, h * num);
  62. C.SetPos(x, y + h * num);
  63. C.DrawRect(Box, w + 1, 1);
  64. }
  65.  
  66. simulated function DrawHitStat(Canvas C, int fired, int hit, int dam, int killsw, string WeaponName, int x, int y, int w, int h, int TextX, int TextY)
  67. {
  68. local int Acc;
  69. local float XL, YL;
  70.  
  71. DrawBars(C, 1, x, y, w, h);
  72.  
  73. Acc = GetPercentage(fired, hit);
  74.  
  75. C.SetPos(x + TextX, y + TextY);
  76.  
  77. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  78.  
  79. C.DrawText(WeaponName, true);
  80. C.StrLen(killsw, XL, YL);
  81. C.SetPos(x + KillsX - XL, y + TextY);
  82. C.DrawText(killsw, true);
  83.  
  84. C.StrLen(Fired@":", XL, YL);
  85. C.SetPos(x + FiredX - XL, y + TextY);
  86. C.DrawText(Fired@":", true);
  87.  
  88. C.StrLen(Acc, XL, YL);
  89. C.SetPos(x + AccX - XL, y + TextY);
  90. C.DrawText(Acc$"%", true);
  91.  
  92. C.StrLen(Dam, XL, YL);
  93. C.SetPos(x + DamageX - XL, y + TextY);
  94. C.DrawText(dam, true);
  95. }
  96.  
  97. simulated event DrawScoreBoard(Canvas C)
  98. {
  99.  
  100. local Misc_PRI TmpPRI;
  101. local BallisticPlayerReplicationInfo BWPRI;
  102.  
  103. local int Awards, Combos;
  104. local int TextX, TextY;
  105. local int Dam, killsw;
  106. local int i, j;
  107. local float XL, YL;
  108. local Color Red;
  109. local Color Blue;
  110. local Color OwnerColor;
  111. local Color ViewedColor;
  112. local string name;
  113. local byte OwnerTeam, ViewTeam;
  114.  
  115. local int BarX;
  116. local int BarY;
  117. local int BarW;
  118. local int BarH;
  119.  
  120. local int MiscX;
  121. local int MiscY;
  122. local int MiscW;
  123. local int MiscH;
  124.  
  125. local int PlayerBoxX;
  126. local int PlayerBoxY;
  127. local int PlayerBoxW;
  128. local int PlayerBoxH;
  129.  
  130. if(PlayerOwner == None)
  131. {
  132. PlayerOwner = UnrealPlayer(Owner);
  133. if(PlayerOwner == None)
  134. {
  135. Super.DrawScoreboard(C);
  136. return;
  137. }
  138. }
  139.  
  140. if(PRI == None)
  141. {
  142. PRI = TeamPlayerReplicationInfo(PlayerOwner.PlayerReplicationInfo);
  143.  
  144. if(PRI.bOnlySpectator || PRI.bOutOfLives)
  145. {
  146. if(Pawn(PlayerOwner.ViewTarget) != None)
  147. PRI = TeamPlayerReplicationInfo(Pawn(PlayerOwner.ViewTarget).PlayerReplicationInfo);
  148. else
  149. NextStats();
  150. }
  151. }
  152.  
  153. ViewPRI = Misc_PRI(PRI);
  154. if(OwnerPRI == None || Misc_Player(PlayerOwner).bFirstOpen )
  155. {
  156. OwnerPRI = Misc_PRI(PlayerOwner.PlayerReplicationInfo);
  157. if(PlayerOwner.PlayerReplicationInfo.bOnlySpectator && Pawn(PlayerOwner.ViewTarget) != None)
  158. {
  159. OwnerPRI = Misc_PRI(Pawn(PlayerOwner.ViewTarget).PlayerReplicationInfo);
  160. if(OwnerPRI == None)
  161. {
  162. if(ViewPRI != None)
  163. OwnerPRI = ViewPRI;
  164. else
  165. {
  166. Super.DrawScoreboard(C);
  167. return;
  168. }
  169. }
  170. }
  171.  
  172. Misc_Player(PlayerOwner).bFirstOpen = false;
  173. }
  174.  
  175. Red = HUDClass.default.RedColor;
  176. Red.A = 200;
  177. Blue = HUDClass.default.TurqColor;
  178. Blue.A = 200;
  179.  
  180. if(OwnerPRI.Team == None)
  181. OwnerTeam = 255;
  182. else
  183. OwnerTeam = OwnerPRI.Team.TeamIndex;
  184.  
  185. if(ViewPRI.Team == None)
  186. ViewTeam = 255;
  187. else
  188. ViewTeam = ViewPRI.Team.TeamIndex;
  189.  
  190. if(OwnerTeam == 255 || OwnerTeam == 1)
  191. OwnerColor = Blue;
  192. else
  193. OwnerColor = Red;
  194.  
  195. if(ViewTeam == 255 || ViewTeam == 1)
  196. ViewedColor = Blue;
  197. else
  198. ViewedColor = Red;
  199.  
  200. if(Level.TimeSeconds - LastUpdateTime > 5)
  201. {
  202. LastUpdateTime = Level.TimeSeconds;
  203. PlayerOwner.ServerUpdateStats(OwnerPRI);
  204. PlayerOwner.ServerUpdateStats(ViewPRI);
  205. }
  206.  
  207. MiscW = C.ClipX * 0.48;
  208.  
  209. PlayerBoxX = C.ClipX * 0.02;
  210. PlayerBoxW = C.ClipX * 0.46;
  211. PlayerBoxH = C.ClipY * 0.5174;
  212.  
  213. BarH = PlayerBoxH / 15;
  214. BarW = C.ClipX * 0.46;
  215.  
  216. TextX = 0.005 * C.ClipX;
  217. TextY = 0.0036 * C.ClipY;
  218.  
  219. KillsX = (PlayerBoxW * 0.69) * 0.4;
  220. AccX = (PlayerBoxW * 0.69) * 0.75;
  221. DamageX = (PlayerBoxW * 0.69) - TextX;
  222.  
  223. /* draw the player's backgrounds */
  224. // draw the top and example bar
  225. C.Style = ERenderStyle.STY_Alpha;
  226. C.DrawColor = HUDClass.default.WhiteColor;
  227. C.DrawColor.A = 175;
  228.  
  229. MiscX = C.ClipX * 0.01;
  230. MiscY = C.ClipY * 0.1;
  231. MiscH = C.ClipY * 0.1183;
  232. C.SetPos(MiscX, MiscY);
  233. C.DrawTile(BaseTex, MiscW, MiscH, 126, 126, 772, 137);
  234.  
  235. MiscX = C.ClipX * 0.51;
  236. C.SetPos(MiscX, MiscY);
  237. C.DrawTile(BaseTex, MiscW, MiscH, 126, 125, 772, 137);
  238.  
  239. MiscX = C.ClipX * 0.01;
  240. MiscY = MiscY + MiscH;
  241. MiscH = C.ClipY * 0.0366;
  242. MiscW = C.ClipX * 0.0075;
  243. C.SetPos(MiscX, MiscY);
  244. C.DrawTile(BaseTex, MiscW, MiscH, 126, 263, 10, 10);
  245.  
  246. MiscX = C.ClipX * 0.51;
  247. C.SetPos(MiscX, MiscY);
  248. C.DrawTile(BaseTex, MiscW, MiscH, 126, 263, 10, 10);
  249.  
  250. MiscX = C.ClipX * 0.01 + MiscW;
  251. MiscW = C.ClipX * 0.48 - (MiscW * 2);
  252. C.SetPos(MiscX, MiscY);
  253. C.DrawColor = OwnerColor;
  254. C.DrawTile(BaseTex, MiscW, MiscH, 137, 263, 751, 42);
  255.  
  256. C.SetPos(MiscX + MiscW, MiscY);
  257. C.DrawColor = HUDClass.default.WhiteColor;
  258. C.DrawColor.A = 175;
  259. C.DrawTile(BaseTex, C.ClipX * 0.0069, MiscH, 888, 263, 10, 10);
  260.  
  261. MiscX = MiscX + C.ClipX * 0.5;
  262. C.SetPos(MiscX, MiscY);
  263. C.DrawColor = ViewedColor;
  264. C.DrawTile(BaseTex, MiscW, MiscH, 137, 263, 751, 42);
  265.  
  266. C.SetPos(MiscX + MiscW, MiscY);
  267. C.DrawColor = HUDClass.default.WhiteColor;
  268. C.DrawColor.A = 175;
  269. C.DrawTile(BaseTex, C.ClipX * 0.0069, MiscH, 888, 263, 10, 10);
  270.  
  271. MiscX = C.ClipX * 0.01;
  272. MiscY = MiscY + MiscH;
  273. MiscH = C.ClipY * 0.005;
  274. MiscW = C.ClipX * 0.48;
  275. C.SetPos(MiscX, MiscY);
  276. C.DrawTile(BaseTex, MiscW, MiscH, 126, 306, 772, 4);
  277.  
  278. MiscX = C.ClipX * 0.51;
  279. C.SetPos(MiscX, MiscY);
  280. C.DrawTile(BaseTex, MiscW, MiscH, 126, 306, 772, 4);
  281.  
  282. PlayerBoxY = MiscY + MiscH + (C.ClipY * 0.005);
  283.  
  284. MiscX = C.ClipX * 0.01;
  285. MiscY = MiscY + MiscH;
  286. MiscH = C.ClipY * 0.5175;
  287. C.SetPos(MiscX, MiscY);
  288. C.DrawTile(BaseTex, MiscW, MiscH, 126, 398, 772, 10);
  289.  
  290. MiscX = C.ClipX * 0.51;
  291. C.SetPos(MiscX, MiscY);
  292. C.DrawTile(BaseTex, MiscW, MiscH, 126, 398, 772, 10);
  293.  
  294. MiscX = C.ClipX * 0.01;
  295. MiscY = MiscY + MiscH;
  296. MiscH = C.ClipY * 0.0633;
  297. C.SetPos(MiscX, MiscY);
  298. C.DrawTile(BaseTex, MiscW, MiscH, 126, 829, 772, 68);
  299.  
  300. MiscX = C.ClipX * 0.51;
  301. C.SetPos(MiscX, MiscY);
  302. C.DrawTile(BaseTex, MiscW, MiscH, 126, 829, 772, 68);
  303. /* draw the player's backgrounds */
  304.  
  305. /* draw name, score, kills, etc... in the top */
  306. for(i = 0; i < 2; i++)
  307. {
  308. if(i == 0)
  309. {
  310. TmpPRI = OwnerPRI;
  311. BarX = C.ClipX * 0.02;
  312. }
  313. else
  314. {
  315. BarX = C.ClipX * 0.52;
  316. TmpPRI = ViewPRI;
  317. }
  318.  
  319. BarY = C.ClipY * 0.155;
  320.  
  321. C.Font = PlayerController(Owner).MyHUD.GetFontSizeIndex(C, -2);
  322.  
  323. // name
  324. if(TmpPRI.bOutOfLives)
  325. C.DrawColor = HUDClass.default.WhiteColor * 0.5;
  326. else
  327. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  328. C.SetPos(BarX + (C.ClipX * 0.01), BarY + (C.ClipY * 0.008));
  329. name = TmpPRI.PlayerName;
  330. C.StrLen(name, XL, YL);
  331. if(XL > C.ClipX * 0.23)
  332. name = Left(name, C.ClipX * 0.23 / XL * len(name));
  333. C.DrawText(name, true);
  334.  
  335. // score
  336. name = string(int(TmpPRI.Score % 10000));
  337. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  338. C.StrLen(name, XL, YL);
  339. C.SetPos(BarX + (C.ClipX * 0.27) - (XL * 0.5), BarY + (C.ClipY * 0.008));
  340. C.DrawText(name, true);
  341.  
  342. // kills
  343. if(!PlayerController(Owner).GameReplicationInfo.bTeamGame)
  344. name = string(int(TmpPRI.Score / 10000));
  345. else
  346. name = string(TmpPRI.Kills);
  347.  
  348. C.StrLen(name, XL, YL);
  349. C.SetPos(BarX + (C.ClipX * 0.35) - (XL * 0.5), BarY + (C.ClipY * 0.008));
  350. C.DrawText(name, true);
  351.  
  352. // ping
  353. C.DrawColor = HUDClass.default.CyanColor * 0.5;
  354. C.DrawColor.B = 150;
  355. C.DrawColor.R = 20;
  356. name = string(Min(999, TmpPRI.Ping * 4));
  357. C.StrLen(name, XL, YL);
  358. C.SetPos(BarX + (C.ClipX * 0.42) - (XL * 0.5), BarY + (C.ClipY * 0.008));
  359. C.DrawText(name, true);
  360.  
  361. C.Font = PlayerController(Owner).MyHUD.GetFontSizeIndex(C, -3);
  362. name = string(TmpPRI.PacketLoss);
  363. C.StrLen(name, XL, YL);
  364. C.SetPos(BarX + (C.ClipX * 0.42) - (XL * 0.5), BarY + (C.ClipY * 0.035));
  365. C.DrawText(name, true);
  366.  
  367. // location (ready/not ready/dead)
  368. // location (ready/not ready/dead)
  369. if(!GRI.bMatchHasBegun)
  370. {
  371. if(TmpPRI.bReadyToPlay)
  372. name = class'TAM_Scoreboard'.default.ReadyText;
  373. else
  374. name = class'TAM_Scoreboard'.default.NotReadyText;
  375.  
  376. if(TmpPRI.bAdmin)
  377. {
  378. name = "Admin -"@name;
  379. C.DrawColor.R = 170;
  380. C.DrawColor.G = 20;
  381. C.DrawColor.B = 20;
  382. }
  383. else
  384. {
  385. C.DrawColor = HUDClass.default.RedColor * 0.7;
  386. C.DrawColor.G = 130;
  387. }
  388. }
  389. else
  390. {
  391. if(!TmpPRI.bAdmin && !TmpPRI.bOutOfLives)
  392. {
  393. C.DrawColor = HUDClass.default.RedColor * 0.7;
  394. C.DrawColor.G = 130;
  395.  
  396. if((TmpPRI.Team != None && TmpPRI.Team.TeamIndex == OwnerTeam) || TmpPRI == OwnerPRI)
  397. name = TmpPRI.GetLocationName();
  398. else
  399. name = TmpPRI.StringUnknown;
  400. }
  401. else
  402. {
  403. C.DrawColor.R = 170;
  404. C.DrawColor.G = 20;
  405. C.DrawColor.B = 20;
  406.  
  407. if(TmpPRI.bAdmin)
  408. name = "Admin";
  409. else if(TmpPRI.bOutOfLives)
  410. name = "Dead";
  411. }
  412. }
  413. C.StrLen(name, XL, YL);
  414. if(XL > C.ClipX * 0.23)
  415. name = left(name, C.ClipX * 0.23 / XL * len(name));
  416. C.SetPos(BarX + (C.ClipX * 0.02), BarY + (C.ClipY * 0.035));
  417. C.DrawText(name, true);
  418.  
  419. // points per round
  420. C.DrawColor = HUDClass.default.WhiteColor * 0.55;
  421.  
  422. if(Misc_BaseGRI(GRI).CurrentRound - TmpPRI.JoinRound > 0)
  423. XL = (TmpPRI.Score % 10000) / (Misc_BaseGRI(GRI).CurrentRound - TmpPRI.JoinRound);
  424. else
  425. XL = (TmpPRI.Score % 10000);
  426.  
  427. if(int((XL - int(XL)) * 10) < 0)
  428. {
  429. if(int(XL) == 0)
  430. name = "-"$string(int(XL));
  431. else
  432. name = string(int(XL));
  433. name = name$"."$-int((XL - int(XL)) * 10);
  434. }
  435. else
  436. {
  437. name = string(int(XL));
  438. name = name$"."$int((XL - int(XL)) * 10);
  439. }
  440.  
  441. C.StrLen(name, XL, YL);
  442. C.SetPos(BarX + (C.ClipX * 0.27) - (XL * 0.5), BarY + (C.ClipY * 0.035));
  443. C.DrawText(name, true);
  444.  
  445. // draw deaths
  446. C.DrawColor.R = 170;
  447. C.DrawColor.G = 20;
  448. C.DrawColor.B = 20;
  449. name = string(int(TmpPRI.Deaths));
  450. C.StrLen(name, xl, yl);
  451. C.SetPos(BarX + (C.ClipX * 0.35) - (XL * 0.5), BarY + (C.ClipY * 0.035));
  452. C.DrawText(name, true);
  453. }
  454. /* draw name, score, etc... in top */
  455.  
  456. for(j = 0; j < 2; j++)
  457. {
  458. if(j == 0)
  459. {
  460. TmpPRI = OwnerPRI;
  461. PlayerBoxX = C.ClipX * 0.02;
  462.  
  463. CurrentColor = OwnerColor * 0.35;
  464. CurrentColor.A = 75;
  465. }
  466. else
  467. {
  468. TmpPRI = ViewPRI;
  469. PlayerBoxX = C.ClipX * 0.52;
  470.  
  471. CurrentColor = ViewedColor * 0.35;
  472. CurrentColor.A = 75;
  473. }
  474.  
  475. /* awards */
  476. MiscX = PlayerBoxX + (PlayerBoxW * 0.7);
  477. MiscY = PlayerBoxY;
  478. MiscW = PlayerBoxW * 0.295;
  479. MiscH = C.ClipY * 0.02;
  480. C.StrLen("Test", XL, YL);
  481. TextY = (MiscH * 0.6 - YL * 0.5);
  482.  
  483. Awards = 1;
  484. if(TmpPRI.bFirstBlood)
  485. Awards++;
  486.  
  487. for(i = 0; i < 6; i++)
  488. if(TmpPRI.Spree[i] > 0)
  489. Awards++;
  490.  
  491. for(i = 0; i < 7; i++)
  492. if(TmpPRI.MultiKills[i] > 0)
  493. Awards++;
  494.  
  495. if(TmpPRI.FlakCount > 4)
  496. Awards++;
  497. if(TmpPRI.ComboCount > 4)
  498. Awards++;
  499. if(TmpPRI.HeadCount > 2)
  500. Awards++;
  501. if(TmpPRI.GoalsScored > 2)
  502. Awards++;
  503. if(TmpPRI.GoalsScored > 0)
  504. Awards++;
  505. if(TmpPRI.FlawlessCount > 0)
  506. Awards++;
  507. if(TmpPRI.OverkillCount > 0)
  508. Awards++;
  509. if(TmpPRI.DarkHorseCount > 0)
  510. Awards++;
  511. if(TmpPRI.ranovercount > 4)
  512. Awards++;
  513. if(TmpPRI.CampCount > 1)
  514. Awards++;
  515. if(TmpPRI.Suicides > 2)
  516. Awards++;
  517.  
  518. DrawBars(C, Awards, MiscX, MiscY, MiscW, MiscH);
  519. C.SetPos(MiscX + TextX, MiscY + TextY);
  520. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  521. C.DrawText("Awards", true);
  522.  
  523. if(Awards > 1)
  524. {
  525. MiscX += TextX;
  526. MiscY += MiscH;
  527.  
  528. if(TmpPRI.bFirstBlood)
  529. {
  530. C.SetPos(MiscX + TextX, MiscY + TextY);
  531. C.DrawText(FirstBloodString);
  532. MiscY += MiscH;
  533. }
  534.  
  535. for(i = 0; i < 6; i++)
  536. {
  537. if(TmpPRI.Spree[i] > 0)
  538. {
  539. C.SetPos(MiscX + TextX, MiscY + TextY);
  540. C.DrawText(class'KillingSpreeMessage'.default.SelfSpreeNote[i]$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.Spree[i]);
  541. MiscY += MiscH;
  542. }
  543. }
  544.  
  545. for(i = 0; i < 7; i++)
  546. {
  547. if(TmpPRI.MultiKills[i] > 0)
  548. {
  549. C.SetPos(MiscX + TextX, MiscY + TextY);
  550. C.DrawText(KillString[i]$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.MultiKills[i]);
  551. MiscY += MiscH;
  552. }
  553. }
  554.  
  555. if(TmpPRI.FlakCount > 4)
  556. {
  557. C.SetPos(MiscX + TextX, MiscY + TextY);
  558. C.DrawText(FlakMonkey);
  559. MiscY += MiscH;
  560. }
  561.  
  562. if(TmpPRI.ranovercount > 4)
  563. {
  564. C.SetPos(MiscX + TextX, MiscY + TextY);
  565. C.DrawText("Bukkake!");
  566. MiscY += MiscH;
  567. }
  568.  
  569. if(TmpPRI.ComboCount > 4)
  570. {
  571. C.SetPos(MiscX + TextX, MiscY + TextY);
  572. C.DrawText(ComboWhore);
  573. MiscY += MiscH;
  574. }
  575.  
  576. if(TmpPRI.HeadCount > 2)
  577. {
  578. C.SetPos(MiscX + TextX, MiscY + TextY);
  579. C.DrawText(HeadHunter);
  580. MiscY += MiscH;
  581. }
  582.  
  583. if(TmpPRI.GoalsScored > 0)
  584. {
  585. C.SetPos(MiscX + TextX, MiscY + TextY);
  586. C.DrawText("Final Kill!"$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.GoalsScored);
  587. MiscY += MiscH;
  588. }
  589.  
  590. if(TmpPRI.GoalsScored > 2)
  591. {
  592. C.SetPos(MiscX + TextX, MiscY + TextY);
  593. C.DrawText(HatTrick);
  594. MiscY += MiscH;
  595. }
  596.  
  597. if(TmpPRI.FlawlessCount > 0)
  598. {
  599. C.SetPos(MiscX + TextX, MiscY + TextY);
  600. C.DrawText("Flawless!"$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.FlawlessCount);
  601. MiscY += MiscH;
  602. }
  603.  
  604. if(TmpPRI.OverkillCount > 0)
  605. {
  606. C.SetPos(MiscX + TextX, MiscY + TextY);
  607. C.DrawText("Overkill!"$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.OverkillCount);
  608. MiscY += MiscH;
  609. }
  610.  
  611. if(TmpPRI.DarkHorseCount > 0)
  612. {
  613. C.SetPos(MiscX + TextX, MiscY + TextY);
  614. C.DrawText("Dark Horse!"$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.DarkHorseCount);
  615. MiscY += MiscH;
  616. }
  617.  
  618. if(TmpPRI.CampCount > 1)
  619. {
  620. C.SetPos(MiscX + TextX, MiscY + TextY);
  621. C.DrawText("Campy Bastard!", true);
  622. MiscY += MiscH;
  623. }
  624.  
  625. if(TmpPRI.Suicides > 2)
  626. {
  627. C.SetPos(MiscX + TextX, MiscY + TextY);
  628. C.DrawText("Emo!", true);
  629. MiscY += MiscH;
  630. }
  631.  
  632. MiscX -= TextX;
  633. }
  634. /* awards */
  635.  
  636. /* combos */
  637. if(Awards == 1)
  638. MiscY += MiscH * 1.275;
  639. else
  640. MiscY += MiscH * 0.275;
  641.  
  642. Combos = 1;
  643. for(i = 0; i < 5; i++)
  644. if(TmpPRI.Combos[i] > 0)
  645. Combos++;
  646.  
  647. DrawBars(C, Combos, MiscX, MiscY, MiscW, MiscH);
  648. C.SetPos(MiscX + TextX, MiscY + TextY);
  649. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  650. C.DrawText("Combos", true);
  651.  
  652. if(Combos > 1)
  653. {
  654. MiscX += TextX;
  655. for(i = 0; i < 5; i++)
  656. {
  657. if(TmpPRI.Combos[i] > 0)
  658. {
  659. MiscY += MiscH;
  660. C.SetPos(MiscX + TextX, MiscY + TextY);
  661. C.DrawText(ComboNames[i]$MakeColorCode(HUDClass.default.GoldColor * 0.7)$"x"$TmpPRI.Combos[i]);
  662. }
  663. }
  664. MiscX -= TextX;
  665. }
  666. /* combo */
  667.  
  668. /* efficiency */
  669. MiscY += MiscH * 1.275;
  670.  
  671. DrawBars(C, 1, MiscX, MiscY, MiscW, MiscH);
  672. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  673.  
  674. C.SetPos(MiscX + TextX, MiscY + TextY);
  675. C.DrawText("Efficiency:", true);
  676.  
  677. name = string(int(GetPercentage(TmpPRI.Deaths + TmpPRI.Kills, TmpPRI.Kills))) $ "%";
  678. C.StrLen(name, XL, YL);
  679. C.SetPos(MiscX + MiscW - TextX - XL, MiscY + TextY);
  680. C.DrawText(name, true);
  681. /* efficiency */
  682.  
  683. /* RFF */
  684. if(PlayerController(Owner).GameReplicationInfo.bTeamGame)
  685. {
  686. MiscY += MiscH * 1.275;
  687.  
  688. DrawBars(C, 1, MiscX, MiscY, MiscW, MiscH);
  689. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  690.  
  691. C.SetPos(MiscX + TextX, MiscY + TextY);
  692. C.DrawText("ReverseFF:", true);
  693.  
  694. name = string(int(TmpPRI.ReverseFF * 100)) $ "%";
  695. C.StrLen(name, XL, YL);
  696. C.SetPos(MiscX + MiscW - TextX - XL, MiscY + TextY);
  697. C.DrawText(name, true);
  698. }
  699. /* RFF */
  700.  
  701. /* weapons */
  702. // show 'Weapon'...'Kills'...etc. bar
  703. MiscX = PlayerBoxX + (PlayerBoxW * 0.005);
  704. MiscY = PlayerBoxY;
  705. MiscW = PlayerBoxW * 0.69;
  706.  
  707. DrawBars(C, 1, MiscX, MiscY, MiscW, MiscH);
  708. C.SetPos(MiscX + TextX, MiscY + TextY);
  709. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  710. C.DrawText("Weapon", true);
  711. C.StrLen("Kills", XL, YL);
  712. C.SetPos(MiscX + KillsX - XL, MiscY + TextY);
  713. C.DrawText("Kills", true);
  714. C.StrLen("Fired : Acc", XL, YL);
  715. C.SetPos(MiscX + AccX - XL, MiscY + TextY);
  716. C.DrawText("Fired : Acc%", true);
  717. C.StrLen("Dam.", XL, YL);
  718. C.SetPos(MiscX + DamageX - XL, MiscY + TextY);
  719. C.DrawText("Dam.", true);
  720. MiscY += MiscH * 2;
  721.  
  722. C.StrLen(" Acc", XL, YL);
  723. FiredX = AccX - XL;
  724.  
  725.  
  726. BWPRI = class'Mut_Ballistic'.static.GetBPRI(TmpPRI);
  727.  
  728. // SG
  729. if (BWPRI != None)
  730. {
  731. if(BWPRI.SGDamage > 0)
  732. {
  733. DrawBars(C, 1, MiscX, MiscY, MiscW, MiscH);
  734.  
  735. dam = BWPRI.SGDamage;
  736. if(dam > 0)
  737. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  738. else
  739. C.DrawColor = HUDClass.default.WhiteColor * 0.3;
  740. C.SetPos(MiscX + TextX, MiscY + TextY);
  741. C.DrawText("Męlée", true);
  742. C.StrLen(dam, XL, YL);
  743. C.SetPos(MiscX + DamageX - XL, MiscY + TextY);
  744. C.DrawText(dam, true);
  745.  
  746. GetStatsFor(class'ShieldGun', TmpPRI, killsw);
  747. C.StrLen(killsw, XL, YL);
  748. C.SetPos(MiscX + KillsX - XL, MiscY + TextY);
  749. C.DrawText(killsw, true);
  750. }
  751. MiscY += MiscH * 2;
  752.  
  753. for (i = 2; i < 10; i++)
  754. {
  755. if (BWPRI.HitStats[i].Fired > 0)
  756. DrawHitStat(C, BWPRI.HitStats[i].Fired, BWPRI.HitStats[i].Hit, BWPRI.HitStats[i].Damage, BWPRI.HitStats[i].Kills, StatData[i].WeaponName, MiscX, MiscY, MiscW, MiscH, TextX, TextY);
  757.  
  758. MiscY += MiscH * 2;
  759. }
  760. }
  761. else
  762. MiscY += MiscH * 22;
  763.  
  764. // total
  765. DrawBars(C, 1, MiscX, MiscY, MiscW, MiscH);
  766. C.DrawColor = HUDClass.default.WhiteColor * 0.7;
  767. C.SetPos(MiscX + TextX, MiscY + TextY);
  768. C.DrawText("Total", true);
  769. dam = TmpPRI.EnemyDamage;
  770. C.StrLen(dam, XL, YL);
  771. C.SetPos(MiscX + DamageX - XL, MiscY + TextY);
  772. C.DrawText(dam, true);
  773.  
  774. killsw = TmpPRI.Kills;
  775. C.StrLen(killsw, XL, YL);
  776. C.SetPos(MiscX + KillsX - XL, MiscY + TextY);
  777. C.DrawText(killsw, true);
  778.  
  779. MiscY += MiscH * 1.275;
  780. /* weapons */
  781. }
  782.  
  783. bDisplayMessages = true;
  784. }
  785.  
  786. defaultproperties
  787. {
  788. Box=Texture'Engine.WhiteSquareTexture'
  789. BaseTex=Texture'3SPNv3141BW.textures.ScoreBoard'
  790.  
  791. StatData[0]=(WeaponClass=None,WeaponName="Grenades")
  792. StatData[1]=(WeaponClass=None,WeaponName="Killstreak")
  793. StatData[2]=(WeaponClass=class'AssaultRifle',WeaponName="Sidearm")
  794. StatData[3]=(WeaponClass=class'BioRifle',WeaponName="Submachine Gun")
  795. StatData[4]=(WeaponClass=class'ShockRifle',WeaponName="Assault Rifle")
  796. StatData[5]=(WeaponClass=class'Linkgun',WeaponName="Energy")
  797. StatData[6]=(WeaponClass=class'Minigun',WeaponName="Machine Gun")
  798. StatData[7]=(WeaponClass=class'FlakCannon',WeaponName="Shotgun")
  799. StatData[8]=(WeaponClass=class'RocketLauncher',WeaponName="Ordnance")
  800. StatData[9]=(WeaponClass=class'SniperRifle',WeaponName="Sniper Rifle")
  801. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement