Client: Tweaks to the crosshairs by Theuaredead`
This commit is contained in:
parent
3077b70734
commit
f238fd41e4
5 changed files with 88 additions and 34 deletions
|
@ -297,17 +297,31 @@ w_crossbow_crosshair(player pl)
|
|||
vector cross_pos;
|
||||
vector aicon_pos;
|
||||
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12];
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[72/128,0],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
if (pl.viewzoom == 1) {
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12];
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[72/128,0],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
} else {
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-52,-8];
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[104,16],
|
||||
g_cross_spr,
|
||||
[24/128,96/128],
|
||||
[104/128, 16/128],
|
||||
[1,1,1],
|
||||
1,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
}
|
||||
|
||||
HUD_DrawAmmo1();
|
||||
HUD_DrawAmmo2();
|
||||
|
|
|
@ -142,13 +142,22 @@ void w_egon_primary(player pl)
|
|||
sound(pl, CHAN_WEAPON, "weapons/egon_windup2.wav", 1, ATTN_NORM, 100, 0);
|
||||
#endif
|
||||
pl.mode_tempstate = 1;
|
||||
Weapons_ViewPunchAngle(pl, [-5,0,0]);
|
||||
Weapons_ViewAnimation(pl, EGON_ALTFIREON);
|
||||
//Weapons_ViewPunchAngle(pl, [-5,0,0]);
|
||||
int r = (float)input_sequence % 2;
|
||||
if (r) {
|
||||
Weapons_ViewAnimation(pl, EGON_FIRE3);
|
||||
} else {
|
||||
Weapons_ViewAnimation(pl, EGON_FIRE4);
|
||||
}
|
||||
pl.w_idle_next = 1.5f;
|
||||
} else if not (pl.w_idle_next > 0.0f) {
|
||||
/* wait 3 seconds (idle next) */
|
||||
if (pl.mode_tempstate == 1) {
|
||||
Weapons_ViewAnimation(pl, EGON_ALTFIRECYCLE);
|
||||
if (r) {
|
||||
Weapons_ViewAnimation(pl, EGON_FIRE3);
|
||||
} else {
|
||||
Weapons_ViewAnimation(pl, EGON_FIRE4);
|
||||
}
|
||||
#ifdef SERVER
|
||||
sound(pl, CHAN_WEAPON, "weapons/egon_run3.wav", 1, ATTN_NORM, 100);
|
||||
#endif
|
||||
|
@ -173,13 +182,14 @@ void w_egon_release(player pl)
|
|||
sound(pl, CHAN_WEAPON, "weapons/egon_off1.wav", 1, ATTN_NORM, 100, 0);
|
||||
#endif
|
||||
pl.mode_tempstate = 3;
|
||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||
//Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||
}
|
||||
|
||||
pl.gflags &= ~GF_EGONBEAM;
|
||||
|
||||
if (pl.mode_tempstate == 3) {
|
||||
Weapons_ViewAnimation(pl, EGON_ALTFIREOFF);
|
||||
/* This is hack that is unwise for custom content, but it needs to terminate. */
|
||||
Weapons_ViewAnimation(pl, EGON_FIRE1);
|
||||
pl.w_idle_next = 1.0f;
|
||||
pl.w_attack_next = 1.1f;
|
||||
pl.mode_tempstate = 0;
|
||||
|
|
|
@ -171,11 +171,13 @@ w_mp5_primary(player pl)
|
|||
pl.mp5_mag--;
|
||||
|
||||
/* Actual firing */
|
||||
int r = (float)input_sequence % 2;
|
||||
if (r) {
|
||||
int r = (float)input_sequence % 3;
|
||||
if (r == 0) {
|
||||
Weapons_ViewAnimation(pl, MP5_FIRE1);
|
||||
} else {
|
||||
} else if (r = 2) {
|
||||
Weapons_ViewAnimation(pl, MP5_FIRE2);
|
||||
} else {
|
||||
Weapons_ViewAnimation(pl, MP5_FIRE3);
|
||||
}
|
||||
|
||||
Weapons_ViewPunchAngle(pl, [-2,0,0]);
|
||||
|
@ -329,7 +331,7 @@ w_mp5_crosshair(player pl)
|
|||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[24/128,48/128],
|
||||
[0,48/128],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1.0f,
|
||||
|
|
|
@ -261,16 +261,30 @@ w_python_crosshair(player pl)
|
|||
vector aicon_pos;
|
||||
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12];
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[48/128,0],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
|
||||
if (pl.viewzoom == 1) {
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[48/128,0],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
} else {
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[96/128,0],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
}
|
||||
|
||||
HUD_DrawAmmo1();
|
||||
HUD_DrawAmmo2();
|
||||
|
|
|
@ -275,6 +275,7 @@ void w_rpg_hud(player pl)
|
|||
{
|
||||
#ifdef CLIENT
|
||||
vector cross_pos;
|
||||
vector laser_pos;
|
||||
vector aicon_pos;
|
||||
|
||||
/* crosshair/laser */
|
||||
|
@ -287,9 +288,11 @@ void w_rpg_hud(player pl)
|
|||
lerp = Math_Lerp(18,6, trace_fraction);
|
||||
jitter[0] = (random(0,2) - 2) * (1 - trace_fraction);
|
||||
jitter[1] = (random(0,2) - 2) * (1 - trace_fraction);
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + ([-lerp,-lerp] / 2);
|
||||
laser_pos = g_hudmins + (g_hudres / 2) + ([-lerp,-lerp] / 2);
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12];
|
||||
|
||||
drawsubpic(
|
||||
cross_pos + jitter,
|
||||
laser_pos + jitter,
|
||||
[lerp,lerp],
|
||||
g_laser_spr,
|
||||
[0,0],
|
||||
|
@ -298,16 +301,27 @@ void w_rpg_hud(player pl)
|
|||
1.0f,
|
||||
DRAWFLAG_ADDITIVE
|
||||
);
|
||||
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[24/128,48/128],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1.0f,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
} else {
|
||||
cross_pos = g_hudmins + (g_hudres / 2) + [-12,-12];
|
||||
drawsubpic(
|
||||
cross_pos,
|
||||
[24,24],
|
||||
g_cross_spr,
|
||||
[0,0],
|
||||
[24/128,48/128],
|
||||
[0.1875, 0.1875],
|
||||
[1,1,1],
|
||||
1,
|
||||
1.0f,
|
||||
DRAWFLAG_NORMAL
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue