Search found 2918 matches

by Spike
Sun Nov 17, 2019 12:25 am
Forum: CSQC Programming
Topic: [SOLVED][FTE]Retrieve entity shader in CSQC
Replies: 6
Views: 2621

Re: [SOLVED][FTE]Retrieve entity shader in CSQC

you pasted it yourself, loadcustomskin's documentation specifies the accepted .skin file lines (ie: replace "surfacename" "replacementmaterial" one line per surface you want to override). Also, use those optional args (and give an empy skinfilename) to avoid using actual files, g...
by Spike
Sat Nov 16, 2019 4:35 pm
Forum: CSQC Programming
Topic: [SOLVED][FTE]Retrieve entity shader in CSQC
Replies: 6
Views: 2621

Re: [SOLVED][FTE]Retrieve entity shader in CSQC

pseudo code: if (ent.skin >= r_globalskin_first && ent.skin < r_globalskin_first+r_globalskin_count) material = findmaterialname_formatted("gfx/skin%d.lmp", ent.skin); else material = ent.model.surface[SURFACEID].material[bound(0, ent.skin, ent.model.maxskins-1)]; if (ent.customski...
by Spike
Wed Nov 06, 2019 11:37 pm
Forum: QuakeC Programming
Topic: Dealing with animation frames
Replies: 3
Views: 2356

Re: Dealing with animation frames

fte has a modelevents thing, which are basically id:string data stored at some offset into one of the animations of a model (like an iqm, but mdls can have framegroups too). you can then just animate your entity via framegroups and just poll for model events to keep your ai's state machine running. ...
by Spike
Fri Oct 04, 2019 8:55 pm
Forum: CSQC Programming
Topic: Creating images in FTE?
Replies: 8
Views: 2288

Re: Creating images in FTE?

the r_imageextensions cvar defines the image file extensions that the engine will search for, though you can have a pfm file with the .tga extension and it'll be loaded okay regardless of the 'wrong' extension. Or you can just be explicit about the file that you're trying to load. frag.machine: setv...
by Spike
Thu Oct 03, 2019 8:15 pm
Forum: CSQC Programming
Topic: Creating images in FTE?
Replies: 8
Views: 2288

Re: Creating images in FTE?

Yeah, fte can load pfm files as textures if needed (its not an extension that will be scanned for though).
If you're going to keep changing them then it may indeed be better to just use r_uploadimage on account of it working even if the image is already loaded.
by Spike
Thu Oct 03, 2019 7:42 am
Forum: CSQC Programming
Topic: Creating images in FTE?
Replies: 8
Views: 2288

Re: Creating images in FTE?

untested as always: float f = fopen("file.pfm", FILE_WRITE); if (f >= 0) { fputs(f, "PF\n", ftos(image_width), " ", ftos(image_height), "\n-1\n"); //magic, dimensions, endiannessandscale fwrite(f, image_data, sizeof(vector)*image_width*image_height); fclose(f)...
by Spike
Fri Sep 13, 2019 4:17 pm
Forum: Engine Programming
Topic: [SOLVED][FTE]Is #CLIENTONLY define really works?
Replies: 11
Views: 3856

Re: [SOLVED][FTE]Is #CLIENTONLY define really works?

You're only allowed to throw stuff at the screen during CSQC_UpdateView or CSQC_UpdateViewLoading calls. If you're trying to draw within the callstack of any other entry point then you'll get those sorts of errors. As a special exception, drawing to render targets is permitted elsewhere (as the resu...
by Spike
Mon Sep 02, 2019 6:40 pm
Forum: QuakeC Programming
Topic: multi_manager in Quake
Replies: 7
Views: 2163

Re: multi_manager in Quake

so use that then.

the code I typed was from memory. My memory sucks, but it should point you in the right direction.
by Spike
Sun Sep 01, 2019 10:45 pm
Forum: QuakeC Programming
Topic: multi_manager in Quake
Replies: 7
Views: 2163

Re: multi_manager in Quake

float numargs = tokenizebyseparator("example1,example2,example3", ","); for(float f=0; f < numargs; f++) SUB_UseTargets(argv(f)); would allow you to call the various triggers. you could use "target1,delay1,target2,delay2" pairs instead if you wanted. obviously this won...
by Spike
Fri Aug 16, 2019 9:09 pm
Forum: Project Showcase
Topic: [FTEQW][WIP]FTE Ragdoll
Replies: 6
Views: 1617

Re: [FTEQW][WIP]FTE Ragdoll

if you want to play animations on a model, using ragdoll physics on some of its bodies: set the individual body properties with animate 0. if (!e.animskel) e.animskel = skel_create(e.modelindex); //for lerped animations. if (!e.skeletonindex) e.skeletonindex = skel_create(e.modelindex); //for ragdol...
by Spike
Fri Jul 26, 2019 3:14 am
Forum: General Discussion
Topic: FTEQW default dir
Replies: 29
Views: 9001

Re: FTEQW default dir

at some point the cygwin and mingw codebases moved apart, such that a single gcc binary can no longer target either. cygwin's gcc (which the makefile is falling back on) now supports ONLY cygwin as a target along with the dependencies etc that come with it. mingw has its own separate gcc binary whic...
by Spike
Mon Jul 22, 2019 12:11 am
Forum: General Discussion
Topic: FTEQW default dir
Replies: 29
Views: 9001

Re: FTEQW default dir

to (cross) compile fte for native windows from cygwin, msys, or from linux: *change directory to the engine subdir* make makelibs FTE_TARGET=win64 -j8 #this downloads+compiles third-party dependancies as static libraries *msys workaround: hack the zlib makefile to remove its windows-specific error, ...
by Spike
Sun Jul 21, 2019 5:02 am
Forum: General Discussion
Topic: FTEQW default dir
Replies: 29
Views: 9001

Re: FTEQW default dir

if you want dynamic ents then set r_ignoreentpvs to 0. that tweak tells the client that it can actually trust the pvs of various entities and thereby draw only the ents inside the skyroom for the skyroom, without drawing ents that should not be visible. note that the cvar tweak will show any glitche...
by Spike
Tue Jul 02, 2019 10:54 pm
Forum: OpenGL Programming
Topic: Are stencil shadows still usable in FTE?
Replies: 4
Views: 3001

Re: Are stencil shadows still usable in FTE?

it needs a stencil buffer to be able to use stencil shadows.
this is generally the first thing that gets disabled when context creation would otherwise fail, as its often mutually exclusive with 16bit or 32bit depth buffers, depending on the driver.
by Spike
Tue Jul 02, 2019 9:51 pm
Forum: QuakeC Programming
Topic: The quick brown dog jumped over the lazy corpse...
Replies: 6
Views: 1988

Re: The quick brown dog jumped over the lazy corpse...

try .hitcontentsmaski if you want to be explicit about the types of volumes with which an entity can collide with, be that regular solids, playerclip, monsterclip, bodies (read: normal bbox ents), or corpses.