Forum

code for different engines?

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

code for different engines?

Postby ajay » Tue Mar 16, 2010 8:57 pm

Is it possible to run a particular piece of code dependent on what engine is being used? I ask as the flashlight I'm using only works with DP and I'd like to keep it. However it would be cool for the code to check the engine and run a different flashlight if not DP.

Cool, but not possible? Or is it?

cheers
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby mh » Tue Mar 16, 2010 9:05 pm

You could check for DP extensions in your QC I suppose. Have a look here for sample code: http://www.quake-1.com/docs/quakesrc.org/140.html#part3
We had the power, we had the space, we had a sense of time and place
We knew the words, we knew the score, we knew what we were fighting for
User avatar
mh
 
Posts: 2292
Joined: Sat Jan 12, 2008 1:38 am

Postby Teiman » Tue Mar 16, 2010 11:43 pm

theres always teh checkextensions stuff

http://ezquake.sourceforge.net/docs/?qc
Teiman
 
Posts: 309
Joined: Sun Jun 03, 2007 9:39 am

Postby ajay » Wed Mar 17, 2010 5:21 pm

Thanks both, I'll have a look at it.
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby ajay » Wed Mar 17, 2010 6:34 pm

Is there any reason why Fitzquake, TQ wouldn't be able to show the flashlight in this http://www.inside3d.com/showtutorial.php?id=119 tutorial?
It works with DP and isn't dependent on extensions, so not sure why it doesn't work?
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby Sajt » Wed Mar 17, 2010 7:52 pm

Did you remove the bubble sprite? An entity without a model won't be networked so it won't make its way to the client (DarkPlaces probably looks at more fields, but most engines just look at model). If you have a null.mdl lying around you should use that.
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

Postby ajay » Wed Mar 17, 2010 8:45 pm

That may well be it, can't check atm, will later, thanks a lot
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK

Postby ajay » Fri Mar 19, 2010 8:55 pm

Bugger. Having spawn/precache problems. Tried precaching null.mdl all over the place (world, in the flash code etc) but just getting errors. I've done this before but cannot for the life of me remember how. Fool.

EDIT: solved that, but now I remember why I went for the DP dependent flashlight, the one from the tut is less smooth and realistic, and, in Fitzquake anyhow, has a weird yellow glow??
I'm using Fitzquake primarily now as my laptop struggles with DP in anything over 640x480.
User avatar
ajay
 
Posts: 559
Joined: Fri Oct 29, 2004 6:44 am
Location: Swindon, UK


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest