Forum Thread
  Posts  
question for the blaster from quake II (Forums : Coding & Scripting : question for the blaster from quake II) Locked
Thread Options
Mar 28 2003 Anchor

how can u remove the sparks that comes from the bullet? i know its easy but i cant figure out... what line must i remove?

--

Hmmm...

leilei
leilei The person who doesn't like anything
Mar 28 2003 Anchor

It's a rendering flag in the code, i think. I haven't ventured into Q2 coding, because I simply don't like Quake2.

--

<  insert subject games here  >

Mar 29 2003 Anchor

i have a little code here for quake 2 blaster: (im using a quote cus thats easyer for me)

p_weapon.c wrote:
void Weapon_Blaster_Fire (edict_t *ent)
{
int damage;

// Needed for 3 bullets
vec3_t tempvec;

if (deathmatch->value)
damage = 15;
else
damage = 10;

// Remove Middle Bullet
// Blaster_Fire (ent, vec3_origin, damage, false, EF_BLASTER);

// add 2 new bolts below
// top bullet
VectorSet(tempvec, 0, 0, 8);
VectorAdd(tempvec, vec3_origin, tempvec);
Blaster_Fire (ent, tempvec, damage, false, EF_BLASTER);

// bottom bullet
VectorSet(tempvec, 0, 0, -8);
VectorAdd(tempvec, vec3_origin, tempvec);
Blaster_Fire (ent, tempvec, damage, false, EF_BLASTER);

ent->client->ps.gunframe++;
}


the codes lets me fire 2 bullets, one on top of the middle and one on the bottom, i removed the middle. but when i shoot up the bullets are still under eachother. like this: -

So u see one bullet when u shoot above u, and when u shoot in front of u, u see the 2 bullets. like this: :

how can i change the code so that when u shoot above u see the 2 bullets, is it something with the bullet angle position?

--

Hmmm...

Mar 29 2003 Anchor

the smiley is an eight+), without +, so eight) and eight is 8, get it? ;)

- Edited By rennie On Sat 29th, Mar 2003 @ 6:25:17am

--

Hmmm...

Mar 29 2003 Anchor

i found the solution for removing the sparks behind the bullet.

in g_weapons.c in void fire_blaster remove this line:

bolt->s.effects |= effect;

:)

--

Hmmm...

May 26 2003 Anchor

and now it doesnt work :S:S:S :(

--

Hmmm...

PsychoFarmer
PsychoFarmer modDB King
May 26 2003 Anchor

j00z is teh suq :P

--

___________________________
Today seems like a good day to burn a bridge or two
I am the freakiest man in the world!!!!
I beg to differ, on the contrary, I agree with every word that you say

User Posted Image

May 27 2003 Anchor

Rennie wrote: i have a little code here for quake 2 blaster: (im using a quote cus thats easyer for me)

p_weapon.c wrote:
void Weapon_Blaster_Fire (edict_t *ent)
{
int damage;

// Needed for 3 bullets
vec3_t tempvec;

if (deathmatch->value)
damage = 15;
else
damage = 10;

// Remove Middle Bullet
// Blaster_Fire (ent, vec3_origin, damage, false, EF_BLASTER);

// add 2 new bolts below
// top bullet
VectorSet(tempvec, 0, 0, 8);
VectorAdd(tempvec, vec3_origin, tempvec);
Blaster_Fire (ent, tempvec, damage, false, EF_BLASTER);

// bottom bullet
VectorSet(tempvec, 0, 0, -8);
VectorAdd(tempvec, vec3_origin, tempvec);
Blaster_Fire (ent, tempvec, damage, false, EF_BLASTER);

ent->client->ps.gunframe++;
}


the codes lets me fire 2 bullets, one on top of the middle and one on the bottom, i removed the middle. but when i shoot up the bullets are still under eachother. like this: -

So u see one bullet when u shoot above u, and when u shoot in front of u, u see the 2 bullets. like this: :

how can i change the code so that when u shoot above u see the 2 bullets, is it something with the bullet angle position?


I've never coded Quake2 before but I'm guessing it has a makevectors() function like Quake1.

You'd add this before the first VectorSet:

makevectors (self.v_angle);

Except self.v_angle is probably some huge thing, maybe ent->client->ps.v_angle or something?

The next part, I have no idea what the vector math functions are, but in QuakeC it was this:

vector tempvec1, tempvec2;

tempvec1 = self.origin + v_up * 8;
tempvec2 = self.origin + v_up * -8;

Again, I gots no idea about Quake 2 coding. Sorry ...

- Edited By SeienAbunae On Mon 26th, May 2003 @ 11:17:47pm

--

User Posted Image

May 28 2003 Anchor

i dont know what you mean...

--

Hmmm...

Reply to thread
click to sign in and post

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.