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
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
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
--
[ 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
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
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
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
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
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:
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
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
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
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
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
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,
//
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)
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
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;//
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)
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 _
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:
21 matches
Mail list logo