Blood Splat Question
#2294 posted by Ruin on 2017/03/08 06:11:31
Ok, I was in the wrong thread last time...
Do you know how to make a blood splat on the walls in quake that will align with the wall? I've seen it done before, but I cannot cite my sources, unfortunately. I'd be happy to pay someone to make a .qc file for this.
Thanks.
Blood Splat Question
#2295 posted by Ruin on 2017/03/08 06:11:37
Ok, I was in the wrong thread last time...
Do you know how to make a blood splat on the walls in quake that will align with the wall? I've seen it done before, but I cannot cite my sources, unfortunately. I'd be happy to pay someone to make a .qc file for this.
Thanks.
Untested Suggestion
#2296 posted by Preach on 2017/03/08 08:40:37
Try adding the following to SplatTouch above the line which changes self.velocity:
//fire a trace in the direction of movement to
//try and hit what we collided with
traceline(self.origin, self.origin + self.velocity, 0, world);
//if we hit a surface with the trace
//face the angle of the surface normal
if(trace_fraction < 1)
����self.angles = vectoangles(trace_plane_normal);
It's ever so slightly hacky, because we need to try and reconstruct the collision. So we have a bit of logic to guard against failure, and we don't change the angle if it fails.
This code will fix the angle relative to the facing of the wall, but you may need to add a constant angle if it's consistently turned 90 degrees from true.
Preach
#2297 posted by Ruin on 2017/03/09 06:17:51
Preach, you brilliant bastard!
Can I compensate you for your help?
Thank you so much!
Nah, Cheers
#2298 posted by Preach on 2017/03/09 19:53:01
I'd risk getting a bit mercantile if I accepted that!
Bit Subtraction
#2299 posted by R00k on 2017/03/24 00:13:23
okay, I'm not a novice to QuakeC but, i have a question.
float FOO 64
float foo2 128
float foo3 256
so
is it incorrect to use:
value = value - FOO
vs
value = value - (value & FOO)
logically the first just subtracts 64.
I'm looking at OLD code and finding stuff like this.
I have always done it
value = value - (value & FOO);
to just turn off a value.
#2300 posted by Kinn on 2017/03/24 00:22:36
is it incorrect to use:
value = value - FOO
I imagine you'll find instances of this in the old code only in places where they knew 100% that the bit was set, so just needed to subtract it.
Even so, it's still always better to use
value = value - (value & FOO)
because it shows the coder intent.
#2301 posted by Spike on 2017/03/24 00:32:01
if you know that its already set then just subtracting it is fine...
How Do I Get...
#2302 posted by ijazz2 on 2017/03/26 09:12:12
After killing something,it drops a weapon,out of which some can be picked-up.Just like AD but with vanilla QC code.How do I get this?
I tried adding rubicon2's code for g_axe and g_shotgun in my mod but it didn't work.So now I am starting with a clean source in a few days,how do I make this code from scratch?
Is there a shortcut way to add frames for a monster in qc? I heard it was there in some tutorial online but I can't find it.
#2303 posted by khreathor on 2017/03/26 10:00:24
Maybe start from checking out DropBackpack in items.qc
#2304 posted by R00k on 2017/03/29 04:33:21
Like khreathor says,
when the mod drops a backpack, it spawns an entity, (with a timer to remove it).
To drop a gun seperate from the pack, like the gun in hand with *some* ammo, you need to spawn a new entity, with a PRECACHED model. and give that entity a .ammo amount, and create a touch function for that gun-entity.
I had done this once long ago. I will dig up some code and try to point you to your goal.
It only helps you to become a better coder with hints and not code cut/paste. But I can give you a detail list of what you need to get this working.
Ijazz2
#2305 posted by Mike Woodham on 2017/03/29 09:49:22
Not exactly what you want but you may find some of the coding useful to get what you are after:-
http://www.insideqc.com/qctut/qctut-60.shtml
http://www.insideqc.com/qctut/lesson-10.shtml
Lightningdamage
#2306 posted by R00k on 2017/03/30 20:12:43
does anyone know why IDsoftware made the trace for the lg start at the feet not +16?
```
org = self.origin + '0 0 16';
traceline (org, org + v_forward*600, TRUE, self);
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
WriteEntity (MSG_BROADCAST, self);
WriteCoord (MSG_BROADCAST, org_x);
WriteCoord (MSG_BROADCAST, org_y);
WriteCoord (MSG_BROADCAST, org_z);
WriteCoord (MSG_BROADCAST, trace_endpos_x);
WriteCoord (MSG_BROADCAST, trace_endpos_y);
WriteCoord (MSG_BROADCAST, trace_endpos_z);
LightningDamage (self.origin, trace_endpos + v_forward*4, self, 30);
```
Lightning Position
#2307 posted by Preach on 2017/03/31 08:45:59
First thing to note is that the player's self.origin is at crotch level, not feet level. However, you are correct that the visual beam projects from a height of 16 units above the damage beam.
The sad truth is that the lightning bolt code is kinda buggy, and that's not even the worst bug. If you look through LightningDamage you'll notice it performs 3 traces in a row. The intent seems to be making the beam wider and allowing it to hit multiple enemies in the path. In fact, the vector calculations for the 2nd and 3rd are completely wrong, and the beams just fire into parts of the level that can't be seen by the player.
The buggy extra beams do fire in a way that is predictable based on the player's origin and facing angle. The following video shows a speedrun which exploits this! At about 50 seconds in, the player rides a lift down, faces in a very specific direction, and starts shooting the Thunderbolt. The specific location and direction of the shot causes a second beam to hit the Shalrath at the end of the level, which kills it before the doors open. This lets you grab the rune early, speeding up the run...
https://www.youtube.com/watch?v=D_P35WtpAwY
origin is at crotch level
So that's realistic then.
Lightning Buggy
#2309 posted by Qmaster on 2017/04/01 00:33:46
Sounds like a fast 4 wheeler.
Anyhow, is there a fixed version of the code somewhere?
#2310 posted by ijazz2 on 2017/04/05 14:55:30
I need to keep this thread at the top of the forum!
Someone please make this a permanent thread!
@qmaster
#2311 posted by R00k on 2017/04/08 06:27:20
org not origin
Gpl License Rant
#2312 posted by komagama on 2017/05/12 04:32:42
help guys:
I'm trying a Q1 total conversion(a true one! as Carmack stated in gpl readme) and I created my monsters totally re-skinning the standard knight model in qme.
So,in a supposed commercial release, may I use them also with the knight animations left untouched in qme ?
-my monsters don't resemble id original in any way and after all animations frames are only numeric values in qme not copyrighted assets I guess-
Gpl
#2313 posted by Qmaster on 2017/05/12 05:40:32
Lets you sell the stuff too.
The Content Is No GPL
#2314 posted by No on 2017/05/12 08:29:51
Engine and game code are GPL, the content is not. Even with a new skin, it's still the original model. You'd have to create a new one from scratch.
..thank But Think Of
#2315 posted by komagama on 2017/05/12 13:33:13
..qc code:
qc code is free to use and from what I saw animation frames are also listed in it so what ?
Semantics, Semantics
#2316 posted by Kinn on 2017/05/12 14:12:41
When you say "skin" do you mean the texture or the model? At some point the word "skin" transitioned from originally meaning just texture to meaning the whole thing - texture AND model.
If your model is a completely new model built from scratch then I imagine it's fine in a commercial release.
I Am Not A Lawyer! This Is Not Legal Advice!
#2317 posted by Spike on 2017/05/12 21:01:52
'may I use them also with the knight animations left untouched in qme'
if you started with the knight model in qme, then the result is still a derivative work in some small way, and still subject to id's copyright.
strictly speaking such derivative works (note that this includes maps that just contain id's textures) should not be distributed at all, but we usually do so anyway on the understanding that the recipient has the full version of quake. I believe we follow that interpretation thanks to someone at id saying it'd be okay despite not being stated in the license, but I can't prove that sadly.
you may also be able to get by on fair-use laws, depending on legal jurisdictions... so you can probably get away with loading up the model and deleting the skins+verticies+triangles. names and sizes of frames+skins is probably okay under fair use, but sticking to those frame numbers means that your resulting model is probably going to play back at the wrong speed or something stupid/ugly like that, so its not something that's really worth much anyway.
the sources for the maps was also released (under the gpl) a while back, but combining that with the vanilla textures is arguably a violation of the gpl!
if you want a _total_ conversion, then delete pak0.pak and pak1.pak from your harddrive...
(and use a different palette... if only because quake's sucks...)
#2318 posted by khreathor on 2017/05/12 23:57:12
I wonder what is minimum PAK content to run engine?
I guess palette, sprites to run MENU, start map, what else?
|