mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-29 23:32:18 +00:00
CLIENT/FTE: Fix M2 Flamethrower crosshair not disappearing when ADS
This commit is contained in:
parent
240d116728
commit
065c369600
1 changed files with 32 additions and 29 deletions
|
@ -1212,13 +1212,19 @@ void() Draw_Crosshair =
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (getstatf(STAT_ACTIVEWEAPON) == W_M2 || getstatf(STAT_ACTIVEWEAPON) == W_TESLA || getstatf(STAT_ACTIVEWEAPON) == W_DG3)
|
if (getstatf(STAT_WEAPONZOOM) != 1 && getstatf(STAT_WEAPONZOOM) != 2) {
|
||||||
{
|
// 'O' crosshair
|
||||||
|
if (getstatf(STAT_ACTIVEWEAPON) == W_M2 || getstatf(STAT_ACTIVEWEAPON) == W_FIW || getstatf(STAT_ACTIVEWEAPON) == W_TESLA || getstatf(STAT_ACTIVEWEAPON) == W_DG3) {
|
||||||
float circle_offset = stringwidth("O", 0, [12, 12])/2;
|
float circle_offset = stringwidth("O", 0, [12, 12])/2;
|
||||||
drawstring([g_width/2 - circle_offset, g_height/2 - circle_offset], "O", [12, 12], crosshair_color, 1, 0);
|
drawstring([g_width/2 - circle_offset, g_height/2 - circle_offset], "O", [12, 12], crosshair_color, 1, 0);
|
||||||
}
|
}
|
||||||
else if (getstatf(STAT_WEAPONZOOM) != 1 && getstatf(STAT_WEAPONZOOM) != 2 && getstatf(STAT_ACTIVEWEAPON) != W_PANZER && getstatf(STAT_ACTIVEWEAPON) != W_LONGINUS) // naievil (FIXME) crosshair cvar
|
// '.' crosshair
|
||||||
{
|
else if (getstatf(STAT_ACTIVEWEAPON) == W_PANZER || getstatf(STAT_ACTIVEWEAPON) == W_LONGINUS) {
|
||||||
|
vector screenSize2 = [g_width, g_height];
|
||||||
|
drawfill(screenSize2 / 2 - [2, 2], [4, 4], crosshair_color, crosshair_opacity, 0); // dot
|
||||||
|
}
|
||||||
|
// Standard crosshair
|
||||||
|
else {
|
||||||
int x_value, y_value;
|
int x_value, y_value;
|
||||||
int crosshair_offset;
|
int crosshair_offset;
|
||||||
|
|
||||||
|
@ -1241,9 +1247,6 @@ void() Draw_Crosshair =
|
||||||
drawfill(screenSize / 2 - [+crossSize.y * 2 + crosshair_offset_step, crossSize.x], [crossSize.y, crossSize.x], crosshair_color, crosshair_opacity, 0); // right
|
drawfill(screenSize / 2 - [+crossSize.y * 2 + crosshair_offset_step, crossSize.x], [crossSize.y, crossSize.x], crosshair_color, crosshair_opacity, 0); // right
|
||||||
drawfill(screenSize / 2 - [-crossSize.y * 1 - crosshair_offset_step, crossSize.x], [crossSize.y, crossSize.x], crosshair_color, crosshair_opacity, 0); // left
|
drawfill(screenSize / 2 - [-crossSize.y * 1 - crosshair_offset_step, crossSize.x], [crossSize.y, crossSize.x], crosshair_color, crosshair_opacity, 0); // left
|
||||||
}
|
}
|
||||||
else if (getstatf(STAT_WEAPONZOOM) != 1 && getstatf(STAT_WEAPONZOOM) != 2) {
|
|
||||||
vector screenSize2 = [g_width, g_height];
|
|
||||||
drawfill(screenSize2 / 2 - [2, 2], [4, 4], crosshair_color, crosshair_opacity, 0); // dot
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue