Site Content
   Our Chatroom
   Hosting Details
   Mailbag
   Advertise
   1.27 Ready Mods
   Benchmarks
   Technology
   Q3 Strategy
   Mod Reviews
   Features
   Columns
   Poll Results
   Screenshots
Game Media
   Demo Archive
   Models Index
   Skins Index
   Maps Index
   Downloads
Game Info
   Sys Requirements
   Characters
Eternal Arena
Q3A Console
   Commands
   Variables
   Tweaking
Clan Community
   Clan Index
   Clan News
   Clan Admin
   Clan Forum
   Clan Hosting
Coding Tutorials
   Coding Main
   Weapon Coding
   Item Coding
   General Coding
   Menu Coding
   Advanced Coding
Staff
    Corven
site manager
Com. Keen
forum moderator
Zerpire
clans rep.
Nukleuz
skins reviews
Mercenary
skins reviews
ResidentScum
news / maps reviews
F4nt0m45
news / mod reviews
Wanted
news reporters
Wanted
column writers
MGON Channel

   PC
   Action
   Roleplay
   Simulation
   Console
   Strategy
   Racing


      Coding Tutorials
Monday, May 14  

Coding Tutorials - Weapon Coding

Code to be Deleted or Commented out
Code to be Added or Changed

Grenades
You can make the Grenade Launcher fire the grenades over long distances and in straight lines so the grenades aren't effected by gravity.

g_weapon.c

The following lines in the weapon_grenadelauncher_fire function adds alittle height when you fire off a grenade, so comment them out by adding a // infront of them, that will make them fire just straight forward where you point to.

// extra vertical velocity
// forward[2] += 0.2;
// VectorNormalize( forward );

g_missile.c

Lets make the grenades fly straight and not effected by gravity and fall to the floor, so in the fire_grenade find the line:-
bolt->s.pos.trType = TR_GRAVITY;

and change it to
bolt->s.pos.trType = TR_LINEAR;

Advertisement
Web Search
Help
Power Search
Download free search tool
Poll
Now what do you think to Team Arena?







id .plans
  supplied by Webdog
Forums
   General Forum
   Clans Forum
   Mods & Editing
   EA Forum
Hosted Sites
Clans
   Knights of the Quad
Modifications
   NeodymiumX
Mapping
   Fusion
   Pete's Place
   Pur3 Q3
   Gef's Maps
Misc.
   g-Zone
   Console
   QTCentral
Affiliates
   Challenge-Us
   The BackBurner
   Mplayer EU League
   Weapons of Fury
   Battle of the Sexes
   Western Q3
Buttons
Link to us

Don't forget to
Rate our Site






 Home          Top

The Gamers' Choice