Slight weapon adds/edits for ongoing work in FreeHL
This commit is contained in:
parent
a74f5242a4
commit
7d373d9216
3 changed files with 63 additions and 2 deletions
|
@ -119,13 +119,13 @@ void w_glock_secondary(void)
|
|||
if (!pl.a_ammo1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (pl.a_ammo1) {
|
||||
Weapons_ViewAnimation(GLOCK_SHOOT);
|
||||
} else {
|
||||
Weapons_ViewAnimation(GLOCK_SHOOT_EMPTY);
|
||||
}
|
||||
|
||||
|
||||
Weapons_ViewPunchAngle([-2,0,0]);
|
||||
#else
|
||||
if (!pl.glock_mag) {
|
||||
|
@ -159,6 +159,9 @@ void w_glock_reload(void)
|
|||
if (pl.a_ammo1 >= 18) {
|
||||
return;
|
||||
}
|
||||
if (!pl.a_ammo2) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (pl.a_ammo1) {
|
||||
Weapons_ViewAnimation(GLOCK_RELOAD);
|
||||
|
|
|
@ -63,6 +63,33 @@ void w_hornetgun_holster(void)
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
#ifdef SSQC
|
||||
void w_hornetgun_shoothornet(void)
|
||||
{
|
||||
static void Hornet_Touch(void) {
|
||||
if (other.takedamage == DAMAGE_YES) {
|
||||
Damage_Apply(other, self.owner, 10, trace_endpos, FALSE);
|
||||
} else {
|
||||
}
|
||||
remove(self);
|
||||
}
|
||||
Weapons_MakeVectors();
|
||||
entity bolt = spawn();
|
||||
setmodel(bolt, "models/hornet.mdl");
|
||||
setorigin(bolt, Weapons_GetCameraPos() + (v_forward * 16) + (v_up * -8));
|
||||
bolt.owner = self;
|
||||
bolt.velocity = v_forward * 1000;
|
||||
bolt.movetype = MOVETYPE_FLY;
|
||||
bolt.solid = SOLID_BBOX;
|
||||
//bolt.flags |= FL_LAGGEDMOVE;
|
||||
bolt.gravity = 0.5f;
|
||||
bolt.angles = vectoangles(bolt.velocity);
|
||||
bolt.touch = Hornet_Touch;
|
||||
setsize(bolt, [0,0,0], [0,0,0]);
|
||||
}
|
||||
#endif
|
||||
|
||||
void w_hornetgun_primary(void)
|
||||
{
|
||||
player pl = (player)self;
|
||||
|
@ -71,6 +98,7 @@ void w_hornetgun_primary(void)
|
|||
}
|
||||
|
||||
#ifdef SSQC
|
||||
w_hornetgun_shoothornet();
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, sprintf("agrunt/ag_fire%d.wav", floor(random(1,4))), 1, ATTN_NORM);
|
||||
#else
|
||||
Weapons_ViewAnimation(HORNETGUN_SHOOT);
|
||||
|
@ -87,6 +115,7 @@ void w_hornetgun_secondary(void)
|
|||
}
|
||||
|
||||
#ifdef SSQC
|
||||
w_hornetgun_shoothornet();
|
||||
Weapons_PlaySound(pl, CHAN_WEAPON, sprintf("agrunt/ag_fire%d.wav", floor(random(1,4))), 1, ATTN_NORM);
|
||||
#else
|
||||
Weapons_ViewAnimation(HORNETGUN_SHOOT);
|
||||
|
|
|
@ -56,7 +56,36 @@ void w_tripmine_holster(void)
|
|||
}
|
||||
void w_tripmine_primary(void)
|
||||
{
|
||||
player pl = (player)self;
|
||||
if (pl.w_attack_next > 0.0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Weapons_MakeVectors();
|
||||
traceline(Weapons_GetCameraPos(), Weapons_GetCameraPos() + v_forward * 64, FALSE, pl);
|
||||
|
||||
if (trace_fraction == 1.0f) {
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef CSQC
|
||||
Weapons_ViewAnimation(TRIPMINE_FIRE2);
|
||||
#else
|
||||
entity mine = spawn();
|
||||
setmodel(mine, "models/v_tripmine.mdl");
|
||||
setorigin(mine, trace_endpos);
|
||||
mine.frame = TRIPMINE_WORLD;
|
||||
vector norm = trace_plane_normal;
|
||||
norm_x = 0 - norm_x;
|
||||
norm_y = 0 - norm_y;
|
||||
|
||||
mine.angles = vectoangles( [0,0,0.5] - norm );
|
||||
setorigin(mine, trace_endpos - (v_forward * 4));
|
||||
#endif
|
||||
|
||||
pl.w_attack_next = 0.5f;
|
||||
pl.w_idle_next = 2.5f;
|
||||
}
|
||||
void w_tripmine_secondary(void)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue