From 1a9a0e48b75c8e08b86743e9d78654f76524903d Mon Sep 17 00:00:00 2001 From: RaidMax Date: Fri, 5 Jul 2019 20:53:03 -0500 Subject: [PATCH] lots more live radar updates --- .../Configuration/LiveRadarConfiguration.cs | 107 ++++++ Plugins/LiveRadar/MapInfo.cs | 4 + Plugins/LiveRadar/Plugin.cs | 26 +- Plugins/LiveRadar/RadarEvent.cs | 7 +- .../Web/Controllers/RadarController.cs | 36 +- .../Web/Views/LiveRadar/Index.cshtml | 337 +++++++++++++++--- Plugins/ScriptPlugins/SharedGUIDKick.js | 4 +- SharedLibraryCore/Events/EventAPI.cs | 2 +- WebfrontCore/Controllers/BaseController.cs | 1 + WebfrontCore/Views/Shared/_Layout.cshtml | 2 +- .../images/hud_weapons/hud_40mmgrenade.webp | Bin 0 -> 594 bytes .../wwwroot/images/hud_weapons/hud_aa12.png | Bin 0 -> 3573 bytes .../wwwroot/images/hud_weapons/hud_aa12.webp | Bin 0 -> 1964 bytes .../wwwroot/images/hud_weapons/hud_ak47.png | Bin 0 -> 3513 bytes .../wwwroot/images/hud_weapons/hud_ak47.webp | Bin 0 -> 1728 bytes .../wwwroot/images/hud_weapons/hud_akd74u.png | Bin 0 -> 4207 bytes .../images/hud_weapons/hud_akd74u.webp | Bin 0 -> 2232 bytes .../wwwroot/images/hud_weapons/hud_at4.png | Bin 0 -> 3549 bytes .../wwwroot/images/hud_weapons/hud_at4.webp | Bin 0 -> 1894 bytes .../images/hud_weapons/hud_barrett50cal.png | Bin 0 -> 3598 bytes .../images/hud_weapons/hud_barrett50cal.webp | Bin 0 -> 1820 bytes .../images/hud_weapons/hud_benelli_m4.png | Bin 0 -> 3281 bytes .../images/hud_weapons/hud_benelli_m4.webp | Bin 0 -> 1664 bytes .../images/hud_weapons/hud_beretta393.png | Bin 0 -> 4657 bytes .../images/hud_weapons/hud_beretta393.webp | Bin 0 -> 2284 bytes .../images/hud_weapons/hud_cheytac.png | Bin 0 -> 3697 bytes .../images/hud_weapons/hud_cheytac.webp | Bin 0 -> 2108 bytes .../images/hud_weapons/hud_colt45.webp | Bin 0 -> 1696 bytes .../images/hud_weapons/hud_colt_anaconda.png | Bin 0 -> 3723 bytes .../images/hud_weapons/hud_colt_anaconda.webp | Bin 0 -> 1806 bytes .../wwwroot/images/hud_weapons/hud_death.png | Bin 0 -> 4629 bytes .../images/hud_weapons/hud_desert_eagle.png | Bin 0 -> 3665 bytes .../images/hud_weapons/hud_desert_eagle.webp | Bin 0 -> 1554 bytes .../hud_weapons/hud_desert_eagle_gold.png | Bin 0 -> 3218 bytes .../hud_weapons/hud_desert_eagle_gold.webp | Bin 0 -> 1654 bytes .../images/hud_weapons/hud_dragunovsvd.png | Bin 0 -> 3332 bytes .../images/hud_weapons/hud_dragunovsvd.webp | Bin 0 -> 1918 bytes .../wwwroot/images/hud_weapons/hud_famas.png | Bin 0 -> 5137 bytes .../wwwroot/images/hud_weapons/hud_famas.webp | Bin 0 -> 2806 bytes .../wwwroot/images/hud_weapons/hud_fn2000.png | Bin 0 -> 3984 bytes .../images/hud_weapons/hud_fn2000.webp | Bin 0 -> 2050 bytes .../wwwroot/images/hud_weapons/hud_fnfal.png | Bin 0 -> 3145 bytes .../wwwroot/images/hud_weapons/hud_fnfal.webp | Bin 0 -> 1656 bytes .../images/hud_weapons/hud_g36c_mp.webp | Bin 0 -> 2304 bytes .../wwwroot/images/hud_weapons/hud_glock.png | Bin 0 -> 2757 bytes .../wwwroot/images/hud_weapons/hud_glock.webp | Bin 0 -> 1204 bytes .../hud_weapons/hud_icon_ak47_classic.png | Bin 0 -> 3463 bytes .../hud_weapons/hud_icon_ak47_classic.webp | Bin 0 -> 1748 bytes .../images/hud_weapons/hud_javelin.png | Bin 0 -> 3890 bytes .../images/hud_weapons/hud_javelin.webp | Bin 0 -> 3748 bytes .../wwwroot/images/hud_weapons/hud_kriss.png | Bin 0 -> 4737 bytes .../wwwroot/images/hud_weapons/hud_kriss.webp | Bin 0 -> 2366 bytes .../wwwroot/images/hud_weapons/hud_m14ebr.png | Bin 0 -> 4288 bytes .../images/hud_weapons/hud_m14ebr.webp | Bin 0 -> 2338 bytes .../wwwroot/images/hud_weapons/hud_m16a4.png | Bin 0 -> 3745 bytes .../wwwroot/images/hud_weapons/hud_m16a4.webp | Bin 0 -> 2116 bytes .../wwwroot/images/hud_weapons/hud_m240.png | Bin 0 -> 4665 bytes .../wwwroot/images/hud_weapons/hud_m240.webp | Bin 0 -> 2442 bytes .../images/hud_weapons/hud_m249saw.webp | Bin 0 -> 2116 bytes .../wwwroot/images/hud_weapons/hud_m40a3.png | Bin 0 -> 3153 bytes .../wwwroot/images/hud_weapons/hud_m40a3.webp | Bin 0 -> 1718 bytes .../images/hud_weapons/hud_m4carbine.png | Bin 0 -> 3981 bytes .../images/hud_weapons/hud_m4carbine.webp | Bin 0 -> 2162 bytes .../wwwroot/images/hud_weapons/hud_m79.png | Bin 0 -> 3243 bytes .../wwwroot/images/hud_weapons/hud_m79.webp | Bin 0 -> 1522 bytes .../images/hud_weapons/hud_m9beretta.png | Bin 0 -> 3073 bytes .../images/hud_weapons/hud_m9beretta.webp | Bin 0 -> 1332 bytes .../wwwroot/images/hud_weapons/hud_masada.png | Bin 0 -> 5020 bytes .../images/hud_weapons/hud_masada.webp | Bin 0 -> 2622 bytes .../wwwroot/images/hud_weapons/hud_mg4.png | Bin 0 -> 4268 bytes .../wwwroot/images/hud_weapons/hud_mg4.webp | Bin 0 -> 1930 bytes .../images/hud_weapons/hud_mini_uzi.png | Bin 0 -> 3010 bytes .../images/hud_weapons/hud_mini_uzi.webp | Bin 0 -> 1298 bytes .../images/hud_weapons/hud_model1887.png | Bin 0 -> 3232 bytes .../images/hud_weapons/hud_model1887.webp | Bin 0 -> 1516 bytes .../wwwroot/images/hud_weapons/hud_mp5k.png | Bin 0 -> 6164 bytes .../wwwroot/images/hud_weapons/hud_mp5k.webp | Bin 0 -> 3352 bytes .../wwwroot/images/hud_weapons/hud_mp9.png | Bin 0 -> 3039 bytes .../wwwroot/images/hud_weapons/hud_mp9.webp | Bin 0 -> 1564 bytes .../images/hud_weapons/hud_neutral.png | Bin 0 -> 2570 bytes .../images/hud_weapons/hud_neutral.webp | Bin 0 -> 952 bytes .../wwwroot/images/hud_weapons/hud_p90.png | Bin 0 -> 4102 bytes .../wwwroot/images/hud_weapons/hud_p90.webp | Bin 0 -> 2204 bytes .../images/hud_weapons/hud_peacekeeper.png | Bin 0 -> 4308 bytes .../images/hud_weapons/hud_peacekeeper.webp | Bin 0 -> 2260 bytes .../wwwroot/images/hud_weapons/hud_pp2000.png | Bin 0 -> 3291 bytes .../images/hud_weapons/hud_pp2000.webp | Bin 0 -> 1634 bytes .../images/hud_weapons/hud_remington_700.webp | Bin 0 -> 1608 bytes .../images/hud_weapons/hud_riot_shield.png | Bin 0 -> 3169 bytes .../images/hud_weapons/hud_riot_shield.webp | Bin 0 -> 1822 bytes .../wwwroot/images/hud_weapons/hud_rpd.png | Bin 0 -> 3555 bytes .../wwwroot/images/hud_weapons/hud_rpd.webp | Bin 0 -> 1904 bytes .../wwwroot/images/hud_weapons/hud_rpg.png | Bin 0 -> 3324 bytes .../wwwroot/images/hud_weapons/hud_rpg.webp | Bin 0 -> 1604 bytes .../images/hud_weapons/hud_sa80_lmg.png | Bin 0 -> 4582 bytes .../images/hud_weapons/hud_sa80_lmg.webp | Bin 0 -> 2524 bytes .../images/hud_weapons/hud_sawed_off.png | Bin 0 -> 3543 bytes .../images/hud_weapons/hud_sawed_off.webp | Bin 0 -> 1914 bytes .../wwwroot/images/hud_weapons/hud_scar_h.png | Bin 0 -> 4138 bytes .../images/hud_weapons/hud_scar_h.webp | Bin 0 -> 2170 bytes .../images/hud_weapons/hud_skorpian.webp | Bin 0 -> 1980 bytes .../wwwroot/images/hud_weapons/hud_spas12.png | Bin 0 -> 3762 bytes .../images/hud_weapons/hud_spas12.webp | Bin 0 -> 2050 bytes .../wwwroot/images/hud_weapons/hud_steyr.png | Bin 0 -> 4316 bytes .../wwwroot/images/hud_weapons/hud_steyr.webp | Bin 0 -> 2504 bytes .../images/hud_weapons/hud_stinger.png | Bin 0 -> 2948 bytes .../images/hud_weapons/hud_stinger.webp | Bin 0 -> 1590 bytes .../images/hud_weapons/hud_striker.png | Bin 0 -> 4686 bytes .../images/hud_weapons/hud_striker.webp | Bin 0 -> 2580 bytes .../wwwroot/images/hud_weapons/hud_tavor.png | Bin 0 -> 6188 bytes .../wwwroot/images/hud_weapons/hud_tavor.webp | Bin 0 -> 3280 bytes .../wwwroot/images/hud_weapons/hud_ump45.png | Bin 0 -> 4313 bytes .../wwwroot/images/hud_weapons/hud_ump45.webp | Bin 0 -> 2322 bytes .../hud_weapons/hud_undermounted_shotgun.webp | Bin 0 -> 2866 bytes .../wwwroot/images/hud_weapons/hud_usp_45.png | Bin 0 -> 3683 bytes .../images/hud_weapons/hud_usp_45.webp | Bin 0 -> 1890 bytes .../wwwroot/images/hud_weapons/hud_wa2000.png | Bin 0 -> 4531 bytes .../images/hud_weapons/hud_wa2000.webp | Bin 0 -> 2410 bytes WebfrontCore/wwwroot/images/radar/kills.png | Bin 0 -> 3746 bytes .../minimaps/compass_map_mp_afghan@2x.png | Bin 0 -> 945047 bytes .../minimaps/compass_map_mp_boneyard@2x.png | Bin 0 -> 1242654 bytes .../minimaps/compass_map_mp_brecourt@2x.png | Bin 0 -> 919389 bytes .../minimaps/compass_map_mp_checkpoint@2x.png | Bin 0 -> 1146834 bytes .../minimaps/compass_map_mp_derail@2x.png | Bin 0 -> 585657 bytes .../minimaps/compass_map_mp_estate@2x.png | Bin 0 -> 1021636 bytes .../minimaps/compass_map_mp_favela@2x.png | Bin 0 -> 1085858 bytes .../minimaps/compass_map_mp_highrise@2x.png | Bin 0 -> 603608 bytes .../minimaps/compass_map_mp_invasion@2x.png | Bin 0 -> 1192893 bytes .../minimaps/compass_map_mp_nightshift@2x.png | Bin 0 -> 815453 bytes .../minimaps/compass_map_mp_quarry@2x.png | Bin 0 -> 904385 bytes .../minimaps/compass_map_mp_rundown@2x.png | Bin 0 -> 878281 bytes .../radar/minimaps/compass_map_mp_rust@2x.png | Bin 0 -> 869530 bytes .../minimaps/compass_map_mp_subbase@2x.png | Bin 0 -> 997794 bytes .../minimaps/compass_map_mp_terminal@2x.png | Bin 0 -> 588264 bytes .../minimaps/compass_map_mp_underpass@2x.png | Bin 0 -> 897584 bytes 135 files changed, 439 insertions(+), 87 deletions(-) create mode 100644 Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_40mmgrenade.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_aa12.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_aa12.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_ak47.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_ak47.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_akd74u.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_akd74u.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_at4.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_at4.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_barrett50cal.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_barrett50cal.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_benelli_m4.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_benelli_m4.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_beretta393.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_beretta393.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_cheytac.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_cheytac.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_colt45.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_colt_anaconda.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_colt_anaconda.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_death.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_desert_eagle.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_desert_eagle.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_desert_eagle_gold.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_desert_eagle_gold.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_dragunovsvd.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_dragunovsvd.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_famas.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_famas.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_fn2000.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_fn2000.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_fnfal.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_fnfal.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_g36c_mp.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_glock.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_glock.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_icon_ak47_classic.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_icon_ak47_classic.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_javelin.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_javelin.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_kriss.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_kriss.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m14ebr.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m14ebr.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m16a4.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m16a4.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m240.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m240.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m249saw.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m40a3.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m40a3.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m4carbine.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m4carbine.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m79.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m79.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m9beretta.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_m9beretta.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_masada.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_masada.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mg4.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mg4.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mini_uzi.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mini_uzi.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_model1887.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_model1887.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mp5k.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mp5k.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mp9.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_mp9.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_neutral.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_neutral.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_p90.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_p90.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_peacekeeper.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_peacekeeper.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_pp2000.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_pp2000.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_remington_700.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_riot_shield.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_riot_shield.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_rpd.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_rpd.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_rpg.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_rpg.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_sa80_lmg.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_sa80_lmg.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_sawed_off.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_sawed_off.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_scar_h.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_scar_h.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_skorpian.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_spas12.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_spas12.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_steyr.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_steyr.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_stinger.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_stinger.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_striker.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_striker.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_tavor.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_tavor.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_ump45.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_ump45.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_undermounted_shotgun.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_usp_45.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_usp_45.webp create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_wa2000.png create mode 100644 WebfrontCore/wwwroot/images/hud_weapons/hud_wa2000.webp create mode 100644 WebfrontCore/wwwroot/images/radar/kills.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_afghan@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_boneyard@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_brecourt@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_checkpoint@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_derail@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_estate@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_favela@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_highrise@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_invasion@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_nightshift@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_quarry@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_rundown@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_rust@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_subbase@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_terminal@2x.png create mode 100644 WebfrontCore/wwwroot/images/radar/minimaps/compass_map_mp_underpass@2x.png diff --git a/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs b/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs new file mode 100644 index 000000000..144d96158 --- /dev/null +++ b/Plugins/LiveRadar/Configuration/LiveRadarConfiguration.cs @@ -0,0 +1,107 @@ +using SharedLibraryCore.Configuration; +using SharedLibraryCore.Interfaces; +using System; +using System.Collections.Generic; +using System.Text; + +namespace LiveRadar.Configuration +{ + class LiveRadarConfiguration : IBaseConfiguration + { + public List Maps { get; set; } + + public IBaseConfiguration Generate() + { + Maps = new List() + { + new MapInfo() + { + Name = "mp_afghan", + MaxLeft = 4600, // ymax + MaxRight = -1100, // ymin + MaxBottom = -1400, // xmin + MaxTop = 4600, // xmax + Left = 52, // pxmin + Right = 898, // pxmax + Bottom = 930, // yxmax + Top = 44 // pymin + }, + new MapInfo() + { + Name = "mp_rust", + Top = 212, + Bottom = 812, + Left = 314, + Right = 856, + MaxRight = -225, + MaxLeft = 1809, + MaxTop = 1773, + MaxBottom = -469 + }, + + new MapInfo() + { + Name = "mp_subbase", + MaxLeft = 1841, // ymax + MaxRight = -3817, // ymin + MaxBottom = -1585, // xmin + MaxTop = 2593, // xmax + Left = 18, // pxmin + Right = 968, // pxmax + Bottom = 864, // pymax + Top = 160, // pymin + CenterX = 0, + CenterY = 0, + Rotation = 0 + }, + + new MapInfo() + { + Name = "mp_estate", + Top = 52, + Bottom = 999, + Left= 173, + Right = 942, + MaxTop = 2103, + MaxBottom = -5077, + MaxLeft = 4437, + MaxRight = -1240, + Rotation = 143, + CenterX = -1440, + CenterY = 1920, + Scaler = 0.85f + }, + + new MapInfo() + { + Name = "mp_highrise", + MaxBottom = -3909, + MaxTop = 1649, + MaxRight = 5111, + MaxLeft = 8906, + Left = 108, + Right = 722, + Top = 66, + Bottom = 974, + }, + + new MapInfo() + { + Name = "mp_quarry", + MaxBottom = -5905, + MaxTop = -1423, + MaxRight = -2095, + MaxLeft = 3217, + Left = 126, + Right = 968, + Top = 114, + Bottom = 824 + } + }; + + return this; + } + + public string Name() => "LiveRadar"; + } +} diff --git a/Plugins/LiveRadar/MapInfo.cs b/Plugins/LiveRadar/MapInfo.cs index eeb738453..00d04cda7 100644 --- a/Plugins/LiveRadar/MapInfo.cs +++ b/Plugins/LiveRadar/MapInfo.cs @@ -18,6 +18,10 @@ namespace LiveRadar public int MaxBottom { get; set; } public int MaxLeft { get; set; } public int MaxRight { get; set; } + public float Rotation { get; set; } + public float CenterX { get; set; } + public float CenterY { get; set; } + public float Scaler { get; set; } = 1.0f; public int Width => MaxLeft - MaxRight; public int Height => MaxTop - MaxBottom; diff --git a/Plugins/LiveRadar/Plugin.cs b/Plugins/LiveRadar/Plugin.cs index cbb519829..b1e8266d5 100644 --- a/Plugins/LiveRadar/Plugin.cs +++ b/Plugins/LiveRadar/Plugin.cs @@ -1,4 +1,6 @@ -using SharedLibraryCore; +using LiveRadar.Configuration; +using SharedLibraryCore; +using SharedLibraryCore.Configuration; using SharedLibraryCore.Interfaces; using System; using System.Linq; @@ -14,6 +16,8 @@ namespace LiveRadar public string Author => "RaidMax"; + internal static BaseConfigurationHandler Config; + public Task OnEventAsync(GameEvent E, Server S) { if (E.Type == GameEvent.EventType.Unknown) @@ -21,18 +25,28 @@ namespace LiveRadar if (E.Data?.StartsWith("LiveRadar") ?? false) { var radarUpdate = RadarEvent.Parse(E.Data); - var client = S.GetClientsAsList().First(_client => _client.NetworkId == radarUpdate.Guid); - radarUpdate.Name = client.Name; - client.SetAdditionalProperty("LiveRadar", radarUpdate); + var client = S.Manager.GetActiveClients().FirstOrDefault(_client => _client.NetworkId == radarUpdate.Guid); + + if (client != null) + { + radarUpdate.Name = client.Name; + client.SetAdditionalProperty("LiveRadar", radarUpdate); + } } } return Task.CompletedTask; } - public Task OnLoadAsync(IManager manager) + public async Task OnLoadAsync(IManager manager) { - return Task.CompletedTask; + // load custom configuration + Config = new BaseConfigurationHandler("LiveRadarConfiguration"); + if (Config.Configuration() == null) + { + Config.Set((LiveRadarConfiguration)new LiveRadarConfiguration().Generate()); + await Config.Save(); + } } public Task OnTickAsync(Server S) diff --git a/Plugins/LiveRadar/RadarEvent.cs b/Plugins/LiveRadar/RadarEvent.cs index c8c47e4f9..056c2bd66 100644 --- a/Plugins/LiveRadar/RadarEvent.cs +++ b/Plugins/LiveRadar/RadarEvent.cs @@ -17,11 +17,11 @@ namespace LiveRadar public int Kills { get; set; } public int Deaths { get; set; } public int Score { get; set; } + public int PlayTime { get; set; } public string Weapon { get; set; } public int Health { get; set; } public bool IsAlive { get; set; } public Vector3 RadianAngles => new Vector3(ViewAngles.X.ToRadians(), ViewAngles.Y.ToRadians(), ViewAngles.Z.ToRadians()); - public RadarEvent Previous { get; set; } public int Id => GetHashCode(); public override bool Equals(object obj) @@ -41,7 +41,7 @@ namespace LiveRadar public static RadarEvent Parse(string input) { - var items = input.Split(';').ToList(); + var items = input.Split(';').Skip(1).ToList(); var parsedEvent = new RadarEvent() { @@ -54,7 +54,8 @@ namespace LiveRadar Score = int.Parse(items[6]), Weapon = items[7], Health = int.Parse(items[8]), - IsAlive = items[9] == "1" + IsAlive = items[9] == "1", + PlayTime = Convert.ToInt32(items[10]) }; return parsedEvent; diff --git a/Plugins/LiveRadar/Web/Controllers/RadarController.cs b/Plugins/LiveRadar/Web/Controllers/RadarController.cs index 367b8fa5d..dbb17dec6 100644 --- a/Plugins/LiveRadar/Web/Controllers/RadarController.cs +++ b/Plugins/LiveRadar/Web/Controllers/RadarController.cs @@ -10,34 +10,34 @@ namespace LiveRadar.Web.Controllers { public class RadarController : BaseController { + private static readonly JsonSerializerSettings _serializerSettings = new JsonSerializerSettings() + { + ReferenceLoopHandling = ReferenceLoopHandling.Ignore, + ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() + }; + [HttpGet] public IActionResult Index() { + ViewBag.IsFluid = true; return View(); } public IActionResult Map(long? serverId = null) { - var map = new MapInfo() - { - Name = "mp_rust", - Top = 248, - Bottom = 212, - Left = 314, - Right = 167, - MaxRight = -225, - MaxLeft = 1809, - MaxTop = 1641, - MaxBottom = -469 - }; + var server = Manager.GetServers().FirstOrDefault(); + + var map = Plugin.Config.Configuration().Maps.FirstOrDefault(_map => _map.Name == server.CurrentMap.Name); return Json(map); } + [HttpGet] + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Data(long? serverId = null) { var server = serverId == null ? Manager.GetServers()[0] : Manager.GetServers().First(_server => _server.GetHashCode() == serverId); - var radarInfo = server.GetClientsAsList().Select(_client => _client.GetAdditionalProperty("LiveRadar")); + var radarInfo = server.GetClientsAsList().Select(_client => _client.GetAdditionalProperty("LiveRadar")).ToList(); return Json(radarInfo); } @@ -50,18 +50,10 @@ namespace LiveRadar.Web.Controllers if (client != null) { radarUpdate.Name = client.Name; - var previous = client.GetAdditionalProperty("LiveRadar"); - // this prevents us from creating a never ending linked list - if (previous != null) - { - previous.Previous = null; - } - - radarUpdate.Previous = previous; client.SetAdditionalProperty("LiveRadar", radarUpdate); } return Ok(); } } -} +} \ No newline at end of file diff --git a/Plugins/LiveRadar/Web/Views/LiveRadar/Index.cshtml b/Plugins/LiveRadar/Web/Views/LiveRadar/Index.cshtml index 87064e414..e9fa1aa01 100644 --- a/Plugins/LiveRadar/Web/Views/LiveRadar/Index.cshtml +++ b/Plugins/LiveRadar/Web/Views/LiveRadar/Index.cshtml @@ -1,23 +1,108 @@ @model IEnumerable + +
+
+
+
+
+
+ +
+
- -
+
+
+ + + @section scripts { } \ No newline at end of file diff --git a/Plugins/ScriptPlugins/SharedGUIDKick.js b/Plugins/ScriptPlugins/SharedGUIDKick.js index c0cc3a95e..07584a5d4 100644 --- a/Plugins/ScriptPlugins/SharedGUIDKick.js +++ b/Plugins/ScriptPlugins/SharedGUIDKick.js @@ -11,8 +11,8 @@ var plugin = { // connect or join event if (gameEvent.Type === 3) { - // this GUID seems to have been packed in a IW4 torrent and results in an unreasonable amount of people using the same GUID - if (gameEvent.Origin.NetworkId === -805366929435212061) { + // this GUID seems to have been packed in a IW4 torrent and results in an unreasonable amount of people using the same GUID + if (gameEvent.Origin.NetworkId === -805366929435212061 || gameEvent.Origin.NetworkId == -3304388024725980231) { gameEvent.Origin.Kick('Your GUID is generic. Delete players/guids.dat and rejoin', _IW4MAdminClient); } } diff --git a/SharedLibraryCore/Events/EventAPI.cs b/SharedLibraryCore/Events/EventAPI.cs index f834678c3..102f5fe98 100644 --- a/SharedLibraryCore/Events/EventAPI.cs +++ b/SharedLibraryCore/Events/EventAPI.cs @@ -7,7 +7,7 @@ namespace SharedLibraryCore.Events { public class EventApi { - const int MaxEvents = 100; + const int MaxEvents = 25; static ConcurrentQueue RecentEvents = new ConcurrentQueue(); public static IEnumerable GetEvents(bool shouldConsume) diff --git a/WebfrontCore/Controllers/BaseController.cs b/WebfrontCore/Controllers/BaseController.cs index 79bb4fc49..9407c979b 100644 --- a/WebfrontCore/Controllers/BaseController.cs +++ b/WebfrontCore/Controllers/BaseController.cs @@ -51,6 +51,7 @@ namespace WebfrontCore.Controllers }).ToList(); ViewBag.Version = Manager.Version; + ViewBag.IsFluid = false; } public override void OnActionExecuting(ActionExecutingContext context) diff --git a/WebfrontCore/Views/Shared/_Layout.cshtml b/WebfrontCore/Views/Shared/_Layout.cshtml index 6f1e1c564..90ef95b02 100644 --- a/WebfrontCore/Views/Shared/_Layout.cshtml +++ b/WebfrontCore/Views/Shared/_Layout.cshtml @@ -125,7 +125,7 @@
-
+
@RenderBody()