Search found 83 matches

by daemon
Tue Apr 15, 2008 5:12 am
Forum: QuakeC Programming
Topic: Coding a scripting language in QC
Replies: 17
Views: 6495

you could use tokenize to find your first word or command, then strlen it to figure out where to begin your substring for the rest if necessary

even tokenizebyseperator might be useful depending on what you want to do
by daemon
Mon Apr 14, 2008 10:38 pm
Forum: QuakeC Programming
Topic: Coding a scripting language in QC
Replies: 17
Views: 6495

i did this sort of thing in feral flesh. also made their menus/quests scriptable. everything editable in-game.

my only complaint is that I can't delete files that i no longer wish to use unless i do it manually... :P
by daemon
Mon Apr 14, 2008 10:33 pm
Forum: QuakeC Programming
Topic: Model attachments?
Replies: 15
Views: 5489

an alternative that i've been messing with is to load up your player model in QME and map the offset and angles of where the weapon would be for each frame straight into qc. tedious, but you don't have to animate your weapons. you'll also have to give the weapon an avelocity to interpolate it if you ...
by daemon
Mon Apr 14, 2008 10:11 pm
Forum: QuakeC Programming
Topic: CSQC
Replies: 5
Views: 2351

Darkplaces... it works, but it seems like if I don't call it first thing in the ent's SendEntity function, then return before sending anything, it won't actually remove from the client until another shared ent is created.
by daemon
Tue Mar 25, 2008 5:10 pm
Forum: QuakeC Programming
Topic: Shared entities CSQC
Replies: 14
Views: 4478

as far as I know, in darkplaces models have to be precached on the server at least a few ticks before you use them in csqc. otherwise i've never needed to precache in csqc. not to say that won't change in the future...
by daemon
Sun Mar 23, 2008 7:44 am
Forum: QuakeC Programming
Topic: CSQC
Replies: 5
Views: 2351

does CSQC_Ent_Remove work correctly? seems like it only works sometimes...
by daemon
Sun Mar 23, 2008 3:04 am
Forum: QuakeC Programming
Topic: vector math, combining angles and offsets
Replies: 2
Views: 1497

well.. here's the working copy if anyone is interested. Thanks to KrimZon for help with combining angles. I don't understand why I had to subtract v_right, but that's the only way I could get it to work correctly.

void UpdateDamagePoint(entity wep) =
{
local vector ang, wep_pos, dmg_ang;

ang ...
by daemon
Sun Mar 23, 2008 12:21 am
Forum: QuakeC Programming
Topic: vector math, combining angles and offsets
Replies: 2
Views: 1497

ok, ignore that post above. here is the updated code for the weapon position ONLY:

pivot_ofs = '0 0 16';
pivotpoint = self.origin + pivot_ofs;
wep_targorg = wep.targorigin - pivot_ofs;
self_ang = self.angles;

ang = self_ang + vectoangles(wep_targorg);
ang_x = -ang_x;
makevectors(ang);
wep ...
by daemon
Sat Mar 22, 2008 5:18 pm
Forum: QuakeC Programming
Topic: vector math, combining angles and offsets
Replies: 2
Views: 1497

vector math, combining angles and offsets

I'm trying to locate the position of a weapon blade in the world based on a few angles and offsets.

I have:

self - (the player)
wep.targorigin - (the origin the weapon in the player's hand is moving toward)

wep is an attachment on the player, so it's origin is relative.
in order to find it's ...
by daemon
Sat Feb 02, 2008 4:41 pm
Forum: QuakeC Programming
Topic: new menu via .menu files
Replies: 9
Views: 3896

i don't recommend using cl_prydoncursor in csqc menus. it's only purpose would be to show where the mouse is located, and it's movement is different than what csqc's getmousepos() returns. just drawpic a cursor image where it should be in csqc.
by daemon
Tue Jan 01, 2008 3:56 am
Forum: General Discussion
Topic: 2008!
Replies: 13
Views: 3043

Good resolutions? I only have bad resolutions.
by daemon
Mon Dec 31, 2007 3:12 am
Forum: QuakeC Programming
Topic: cs_project in csqc
Replies: 17
Views: 7202

YAY! I finally got it to work. It was as simple as I thought it was supposed to be. This code works a LOT better (the first two lines are just there because a lot of the HUD stuff messes with the origin and angle settings, so I needed to make them match the camera)

R_SetView(VF_ANGLES, '0 -90 0 ...
by daemon
Mon Dec 31, 2007 2:29 am
Forum: QuakeC Programming
Topic: cs_project in csqc
Replies: 17
Views: 7202

Ok, I THINK the 90 degrees off thing is because I had this:

R_SetView(VF_ANGLES, '0 0 0');

before the previous code... but changing it to '0 -90 0' seems to mess things up even after getting rid of the x and y swap... guess I'll have to mess around with this more.
by daemon
Sun Dec 30, 2007 2:54 am
Forum: QuakeC Programming
Topic: cs_project in csqc
Replies: 17
Views: 7202

cs_project in csqc

can someone explain the ins and outs of cs_project to me? I finally got cs_unproject to do what I want, though I don't fully understand it yet. It's been explained to me a couple different ways, and I'm sure I'm not using it totally correct. One odd thing about it is that the results end up as ...
by daemon
Tue Dec 18, 2007 4:48 am
Forum: QuakeC Programming
Topic: duplicating prydoncursor's cursor_trace_endpos in csqc
Replies: 2
Views: 1854

Can you give a small example of how unproject is used. I can't seem to get any results that make any sense.