[hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread HoundDawg
Hi, does anyone know if and how we can detect the client's video mode from the server side, like via a Metamod plugin utilizing the HL SDK? We would like to know if the client is in software mode or 3D mode. Thanks in advance! HoundDawg United Admins - Game Server Admin Association

Re: [hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread botman
Hi, does anyone know if and how we can detect the client's video mode from the server side, like via a Metamod plugin utilizing the HL SDK? We would like to know if the client is in software mode or 3D mode. I haven't checked these out, but there's a vid_describemode CVAR that might do

Re: [hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread botman
Hi, does anyone know if and how we can detect the client's video mode from the server side, like via a Metamod plugin utilizing the HL SDK? We would like to know if the client is in software mode or 3D mode. Thanks in advance! These seem to be stored in the Windows Registry

Re: [hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread Nathan Taylor
-- [ Picked text/plain from multipart/alternative ] Correct me if I am wrong, but wouldn't such a thing trigger firewalls or the sort, it's quite dangerous to allow registry path data to be sent off to the host computer... - Original Message - From: botman Sent: Monday, May 06, 2002

Re: [hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread botman
Correct me if I am wrong, but wouldn't such a thing trigger firewalls or the sort, it's quite dangerous to allow registry path data to be sent off to the host computer... That depends on the firewall, how it's configured and which application is the one sending the data. If you had something

Re: [hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread botman
Just be glad that the Half-Life engine doesn't include any browser type feature that allows servers to download code and run it on the client (that's assuming that Valve has plugged all the buffer overflow problems in the engine network code)! :) Oh, wait a minute. Actually I guess with

Re: [hlcoders] deleting animation

2002-05-06 Thread MiK
yes i've done it, i have another player model without any animations, and i've delete all the reference to pev-sequence in the ACT_ etc... but when i take damage, it return an error in the SV_SetupBones function... (i'm not that it's the exact name). I've looked this function but it looks to only

[hlcoders] string to #define

2002-05-06 Thread Mugsy _
This is more general C++, but its for a HL mod so.. If I have a string, is there a way to convert it to integer with a previously enumerated value? eg, #define WEAPON_GARAND 2 then if I read in a string, and it happens to be WEAPON_GARAND can I know that that symbol is defined as 2? Obviously

Re: [hlcoders] string to #define

2002-05-06 Thread Mugsy _
It doesnt have to be a define, it can be an enumerated variable. ( since #define names would probably be tossed in a compiled version ) enum { WEAPON_GARAND = 2 }; From: Mugsy _ [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: [hlcoders] string to #define Date:

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
The pre-processors scan through source files replacing the define with the value. I'm not 100% sure, but about 95% that it looks in strings as well, so someFuncThatTakesAString(WEAPON_GARAND); will get changed to someFuncThatTakesAString(2); //constant string 2\0 before its compiled. david

RE: [hlcoders] string to #define

2002-05-06 Thread Leon Hartwig
I'm sure it depends on which preprocessor is being used, but I doubt most modern ones do this. -Original Message- From: Dynerman David M [mailto:[EMAIL PROTECTED]] Sent: Monday, May 06, 2002 7:35 PM To: [EMAIL PROTECTED] Subject: RE: [hlcoders] string to #define The

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
Well they say when you're not sure try..so I did and Leon's right (at least with VC++) I'm not sure where I saw/read that it would scan quotes, but the define didn't work for me (it would just print out WEAPON_GARAND instead of 2) Looks like we're stuck defining string literals or numbers, but

Re: [hlcoders] string to #define

2002-05-06 Thread Marcelo de Paula Bezerra
I believe it won't work. This works about the same as #define WEAPON_GARAND 2, you can't do things like array[WEAPON_GARAND]. Unfortunataly, the long if else block looks like the way to go. On Mon, 2002-05-06 at 23:20, Mugsy _ wrote: It doesnt have to be a define, it can be an enumerated

RE: [hlcoders] string to #define

2002-05-06 Thread Dynerman David M
That wasn't the question Marcelo, what I thought (and was wrong) was that the pre-processor would search inside for the #defines, so in your case if I was right it would try to index array[2], which obviously wouldn't work. david -Original Message- From: Marcelo de Paula Bezerra

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
hmm a possible idea could be a string table maybe an array of string/code structs, like typedef struct { char cStringId[256]; int iId; }weaponchar_id_t; then you could perhaps have like weaponchar_id_t WeaponCodes[] = { { WEAPON_GARAND,2 }, { WEAPON_1911, 1}, NULL, //

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
macros dont work in string blocks, at least not in MSVC - Original Message - From: Dynerman David M [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, May 06, 2002 11:20 PM Subject: RE: [hlcoders] string to #define That wasn't the question Marcelo, what I thought (and was wrong)

Re: [hlcoders] string to #define

2002-05-06 Thread Mugsy _
Yeah I thought about that but I think it ends up with a lot of string compares. The particular method I am thinking of ( I might be remembering some magical C++ dream I had ) acutally involved converting a string into a variable name directly. But I'm most likely on crack. From: Josh Coyne

Re: [hlcoders] string to #define

2002-05-06 Thread Josh Coyne
well with the string array you could just do like char *cGetStringForId(int iId) { weaponchar_id_t *comp_block; int num = 0; while((comp_block = WeaponCodes[num++]) != NULL) { if(comp_block-iId == iId) return comp_block-cStringId; } return NULL;//

Re: [hlcoders] string to #define

2002-05-06 Thread Mugsy _
I need to go the other way, from string to int. From: Josh Coyne [EMAIL PROTECTED] Reply-To: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: [hlcoders] string to #define Date: Mon, 6 May 2002 23:52:26 -0400 well with the string array you could just do like char *cGetStringForId(int iId)

Re: [hlcoders] string to #define

2002-05-06 Thread Oskar 'Zoot' Lindgren
atoi()? - Original Message - From: Dynerman David M [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 07, 2002 6:29 AM Subject: RE: [hlcoders] string to #define What about the engine functions MAKE_STRING() and STRING()? david -Original Message- From: Mugsy _

Re: [hlcoders] Detecting Client Video Mode from Server

2002-05-06 Thread HoundDawg
Thank you everyone for answering so quickly. We did find a way and it really wasn't any of these, go figure. ;-) Actually, it was sort of close to botman's first reply. HoundDawg United Admins - Game Server Admin Association http://www.unitedadmins.com - Original Message - From: