mirror of
https://github.com/P3D-Legacy/P3D-Legacy.git
synced 2025-07-25 23:05:24 +02:00
Prevent mapscreen playerskin from getting too big
If playerskin on mapscreen > 32px wide then halve the skin size to prevent it from getting too big on the map
This commit is contained in:
parent
b28dbf6212
commit
044a3d2489
@ -480,18 +480,21 @@
|
|||||||
End If
|
End If
|
||||||
Dim PlayerSkinWidth As Integer = CInt(PlayerSkinTexture.Width / 3)
|
Dim PlayerSkinWidth As Integer = CInt(PlayerSkinTexture.Width / 3)
|
||||||
Dim PlayerSkinHeight As Integer = CInt(PlayerSkinTexture.Height / 4)
|
Dim PlayerSkinHeight As Integer = CInt(PlayerSkinTexture.Height / 4)
|
||||||
|
Dim PlayerSkinScale As Single = 1.0F
|
||||||
If PlayerSkinTexture.Width = PlayerSkinTexture.Height / 2 Then
|
If PlayerSkinTexture.Width = PlayerSkinTexture.Height / 2 Then
|
||||||
PlayerSkinWidth = CInt(PlayerSkinTexture.Width / 2)
|
PlayerSkinWidth = CInt(PlayerSkinTexture.Width / 2)
|
||||||
ElseIf PlayerSkinTexture.Width = PlayerSkinTexture.Height Then
|
ElseIf PlayerSkinTexture.Width = PlayerSkinTexture.Height Then
|
||||||
PlayerSkinWidth = CInt(PlayerSkinTexture.Width / 4)
|
PlayerSkinWidth = CInt(PlayerSkinTexture.Width / 4)
|
||||||
End If
|
End If
|
||||||
|
If PlayerSkinWidth > 32 Then
|
||||||
|
PlayerSkinScale = 0.5F
|
||||||
|
End If
|
||||||
|
|
||||||
Dim PlayerTextureRectangle As Rectangle = New Rectangle(0, CInt(PlayerSkinHeight * 2), PlayerSkinWidth, PlayerSkinHeight)
|
Dim PlayerTextureRectangle As Rectangle = New Rectangle(0, CInt(PlayerSkinHeight * 2), PlayerSkinWidth, PlayerSkinHeight)
|
||||||
|
|
||||||
Dim v As Vector2 = GetPlayerPosition()
|
Dim v As Vector2 = GetPlayerPosition()
|
||||||
If v.X <> 0 Or v.Y <> 0 Then
|
If v.X <> 0 Or v.Y <> 0 Then
|
||||||
Core.SpriteBatch.Draw(PlayerSkinTexture, New Rectangle(CInt(GetPlayerPosition.X + mapOffsetX - PlayerSkinWidth), CInt(GetPlayerPosition.Y + mapOffsetY - PlayerSkinHeight), CInt(PlayerSkinWidth * 2), CInt(PlayerSkinHeight * 2)), PlayerTextureRectangle, Color.White)
|
Core.SpriteBatch.Draw(PlayerSkinTexture, New Rectangle(CInt(GetPlayerPosition.X + mapOffsetX - PlayerSkinWidth), CInt(GetPlayerPosition.Y + mapOffsetY - PlayerSkinHeight), CInt(PlayerSkinWidth * 2 * PlayerSkinScale), CInt(PlayerSkinHeight * 2 * PlayerSkinScale)), PlayerTextureRectangle, Color.White)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Me.hoverText <> "" And Me.pokehoverText <> "" Then
|
If Me.hoverText <> "" And Me.pokehoverText <> "" Then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user