1
0
mirror of synced 2024-11-13 18:40:47 +01:00

Don't render very short roll tails (when the roll length is 3 pixels or less) to avoid dist = 0 issues and imprecisions with very low numbers

Not the best way to handle the issues, but does the job done, closes #558
This commit is contained in:
0auBSQ 2024-04-14 18:38:25 +09:00
parent 3203746bd0
commit bae20618bd

View File

@ -456,19 +456,23 @@ namespace TJAPlayer3
// Tail
_texarr.vcScaleRatio.X = 1.0f;
//var _x0 = x末端 + _adjust;
//var _y0 = y末端 + 0f;
var _d = _adjust;
var x1 = x + _adjust;
var y1 = y + _adjust;
var x2 = x末端 + _adjust;
var y2 = y末端 + _adjust;
var _xc = x2 + (x2 - x1) * _d / dist;
var _yc = y2 + (y2 - y1) * _d / dist;
//TJAPlayer3.Tx.Notes[(int)_gt].t2D描画((int)_x0, (int)_y0, 0, new Rectangle(rollOrigin + (TJAPlayer3.Skin.Game_Notes_Size[0] * 2) + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
_texarr.t2D中心基準描画((int)_xc, (int)_yc, 0, new Rectangle(rollOrigin + (TJAPlayer3.Skin.Game_Notes_Size[0] * 2) + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
// Only display the roll tail if the distance is high enough to see the tail texture to avoid math issues
if (dist > 3)
{
//var _x0 = x末端 + _adjust;
//var _y0 = y末端 + 0f;
var _d = _adjust;
var x1 = x + _adjust;
var y1 = y + _adjust;
var x2 = x末端 + _adjust;
var y2 = y末端 + _adjust;
var _xc = x2 + (x2 - x1) * _d / dist;
var _yc = y2 + (y2 - y1) * _d / dist;
//TJAPlayer3.Tx.Notes[(int)_gt].t2D描画((int)_x0, (int)_y0, 0, new Rectangle(rollOrigin + (TJAPlayer3.Skin.Game_Notes_Size[0] * 2) + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
_texarr.t2D中心基準描画((int)_xc, (int)_yc, 0, new Rectangle(rollOrigin + (TJAPlayer3.Skin.Game_Notes_Size[0] * 2) + _offset, frame, TJAPlayer3.Skin.Game_Notes_Size[0], TJAPlayer3.Skin.Game_Notes_Size[1]));
}
_texarr.fZ軸中心回転 = 0;