Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


Quake3 vec_3t and vec_t structures

This topic is 5923 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi people, I decided to try my hand at the Quake3 source code recently, but I have a few questions. Firstly, I tried modifying the rocket launchers fire_rocket function to fire 6 rocket simultaneously. It prooved simple to loop the function and return multiple rockets with random()ised speeds. However, this launched rockets in a 2D fan shape, so I tried randomizing the vec3_t structure named "dir" which is presumeably the rockets direction. This seemed simple enough, right? for(x=1; x<5; x++) { dir[x] = dir[x] + (random()*0.1); } So I fired my mod up, it seemed to work, but... When you turn, the distrobution of the rockets changes! Face in one direction and all six rockets fan out vertically, face at 90 degrees to that direction and they van our horizontally, face upwards and they dont fan out at all etc etc... Can anybody explain this to me? Also, can anybody tell me how to test my mod without having to wait for qvm`s to compile? Im sick of 3 second changes taking 60 seconds to try out Thanks in advance, -loply.

Share this post

Link to post
Share on other sites
Btw, just incase it matters, here are other modifications I made to fire_rocket():

Changed the bolt->s.pos.trType to TR_GRAVITY, changed the call to VectorScale on the bottom few lines to randomize the speed by adding +(random()*600) to it, and the code I added for changing the dir structure was just above the calls to Vector* and below the last bolt-> assignment.

[edited by - loply on May 1, 2002 12:37:21 PM]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!