Search found 122 matches

by Preach
Fri Jan 18, 2008 5:31 pm
Forum: QuakeC Programming
Topic: Finding a nearest entity
Replies: 11
Views: 4466

Re: Finding a nearest entity

Kind of tangential question, but does anyone know which of the following is faster to do in qc:

x = vlen( vec );

or

x = vec_x * vec_x + vec_y * vec_y + vec_z * vec_z;

One is a function call which has to calculate a square root, while the other has 3 multiplications and two additions, but all ...
by Preach
Sat Jan 05, 2008 2:45 am
Forum: Engine Programming
Topic: 3D Skyboxes
Replies: 20
Views: 10070

But you could put the near-distant and the distant buildings into the same skyroom and achieve the same effect, it's unnecessary.
by Preach
Fri Jan 04, 2008 1:08 am
Forum: Engine Programming
Topic: 3D Skyboxes
Replies: 20
Views: 10070

I can see the need for a regular 2D skybox behind the mount doom monolith citadel, sure, but that wouldn't need to be another skyroom, in fact that would often be worse than just a 2D-skybox. There's a lot of things that are just done better in 2D, like clouds and sun. So I'm not convinced that ...
by Preach
Thu Jan 03, 2008 11:57 pm
Forum: Engine Programming
Topic: 3D Skyboxes
Replies: 20
Views: 10070

See, I think this would be something that mappers would use, because they use regular skyboxes all the time. In fact it was a mapper who requested this to me. The way I suggested setting it up would mean that it has sensible fallbacks in other engines(2d skyboxes then regular sky render). I agree ...
by Preach
Sun Dec 23, 2007 12:43 am
Forum: Engine Programming
Topic: 3D Skyboxes
Replies: 20
Views: 10070

3D Skyboxes

Exactly how difficult would it be to add support for 3d skyboxes - the kind of thing you see in half-life 2 - into the quake engine? The sort of thing I had in mind is having a worldspawn key called "skymap" that would tell you the bsp file to render in place of a 2D skybox - although to complicate ...
by Preach
Fri Dec 14, 2007 12:31 am
Forum: QuakeC Programming
Topic: Entity checks
Replies: 10
Views: 3438


What about a custom builtin to tell this ? Something like
float (entity ent) isfree = #666; // or whatever value you prefer :P
I believe it would be trivial to implement.

What would this builtin return if the entity had been freed and then reused? If you didn't check within that 2 second grace ...
by Preach
Fri Nov 16, 2007 5:26 pm
Forum: QuakeC Programming
Topic: "You've got the lead"
Replies: 32
Views: 10479

Wouldn't only clients acquire frags though?
So how would a non-client become "leader"?

Ah, that's the cunning part. If you suicide you lose frags, so it's possible for all the players on the map to have < 0 frags. Then something else on the map, which starts with 0 frags, would take the lead. You ...
by Preach
Thu Nov 15, 2007 4:23 pm
Forum: QuakeC Programming
Topic: "You've got the lead"
Replies: 32
Views: 10479

As a general note, if you don't run the function spawn() then you don't actually create a new entity on the server. The only new things created here are variables which have a particular entity's "number" stored in them, and allow you to access that entity. (The technical term is a "pointer" to the ...
by Preach
Mon Nov 12, 2007 11:58 pm
Forum: General Discussion
Topic: Help... Quake music without CDs
Replies: 42
Views: 12010

It has both.
by Preach
Tue Nov 06, 2007 9:57 am
Forum: QuakeC Programming
Topic: world.qc
Replies: 22
Views: 7040

Interesting, Sajt. I'd think that simply calling the monster function would work.

Can you explain why this has to be done?

Because the monster_dog function is intended to be run on an entity that's already listed in the entity section of a map. When the map is loaded, the engine runs through ...
by Preach
Fri Nov 02, 2007 5:14 pm
Forum: Mapping
Topic: How to create rotating doors?
Replies: 70
Views: 38844

It won't be fullbright if you add lights to door.map and recompile it as you would any other map with lights. All you have to do is set the light values so that they correspond to that area's light values and it's no longer fullbright! As Dr. Shadowborg says, you can set the default light level and ...
by Preach
Fri Nov 02, 2007 1:01 pm
Forum: Mapping
Topic: How to create rotating doors?
Replies: 70
Views: 38844

It's not a lighting problem, it's a lighting advantage. You're better off with it in a seperate file. The wierd out of place shadows I was describing are what happens if you keep it in the same map file instead.
by Preach
Fri Nov 02, 2007 8:41 am
Forum: Mapping
Topic: How to create rotating doors?
Replies: 70
Views: 38844

I didn't put any lights in because I'm lazy, and the fullbright door looked alright in the test map. You can add lights to door.map and compile them in. They're fixed lights, not changing when you rotate the brush, but that would be true whether you made a seperate map or not, and the same happens ...
by Preach
Thu Nov 01, 2007 4:27 pm
Forum: Mapping
Topic: How to create rotating doors?
Replies: 70
Views: 38844

Don't give up, the external model method works regardless of the compiler, which is why I recommend it, at least for now. It will work with solid rotation in dp, as the example map above shows.
by Preach
Thu Nov 01, 2007 1:21 pm
Forum: Mapping
Topic: How to create rotating doors?
Replies: 70
Views: 38844

That's because worldcraft strips out origin keys from brush entities, assuming they shouldn't be there. Perhaps it would be better to give it a unique key name like _rotate_origin for the compiler to read, which is then interpreted as the origin both for rotational centre and for the origin of the ...