Bullehole tutorial????
Moderator: InsideQC Admins
21 posts
• Page 1 of 2 • 1, 2
Bullehole tutorial????
There are lots of tutorials but i can´t find a Bullehole tutorial.
Where can i find one?
Where can i find one?
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
Hehe... xwar.
Didn't finalquake-real have bulletholes, at least on the railgun? They were a little crappy though...
edit: Durr.. speaking of fqreal, Cheapy can you hit me up with that too? I love you.
Didn't finalquake-real have bulletholes, at least on the railgun? They were a little crappy though...
edit: Durr.. speaking of fqreal, Cheapy can you hit me up with that too? I love you.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
- Sajt
- Posts: 1215
- Joined: Sat Oct 16, 2004 3:39 am
http://mancubus.net/~cheapy/lostmods/2000/fqreal.zip
They did have QC code available but i lost it :/
They did have QC code available but i lost it :/
- leileilol
- Posts: 2783
- Joined: Fri Oct 15, 2004 3:23 am
The main things to keep in mind:
1. Keep track of how many you actually have. This way, you can remove the oldest ones and not get packet overflows / edict death.
2. Use traceline's trace_plane_normal to properly align your bullethole sprite's angles along the wall. This is actually quite easy if you're using just hitscan weapons, somewhat less easy (but still easy) when using projectiles.
I might put up my finalized rebovec function later if you really, really need it. (It's configured so that you can get a decent ricochet angle or just the trace_plane_normal)
1. Keep track of how many you actually have. This way, you can remove the oldest ones and not get packet overflows / edict death.
2. Use traceline's trace_plane_normal to properly align your bullethole sprite's angles along the wall. This is actually quite easy if you're using just hitscan weapons, somewhat less easy (but still easy) when using projectiles.
I might put up my finalized rebovec function later if you really, really need it. (It's configured so that you can get a decent ricochet angle or just the trace_plane_normal)
-

Dr. Shadowborg - InsideQC Staff
- Posts: 1110
- Joined: Sat Oct 16, 2004 3:34 pm
leileilol wrote:do you have any idea how hard that is
Yeah, what you do, is you take a copy of the world. And you get 6 planes forming a bounding box. Gradually, you clip away every single surface in the entire world from this bounding box. Then, for each point in the resulting clipped triangle mesh, you assign an alpha value based on its distance from the original surface place, and you assign texture coords based on its relative distance along/up the original plane. You then have a clipped away triangle mesh which looks pretty. Obviously the front and back places of your bounding box are copies of the original surface place, just moved a bit further forwards/back. The side/up planes are also fun to calculate, so you generally need a rotation around the original plane too. Of course, this is an expensive operation, so you really do need to cache the results.
Oh wait... You wanted it in QC.
That's a whole 'nother story then!
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
I have decompiled the fqreal progs.dat and here is my tutorial vor bullet holes.
Download this bullet.qc
http://www.file-upload.net/download-563 ... et.qc.html
And this for the bullet hole sprites
http://mancubus.net/~cheapy/lostmods/2000/fqreal.zip
Add this to defs.qc
And in Weapons.qc replace your firebullets function with this one
my firebullets function is only for shotgun bulletholes you can make it yourself for rocktmarks.
here is the full decompiled weapons.qc from Final Quake Real
http://www.file-upload.net/download-563 ... ns.qc.html
Download this bullet.qc
http://www.file-upload.net/download-563 ... et.qc.html
And this for the bullet hole sprites
http://mancubus.net/~cheapy/lostmods/2000/fqreal.zip
Add this to defs.qc
- Code: Select all
entity nullentity; // system
entity bulletholes; // system
entity lastbullet; // system
float numbulletholes; // system
entity rocketmarks; // system
entity lastmark; // system
float numrocketmarks; // system
.entity lastvictim;
And in Weapons.qc replace your firebullets function with this one
- Code: Select all
================
FireBullets
Used by shotgun, super shotgun, and enemy soldier firing
Go to the trouble of combining multiple pellets into a single damage call.
================
*/
void(float shotcount, vector dir, vector spread) FireBullets =
{
local float r;
local vector direction;
local vector src;
local float bullet;
bullet = 0;
makevectors(self.v_angle);
src = self.origin + v_forward * MOVETYPE_BOUNCE;
src_z = self.absmin_z + self.size_z * 0.7;
ClearMultiDamage();
while (shotcount > 0)
{
direction = dir + crandom() * spread_x * v_right + crandom() * spread_y * v_up;
traceline(src, src + direction * FL_WATERJUMP, 0, self);
if (trace_fraction != 1)
{
TraceAttack(MOVETYPE_STEP, direction);
}
if (!bullet && trace_ent == world)
{
r = random();
if (r < 0.33)
{
sound(trace_ent, CHAN_AUTO, "weapons/ric2.wav", 1, ATTN_NORM);
}
else
{
if (r < 0.66)
{
sound(trace_ent, CHAN_AUTO, "weapons/ric1.wav", 1, ATTN_NORM);
}
else
{
sound(trace_ent, CHAN_AUTO, "weapons/ric3.wav", 1, ATTN_NORM);
}
}
placebullethole(trace_endpos);
bullet = 1;
}
shotcount = shotcount - 1;
}
ApplyMultiDamage();
/*
bprint (trace_ent.classname);
bprint (".state = ");
bprint (ftos (trace_ent.state));
bprint ("\n");
*/
};
/*
my firebullets function is only for shotgun bulletholes you can make it yourself for rocktmarks.
here is the full decompiled weapons.qc from Final Quake Real
http://www.file-upload.net/download-563 ... ns.qc.html
- Stealth Kill
- Posts: 83
- Joined: Fri Dec 29, 2006 12:34 pm
21 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: Bing [Bot] and 1 guest

