can you say more radar updates?

This commit is contained in:
RaidMax 2019-07-07 14:59:14 -05:00
parent 1a9a0e48b7
commit edfbb92a3f
3 changed files with 129 additions and 7 deletions

View File

@ -36,7 +36,8 @@ namespace LiveRadar.Configuration
MaxRight = -225,
MaxLeft = 1809,
MaxTop = 1773,
MaxBottom = -469
MaxBottom = -469,
ViewPositionRotation = 180
},
new MapInfo()
@ -51,8 +52,7 @@ namespace LiveRadar.Configuration
Bottom = 864, // pymax
Top = 160, // pymin
CenterX = 0,
CenterY = 0,
Rotation = 0
CenterY = 0
},
new MapInfo()
@ -69,7 +69,8 @@ namespace LiveRadar.Configuration
Rotation = 143,
CenterX = -1440,
CenterY = 1920,
Scaler = 0.85f
Scaler = 0.85f,
ViewPositionRotation = 180
},
new MapInfo()
@ -96,6 +97,124 @@ namespace LiveRadar.Configuration
Right = 968,
Top = 114,
Bottom = 824
},
new MapInfo()
{
Name = "mp_boneyard",
MaxBottom = -1756,
MaxTop = 2345,
MaxRight = -715,
MaxLeft = 1664,
Left = 248,
Right = 728,
Top = 68,
Bottom = 897
},
new MapInfo()
{
Name = "mp_brecourt",
MaxBottom = -3797,
MaxTop = 4240,
MaxRight = -3876,
MaxLeft = 2575,
Left = 240,
Right = 846,
Top = 180,
Bottom = 934
},
new MapInfo()
{
Name = "mp_checkpoint",
MaxBottom = -2273,
MaxTop = 2153,
MaxRight = -3457,
MaxLeft = 2329,
Left = 30,
Right = 1010,
Top = 136,
Bottom = 890
},
new MapInfo()
{
Name = "mp_derail",
MaxBottom = -2775,
MaxTop = 3886,
MaxRight = -3807,
MaxLeft = 4490,
Left = 130,
Right = 892,
Top = 210,
Bottom = 829,
ViewPositionRotation = 180
},
new MapInfo()
{
Name = "mp_favela",
MaxBottom = -2017,
MaxTop = 1769,
MaxRight = -1239,
MaxLeft = 2998,
Left = 120,
Right = 912,
Top = 174,
Bottom = 878
},
new MapInfo()
{
Name = "mp_invasion",
MaxBottom = -3673,
MaxTop = 2540,
MaxRight = -3835,
MaxLeft = 980,
Left = 20,
Right = 808,
Top = 0,
Bottom = 1006
},
new MapInfo()
{
Name = "mp_nightshift",
MaxBottom = -2497,
MaxTop = 1977,
MaxRight = -2265,
MaxLeft = 945,
Left = 246,
Right = 826,
Top = 104,
Bottom = 916
},
new MapInfo()
{
Name = "mp_rundown",
MaxBottom = -2304,
MaxTop = 3194,
MaxRight = -3558,
MaxLeft = 3361,
Left = 32,
Right = 1030,
Top = 96,
Bottom = 892
},
new MapInfo()
{
Name = "mp_underpass",
MaxBottom = -601,
MaxTop = 3761,
MaxRight = -1569,
MaxLeft = 3615,
Left = 42,
Right = 978,
Top = 157,
Bottom = 944
}
};

View File

@ -19,6 +19,7 @@ namespace LiveRadar
public int MaxLeft { get; set; }
public int MaxRight { get; set; }
public float Rotation { get; set; }
public float ViewPositionRotation { get; set; }
public float CenterX { get; set; }
public float CenterY { get; set; }
public float Scaler { get; set; } = 1.0f;

View File

@ -28,8 +28,10 @@
<!-- images used by canvas -->
<img class="hide" id="hud_death" src="~/images/hud_weapons/hud_death.png" />
@section scripts {
<script>
<script defer="defer">
const textOffset = 15;
let previousRadarData = undefined;
let newRadarData = undefined;
@ -393,8 +395,8 @@
const radianLerpY = lerp(value.previous.radianAngles.y, rollAngleFix.y, completionPercent);
// this is some jankiness to get the fov to point the right direction
let firstVertex = calculateViewPosition((Math.PI * 2 * 0.75) + toRadians(stateInfo.mapInfo.rotation) - radianLerpX - (Math.PI + stateInfo.fovWidth), radianLerpY, stateInfo.forwardDistance);
let secondVertex = calculateViewPosition((Math.PI * 2 * 0.75) + toRadians(stateInfo.mapInfo.rotation) - radianLerpX + (Math.PI + stateInfo.fovWidth), radianLerpY, stateInfo.forwardDistance);
let firstVertex = calculateViewPosition((Math.PI / 2) + toRadians(stateInfo.mapInfo.rotation + stateInfo.mapInfo.viewPosRotation) - radianLerpX - (Math.PI + stateInfo.fovWidth), radianLerpY, stateInfo.forwardDistance);
let secondVertex = calculateViewPosition((Math.PI / 2) + toRadians(stateInfo.mapInfo.rotation + stateInfo.mapInfo.viewPosRotation) - radianLerpX + (Math.PI + stateInfo.fovWidth), radianLerpY, stateInfo.forwardDistance);
let currentX = lerp(startX, endX, completionPercent);
let currentY = lerp(startY, endY, completionPercent);