Author Topic: Alternate Fireing for weapons  (Read 3365 times)

lizards160

  • Posts: 62
  • Turrets: +1/-5
Alternate Fireing for weapons
« on: January 31, 2009, 01:47:01 am »
How do you add an alternate fire to a wep.
for example the blaster

I went to /src/game/tremulous.h
Code: [Select]
#define BLASTER_REPEAT              400
#define BLASTER_K_SCALE             1.0f
#define BLASTER_SPREAD              200
#define BLASTER_SPEED               5000
#define BLASTER_DMG                 HDM(9)
#define BLASTER_SECONDARY_REPEAT 200
#define BLASTER_SECONDARY_SPREAD 100
#define BLASTER_SECONDARY_SPEED 5500
#define BLASTER_SECONDARY_DMG HDM(5)

then i went to /scr/game/g_weapons.c
Code: [Select]
void blasterFire( gentity_t *ent , qboolean secondary )
{
  gentity_t *m;

  if (secondary)
  {
  m = fire_blaster( ent, muzzle, forward );
  }
  else
  {
  m = fire_blaster( ent, muzzle, forward );
  }

//  VectorAdd( m->s.pos.trDelta, ent->client->ps.velocity, m->s.pos.trDelta );  // "real" physics
}

I know that the fires for the blaster will be the same at the moment but what do i do now i believe there is a step i am missing somewhere please help

[edit] oh and i have made the cfg for the data
when i log into my server now i can shoot the altfire and all weapons but i somehow got rid of the collision detection for bullets... help please
« Last Edit: January 31, 2009, 02:39:19 am by lizards160 »

Foe of Eternity

  • Posts: 169
  • Turrets: +6/-13
Re: Alternate Fireing for weapons
« Reply #1 on: February 14, 2009, 09:28:57 pm »
did you make sure in bg_misc.c that hasAltMode is set to true?

No. Let n00bs pick overly destructive Human weapons and then use them in their own base and around their own teammates. Maybe then they'll learn that doing that is a stupid idea. Meanwhile, I will be slashing at their damaged Armoury, after I vault their smoking turrets and the scattered bodies of their TK' d teammates. N00bs: they're what's for breakfast.