Wudan Posted June 28, 2003 Share Posted June 28, 2003 BooYah! Azymn with the wicked math tricks! Link to comment Share on other sites More sharing options...
recombinant Posted June 29, 2003 Author Share Posted June 29, 2003 BooYahh is right!!! Many thanks again to the master!!! But I'd really like to know *why* it works - what the concept is behind the functions. I'm happy to copy and paste the code, but I really need to understand what's going on here! Ack! Link to comment Share on other sites More sharing options...
razorace Posted June 29, 2003 Share Posted June 29, 2003 static void ShootFourShots( gentity_t *ent ) { [i]//racc - create missile entities[/i] gentity_t *missile1; gentity_t *missile2; gentity_t *missile3; gentity_t *missile4; [i]//racc - initialize origin point vectors //tmpMzzle = muzzle point in x/y orientation from the player (doesn't worry about the z axis) //newMuzzle = working muzzle origin vector. This is where your //desired muzzle point vector will be at the end of the calculations.[/i] vec3_t tmpMuzzle, newMuzzle; VectorCopy(fusionMuzzle[0], tmpMuzzle); VectorCopy(ent->s.pos.trBase, newMuzzle); [i]//racc - Translate the x factor of the fusionMuzzle into the current //muzzle position by using the forward/right vectors determined //earlier.[/i] VectorMA(newMuzzle, tmpMuzzle[0], forward, newMuzzle); [i]//racc - Translate the y factor with the same method.[/i] VectorMA(newMuzzle, tmpMuzzle[1], right, newMuzzle); [i]//racc - Bump up the muzzle point so it's in terms of the viewpoint inside of the player origin.[/i] newMuzzle[2] += ent->client->ps.viewheight + tmpMuzzle[2]; [i]//racc - Convert the data to integers to make it easier on the network connection.[/i] SnapVector( newMuzzle ); [i]//racc - Configure missile1 with the newly calculated muzzle point.[/i] missile1 = CreateMissile( newMuzzle, forward, FUSION_CUTTER_VELOCITY, 10000, ent, qfalse); Link to comment Share on other sites More sharing options...
Fracman Posted June 29, 2003 Share Posted June 29, 2003 To be perfect, you'd have to adjust the firing sequences to the inclination of the weapon, since it is lower on the right side of your screenshot. And it seems the two left and the two right projectiles are closer to each other, leaving a gap between the middle two. But its not that important. Cool its working!!! Link to comment Share on other sites More sharing options...
recombinant Posted June 30, 2003 Author Share Posted June 30, 2003 Thanks for the inline comments, razorace - they help immensely... Fracman - yes it's not perfect, but I'm really happy with the results so far, and I still have some tweaking to do with it anyway. Thanks for all the great help, guys!! YOU ROCK!!! Link to comment Share on other sites More sharing options...
ImmolatedYoda Posted June 30, 2003 Share Posted June 30, 2003 man, i cant wait to plug some stormies with some secondary fusion cutter action.... good work recombinant and everyone else, youre helping a better cause! Link to comment Share on other sites More sharing options...
razorace Posted June 30, 2003 Share Posted June 30, 2003 Originally posted by recombinant Thanks for the inline comments, razorace - they help immensely...Thanks for all the great help, guys!! YOU ROCK!!! You're welcome. Link to comment Share on other sites More sharing options...
recombinant Posted July 3, 2003 Author Share Posted July 3, 2003 Originally posted by Fracman To be perfect, you'd have to adjust the firing sequences to the inclination of the weapon, since it is lower on the right side of your screenshot. And it seems the two left and the two right projectiles are closer to each other, leaving a gap between the middle two. After playing around with the code for a bit I think I've got it looking much better: There's still an issue with the sequencing on the primary fire that Salv pointed out to me privately, but that shouldn't be too difficult to fix. Link to comment Share on other sites More sharing options...
recombinant Posted July 3, 2003 Author Share Posted July 3, 2003 ...as predicted, the fix for the sequencing was trivial. whew! Link to comment Share on other sites More sharing options...
Fracman Posted July 3, 2003 Share Posted July 3, 2003 Everything is trivial... after you know how to do Nice work, Code-Recombinant! Link to comment Share on other sites More sharing options...
RoxStar Posted July 4, 2003 Share Posted July 4, 2003 Man, If I could do half of the stuff you guys are doing... Link to comment Share on other sites More sharing options...
SepTa Posted July 25, 2003 Share Posted July 25, 2003 If you could do half of it.... hmmm...... that brings up a good point. How do you do half this stuff. Ok, let me reitterate. I've scoured the base pk3s, searched them up and down. I still havent found the files that control the weaponry. Furthermore, I've only ever seen lightsaber mods, and not very good ones at that. I've yet to find a mod that actually edits the gun's projectiles. Reskins and new models all over the place, with some quickened fire rates, dubbed as weapon mods. But none of the projectiles have changed. But looking at the FC here... It appears you guys have pulled it off.to my knowledge, you guys are the only people to actually successfully turn one weapon into another. My question is: What files controll the weapon actions? sounds?what controls the projectiles? I might be able to pull off making some very unique guns, I'm good at figuring out code. But I need to know file names and directories first. Any help here? Link to comment Share on other sites More sharing options...
Commodus Posted July 25, 2003 Share Posted July 25, 2003 The source. Download the second set of editing tools and you will get the source code for the game, cgame and ui modules of JK2 (in C code). When the .c files are compiled they make .qvm files (which are located in the vm directory in the .pk3s). Link to comment Share on other sites More sharing options...
Fracman Posted July 25, 2003 Share Posted July 25, 2003 The source has those weapon related files: bg_weapons.h (defines to enable each weapons and ammo separately) bg_weapons.c (properties of each weapon, e.g. ammo, damage) cg_weaponinit.c (initialize weapon structures and assign models & sounds) cg_weapon.c (insert weapons in game) fx_xxx.c (weapon effects) g_weapon.c (firing weapons, primary and secondary fire) Link to comment Share on other sites More sharing options...
recombinant Posted July 25, 2003 Author Share Posted July 25, 2003 Originally posted by Commodus The source. Download the second set of editing tools and you will get the source code for the game, cgame and ui modules of JK2 (in C code). When the .c files are compiled they make .qvm files (which are located in the vm directory in the .pk3s). ...succinctly put. well done! Link to comment Share on other sites More sharing options...
RoxStar Posted July 26, 2003 Share Posted July 26, 2003 Thanks. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.