Inventory middleware stuffs

Discuss programming in the QuakeC language.
Chris
Posts: 79
Joined: Sat Aug 05, 2006 5:31 am

Post by Chris »

This was broken due to 2 changes in DP (well at least one totally confirmed, the other Im not sure if it was changed or just worked out of blind luck).

One being the viewing of the inventory screen is controlled via an addstat, this passes the value of a float when it should be using an integer to represent whether the inventory is on or off, to fix this and press TAB (as it should) to view the inventory open up the file:

sv_main.qc

go to the line that says this:

Code: Select all

SV_AddStatFloat(36, 8, ToggleInventory);
and change it to this:

Code: Select all

SV_AddStatFloat(36, 2, ToggleInventory);
now compile the progs.dat and you should be able to toggle on and off the inventory as expected.

but alas! Another issue once fixing this is previously with DP required you to do your own math to figure out the mouse location correctly. This is in the client side QC. Right now if you compile and run it it should look like the mouse can never leave the bottom right quadrant of the screen, so lets fix that.

open up: CL_GenericCollision.qc located in QC_Source/client/cl_inventory/

find this function:

Code: Select all

vector() GetCursorPos =
{
	local vector pos, vid_size;
		
	vid_size_x = cvar("vid_conwidth");
	vid_size_y = cvar("vid_conheight");
			
	pos = vid_size*0.5 + getmousepos();
	
		return pos;
};
and replace it with this:

Code: Select all

vector() GetCursorPos =
{
	return getmousepos();
};
now compile the csprogs.dat and that should bring everything back up to speed for when I wrote this.

To compile the progs/csprogs requires of course your own qc compiler (I used fteqcc).

place one in the QC_Source directory and run it to compile the progs,

and do the same in the QC_Source/client/ directory and run it to compile the csprogs

good luck!
avirox
Posts: 137
Joined: Wed Aug 16, 2006 3:25 pm

Post by avirox »

My CSQC GUI project supports diablo-style inventory systems like so:
Image

Although I haven't done much to make it compatible with SSQC. Shouldn't be too hard.
WINGED_DOOM
Posts: 22
Joined: Tue Nov 30, 2010 10:29 am
Contact:

Post by WINGED_DOOM »

Thank you Chris! :3

Image

avirox wrote:My CSQC GUI project supports diablo-style inventory systems like so:


Although I haven't done much to make it compatible with SSQC. Shouldn't be too hard.
Yes, I already saw and test your inv ^__-
tyrael
Posts: 13
Joined: Tue Dec 14, 2010 9:32 am

Post by tyrael »

Chris! Can you release on inside3d your Quake C files of last part of Hunted, Stealer Guy and SHM?!
Nahuel
Posts: 495
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

WHY?? (Inventory stuff)

Post by Nahuel »

I am adapting this http://forums.inside3d.com/viewtopic.php?f=2&t=927inventory to v.1.06 qc and works very fine.... only in q3bsps... Can someone explain me why this inventory system doesn´ t work in q1bsps? PLEASE ! HELP ME!
hi, I am nahuel, I love quake and qc.
Spirit
Posts: 1065
Joined: Sat Nov 20, 2004 9:00 pm
Contact:

Re: Inventory middleware stuffs

Post by Spirit »

I moved above post into this thread after it was posted with the useless title "WHY?? (Inventory stuff)" as new thread.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Julius
Posts: 98
Joined: Sun Aug 29, 2010 4:32 pm
Contact:

Re: Inventory middleware stuffs

Post by Julius »

http://chrisjpage.com/?page_id=39

Maybe this works better?
Post Reply