secret walls bleeding when shot
Moderator: InsideQC Admins
5 posts
• Page 1 of 1
secret walls bleeding when shot
Hi, Just got back into qc and can not find my files for fixing the bug of secret walls bleeding when they are shot. Can anyone please help! Thank you in advance!
- pfhorce2
- Posts: 2
- Joined: Thu Dec 08, 2011 10:36 pm
Re: secret walls bleeding when shot
Here's a tip: check for occurrences of SpawnBlood () in the code.
Another tip: you should check if the damaged entity uses a BSP model before spawning blood...
Good luck.
Another tip: you should check if the damaged entity uses a BSP model before spawning blood...
Good luck.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC
(LordHavoc)
-

frag.machine - Posts: 2090
- Joined: Sat Nov 25, 2006 1:49 pm
Re: secret walls bleeding when shot
frag.machine wrote:Here's a tip: check for occurrences of SpawnBlood () in the code.
Another tip: you should check if the damaged entity uses a BSP model before spawning blood...
Good luck.
Thanks for the heads up frag.machine and Thanks Christian "CeeJay" Jensen for code.
Set check for DAMAGE_AIM , only for SpawnBlood not for the damagefunction T_Damage.
Change the "else" to "if (trace_ent.takedamage!=DAMAGE_AIM)" (no quotes) Axe, TraceAttack, spike_touch, superspike_touch, LightningDamage: traceline, e1 and e2.
No more blood on walls or switches!!
- pfhorce2
- Posts: 2
- Joined: Thu Dec 08, 2011 10:36 pm
Re: secret walls bleeding when shot
This is what I have used in the past.
I makes secret doors spark with a Polychromatic particle effect.
I makes secret doors spark with a Polychromatic particle effect.
- Code: Select all
void (float damage, vector dir) TraceAttack =
{
local vector vel;
local vector org;
vel = normalize (((dir + (v_up * crandom ())) + (v_right * crandom ())));
vel = (vel + (2 * trace_plane_normal));
vel = (vel * 200);
org = (trace_endpos - (dir * 4));
if (trace_ent.takedamage)
{
if (trace_ent.classname == "player")
{
SpawnBlood (org, (vel * 0.2), damage);
}
else
{ //R00k doors take damage but shouldnt bleed
particle (trace_endpos, '0 0 100', 244, (damage * 4));
}
AddMultiDamage (trace_ent, damage);
}
else
{
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_GUNSHOT);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
}
}
;
- r00k
- Posts: 1110
- Joined: Sat Nov 13, 2004 10:39 pm
Re: secret walls bleeding when shot
Hello R00k,
Thank you for your idea !
I will use it.
The only thing, in your code all monsters will not "bleed" as well... only player.
But I guess you only wanted to show your idea and dont go into details.
Thanks again.
Seven
Thank you for your idea !
I will use it.
The only thing, in your code all monsters will not "bleed" as well... only player.
But I guess you only wanted to show your idea and dont go into details.
Thanks again.
Seven
- Seven
- Posts: 301
- Joined: Sat Oct 06, 2007 8:49 pm
- Location: Germany
5 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest