Forum

Have I Been Missing This All These Years!?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Have I Been Missing This All These Years!?

Postby Junrall » Sat Mar 27, 2010 3:34 am

Hmm,
I just now noticed that rockets, nails, and whatever do not remove themselves when they touch the sky!

Why doesn't the following code work?
Code: Select all
   if (pointcontents(self.origin) == CONTENT_SKY)
   {
      remove(self);
      return;
   }
Good God! You shot my leg off!
User avatar
Junrall
 
Posts: 191
Joined: Mon Sep 21, 2009 12:27 am
Location: North West Oregon, USA

Postby r00k » Sat Mar 27, 2010 4:52 am

Looks finite.

Maybe you're calling it aside the code path??


Code: Select all
void () T_MissileTouch =
{
   local float   damg;
   
   if (other == self.owner) return;

   if (pointcontents(self.origin) == CONTENT_SKY)
   {
      remove(self);
      return;
   }
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm

Postby Junrall » Sat Mar 27, 2010 5:13 am

r00k wrote:Looks finite.

Maybe you're calling it aside the code path??

Nope, it is happening with the standard Quake code... in fact, this is happening with the progs.dat file within the .PAK file.

I've tried it in Darkplaces, DirectQ, FitzQuake, and WinQuake... on Start and E1M1.

Each time I shoot the sky with a nail I see the TE_WIZSPIKE effect... which tells me that the spike isn't being removed.
Good God! You shot my leg off!
User avatar
Junrall
 
Posts: 191
Joined: Mon Sep 21, 2009 12:27 am
Location: North West Oregon, USA

Postby gnounc » Sat Mar 27, 2010 5:21 am

(iirc) I asked Asaki about this a while back, he said the maps need to be recompiled to fix that.
User avatar
gnounc
 
Posts: 424
Joined: Mon Apr 06, 2009 6:26 am

Postby FrikaC » Sat Mar 27, 2010 5:45 am

Yes, the old qbsp compiler used during the development of the original quake treats sky brushes as solid. The qbsp that was released after Quake came out correctly uses CONTENTS_SKY, but none of the original maps were built with a current version.
FrikaC
Site Admin
 
Posts: 1026
Joined: Fri Oct 08, 2004 11:19 pm

Postby metlslime » Sat Mar 27, 2010 7:20 am

what FrikaC said.
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Postby metlslime » Sat Mar 27, 2010 7:24 am

Actually it's more complicated than that...

In the original compilers, it was possible to get "CONTENTS_SKY" if you surrounded the sky brush with solid brushes. In otherwords, it would be solid if it touched the void, otherwise sky.

Later compilers added the feature of turning even void-touching skies into CONTENTS_SKY...

you know, based on my memory of 13 years ago.
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Postby Junrall » Sat Mar 27, 2010 4:16 pm

Well, this is not a huge issue for me and I can live with it... however, should I choose to tackle this sometime down the road how hard is it to recompile the maps? I suppose this a is a question better suited for the "Mapping" section.
Good God! You shot my leg off!
User avatar
Junrall
 
Posts: 191
Joined: Mon Sep 21, 2009 12:27 am
Location: North West Oregon, USA

Postby r00k » Sun Mar 28, 2010 7:50 am

You can always set a timer in the projectile's think to remove after 5 seconds. There is no way a projectile cant travel the distance of a map (original Quake limits), in 5 seconds at 1000 u/sec?? If so then up it to 10 :P

In CTF this is the same thing. The hook can hook the skys on the original maps, yet not on custom maps made later. We can ALWAYS recompile the original maps now.
r00k
 
Posts: 1110
Joined: Sat Nov 13, 2004 10:39 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest