Essential Files

- Point Release
- SDK
- Q3Radiant
- MD3View

Information

- The Staff
- What's Quake3?
- What's a Mod?
- Get Hosted!

irc.telefragged.com #q3mods
News
- Current
- Archived
- Send News
Tutorials
- Coding
- Mapping
Interviews
- Caliber Mod
Mods
- Previews
:::Q3Fortress
- Reviews
Download
- Best Maps
- Best Models
- Tools
Community
- Forums
- Chat

Mod Database
- Sign-Up
- Add Mod
- Delete Mod
- View Mods
Hosted Sites
Mods

- Anarchy
- Battle Arena
- Caliber
- Chaotic Designs
- Classic Q3A
- Critical Mass
- Crusade
- Darkgift
- DarkStar
- Decimal
- Defend The Flags
- Full Metal Jacket
- Front Lines
- GatheringDarkness
- Guerilla Warfare
- Hunter
- Insanity
- Insanity Prod.
- Jagged Q3
- Nightrunner
- Obsolete
- Oblivion Demise
- Omega
- QForces
- Railfest
- ShadowRun
- SiR
- Snipers
- Team Phatass
- Terrorism
- Toons of Evil
- Tritium
- Urban Terror

Editing
- Rungy's Metropolis
- MD3Centre
- PikaMaps!
- Q3Empire
- RealGunz

 
 

Exploding Machine Gun Bullets - By Unknown


Load up the code, then open g_weapon.c and scroll down to line 152, it will look like something like this :
if ( traceEnt->takedamage) {
   G_Damage( traceEnt, ent, ent, forward, tr.endpos,
   damage, 0, MOD_MACHINEGUN);
}


This is the actual health inflicting function call. Comment this out by placing ' // ' in front of each line, so it will look like this :

// if ( traceEnt->takedamage) {
//    G_Damage( traceEnt, ent, ent, forward, tr.endpos,
//    damage, 0, MOD_MACHINEGUN);
// }


If you compiled now, you wouldn't get any actual damage, but it would give a visual (and audio) apperance. So the bullets do their job, the only difference is that it forgets to inflict damage.
Now we need to code another way to inflict damage, in a line just above the previous four write this :
G_RadiusDamage (tr.endpos, ent, damage * 1.2, damage * 3, NULL,    MOD_MACHINEGUN);

I'll explain what you just did :

* You called a radius damage infliction or the explosion (G_RadiusDamage)

* It's at position 'tr.endpos'

* 'ent' is an attacker entity (whom to give frags and everything associated to that)

* then it inflicts 'damage * 1.2' (we need more because acutally explosive bullets do more damage by nature)

* with explosion radius 'damage * 3' (again based on my own opinion, play with it and previus one if you want to)

* then 'NULL' is an entity whom we won't give any damage, in this case there's no one, you can specify 'ent' here, so you'll never die from your own explosive bullets!

* the last one (MOD_MACHINEGUN) is telling what Method Of Death is used (ex. for obituary messages).