RE: [hlcoders] Entity existence check on client?

2002-01-24 Thread James Williams

> A cl_entity_t has a 'messagenum' field or somesuch that holds the index of
> the last recieved packet that entity was updated in. If the ent's
> messagenum
> != the player's messagenum (easy enough to get), the entity is
> 'invalid' and
> you can filter it out.
>
> I think that's it, anyway. If you need more, I'll dig around in source and
> find some of my code that uses it.

Well, I went and looked anyway. ;)

---

cl_entity_t *pPlayer = gEngfuncs.GetLocalPlayer();
if (!pPlayer || (gEngfuncs.GetMaxClients() <= 0) || (!gViewPort &&
gEngfuncs.pEventAPI)) return 1;

cl_entity_t *pEnt = gEngfuncs.GetEntityByIndex(i);
if (!pEnt) return 1;

if(pEnt->curstate.messagenum != pPlayer->curstate.messagenum) return;

---

That should do what you're looking for.

-James "Corvidae" Williams ([EMAIL PROTECTED])
Administrator, Wavelength Forums (http://www.planethalflife.com/wavelength)
Co-Leader / Coder, Underhive (http://www.underhive.com)

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




RE: [hlcoders] Entity existence check on client?

2002-01-24 Thread James Williams

> there. There's already info somewhere on the client system about
> whether an entity's alive or not, since the engine knows when to
> stop rendering it, but is there any way I can get to this or do I
> need to write my own?

A cl_entity_t has a 'messagenum' field or somesuch that holds the index of
the last recieved packet that entity was updated in. If the ent's messagenum
!= the player's messagenum (easy enough to get), the entity is 'invalid' and
you can filter it out.

I think that's it, anyway. If you need more, I'll dig around in source and
find some of my code that uses it.


-James "Corvidae" Williams ([EMAIL PROTECTED])
Administrator, Wavelength Forums (http://www.planethalflife.com/wavelength)
Co-Leader / Coder, Underhive (http://www.underhive.com)

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




[hlcoders] Entity existence check on client?

2002-01-24 Thread randomnine

egads... wrong list. reposted.

>How do I find out whether an entity, player or non-player, exists or not on the 
>client? The server knows, since disconnected players and removed entities simply 
>aren't there; the engine knows, because it stops calling StudioModelRenderer for 
>them; but how can I find out if an entity is valid in an HUD element?
>
>Basically, I want to be able to run through a list of all *existing* entities and 
>display targeters for them determined by those entities' user variables, as well as 
>being able to tell when a player's disconnected or a building's destroyed and not 
>worth aiming at. Things like this. It's a bit tricky, since as far as the client's 
>concerned once you've got an entity's number it stays there until overwritten with 
>another entity. If a player quits, they're still there. If a missile explodes, it's 
>still there. There's already info somewhere on the client system about whether an 
>entity's alive or not, since the engine knows when to stop rendering it, but is there 
>any way I can get to this or do I need to write my own?

-randomnine-


--
Get a free, personalised email address at http://another.com
TXT ALRT! Stop wasting money now. Send FREE, personalised txt
from http://another.com


RE: [hlcoders] Cbuf_AddText: overflow

2002-01-24 Thread Leon Hartwig

Too much unproccessed stuff already in the server's command buffer?  You
+exec'ing anything else on the command line or anything like that?


> -Original Message-
> From: Yacketta, Ronald [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, January 24, 2002 7:27 PM
> To: [EMAIL PROTECTED]
> Subject: [hlcoders] Cbuf_AddText: overflow
> 
> 
> I think this error is hidden deep within the engine, could 
> someone shed
> some light?
> 
> Cbuf_AddText: overflow
> 
> -Ron
> ___
> To unsubscribe, edit your list preferences, or view the list 
> archives, please visit:
> http://list.valvesoftware.com/mailman/listinfo/hlcoders
> 
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




[hlcoders] RE: Cbuf_AddText: overflow

2002-01-24 Thread Yacketta, Ronald

Also dug this up... Assembly means jack to me ;)

ALERT( at_console, "Executing dedicated server
config file\n" );
04EB5622  pushoffset string "Executing dedicated server
confi"... (4F76620h) 
04EB5627  push1
04EB5629  calldword ptr [g_engfuncs+0F4h (4FA4C04h)] 
04EB562F  add esp,8 
sprintf( szCommand, "exec %s\n", servercfgfile
);  <== is server.cfg
04EB5632  mov eax,dword ptr [servercfgfile] 
04EB5635  pusheax  
04EB5636  pushoffset string "exec %s\n" (4F76614h) 
04EB563B  lea ecx,[szCommand]
<== is server.cfg
04EB5641  pushecx  
04EB5642  call@ILT+13120(_sprintf) (4E33345h) 
04EB5647  add esp,0Ch 
SERVER_COMMAND( szCommand );
<== is server.cfg
04EB564A  lea eax,[szCommand] 
04EB5650  pusheax  
04EB5651  calldword ptr [g_engfuncs+9Ch (4FA4BACh)] 
04EB5657  add esp,4
< here is where the debugger stops
}
}

-Original Message-
From: Ronald J. Yacketta [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 24, 2002 11:07 PM
To: [EMAIL PROTECTED]
Subject: RE: Cbuf_AddText: overflow


Get this in the debugger

Unhandled exception at 0x77f61769 in hlds.exe: 0xC005: Access
violation writing location 0x00030ff8.

-Ron

-Original Message-
From: Ronald J. Yacketta [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 24, 2002 10:27 PM
To: [EMAIL PROTECTED]
Subject: Cbuf_AddText: overflow


I think this error is hidden deep within the engine, could someone shed
some light?

Cbuf_AddText: overflow

-Ron
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




[hlcoders] RE: Cbuf_AddText: overflow

2002-01-24 Thread Yacketta, Ronald

Get this in the debugger

Unhandled exception at 0x77f61769 in hlds.exe: 0xC005: Access
violation writing location 0x00030ff8.

-Ron

-Original Message-
From: Ronald J. Yacketta [mailto:[EMAIL PROTECTED]] 
Sent: Thursday, January 24, 2002 10:27 PM
To: [EMAIL PROTECTED]
Subject: Cbuf_AddText: overflow


I think this error is hidden deep within the engine, could someone shed
some light?

Cbuf_AddText: overflow

-Ron
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




[hlcoders] Cbuf_AddText: overflow

2002-01-24 Thread Yacketta, Ronald

I think this error is hidden deep within the engine, could someone shed
some light?

Cbuf_AddText: overflow

-Ron
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




Re: [hlcoders] (no subject)

2002-01-24 Thread [DRP]Avatar-X



What is the error you get?
Nathan Taylor wrote:
 I know HLCoders is not the place to ask but
thus has been bothering me for months. I made a model (player) and
exported and all that using the valve skeleton of Gordon deathmatch. 
After exporting I edited the .qc file and added animations as needed. 
However, whenever I try to run the .qc through studiomdl it goes fine until
it gets to the bone: Bip01 L Leg.  I have not edited the skeleton,
at all, all I have done is apply the vertices as needed. Can somebody
help me please (externally of HLCoders if need be)? -Thanks 

Lakario
ModDev.net
ICQ: 

Get more from the Web. FREE MSN Explorer download : http://explorer.msn.com

--
-
[DRP]Avatar-X
SillyZone Homepage: www.thesillyzone.com
SillyZone Forums: forum.thesillyzone.com
My Homepage: www.cyberwyre.com
 




RE: [hlcoders] Models and sequences

2002-01-24 Thread Eric Smith

I'm attaching some sample source code to expose the appropriate server
blending interface to the engine.

Like Adrian said, if you're doing custom player model blending on the
client, you need to mirror that blending on the server or your hitboxes will
not match.

-Eric

-Original Message-
From: Adrian Finol [mailto:[EMAIL PROTECTED]]
Sent: Thursday, January 24, 2002 9:57 AM
To: 'David Flor '; '[EMAIL PROTECTED] '
Subject: RE: [hlcoders] Models and sequences

 Same way you do on the client, but this time you apply your transformations
to the server side partners of the cliet StudioModelRenderer. It's all on
animation.cpp.

-Original Message-
From: David Flor
To: [EMAIL PROTECTED]
Sent: 1/24/02 8:40 AM
Subject: RE: [hlcoders] Models and sequences

You know, it never dawned on me that that could be the cause of some of
the hit detection issues in my mod. 

OK, so refresh my memory: how do I define the transformations on the
SERVER?

Tnx & Rgds...
David "Nighthawk" Flor ( [EMAIL PROTECTED] )
Lead Programmer, The Persistence Engine - http://www.persistengine.com/
Lead Programmer, "The Opera" - http://opera.redeemedsoft.com/
President, Mach III Enterprises

"When Alexander saw the breadth of his domain he wept for there were no
more worlds to conquer..."

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Adrian Finol
Sent: Wednesday, January 23, 2002 11:31 PM
To: Ken Birdwell; ''[EMAIL PROTECTED]' '
Subject: RE: [hlcoders] Models and sequences


 One thing to remember is that any transformation applied to the model
client side has to be duplicated on the server in order to mantain hit
detection in order.

 We had this problem with CS, where the client was doing all the
blendings ( 9 to be exact ) while the server had no idea about what was
going on. Hence the old CS hitbox problem.

___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



// common\r_studioint.h


// server blending
#define SV_BLENDING_INTERFACE_VERSION 1

typedef struct sv_blending_interface_s
{
int version;

void( *SV_StudioSetupBones )( struct model_s *pModel, 
float frame,
int sequence,
const vec3_t angles,
const vec3_t origin,
const byte *pcontroller,
const byte *pblending,
int iBone,
const edict_t *pEdict );
} sv_blending_interface_t;


// dlls\animation.cpp

#include "com_model.h"
#include "r_studioint.h"

void SV_StudioSetupBones( struct model_s *pModel, float frame, int sequence, const 
vec3_t angles, const vec3_t origin, const byte *pcontroller, const byte *pblending, 
int iBone, const edict_t *pEdict );

// The simple blending interface we'll pass back to the engine
sv_blending_interface_t svBlending = 
{
SV_BLENDING_INTERFACE_VERSION,
SV_StudioSetupBones
};

// Global engine <-> studio model code interface
server_studio_api_t IEngineStudio;

studiohdr_t *g_pstudiohdr;

float (*g_pRotationMatrix)[3][4];

float (*g_pBoneTransform)[MAXSTUDIOBONES][3][4];

/*

Server_GetBlendingInterface

Export this function for the engine to use the blending code to blend models

*/
#ifdef _WIN32

extern "C" int __declspec( dllexport ) Server_GetBlendingInterface( int version, 
struct sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, 
float (*rotationmatrix)[3][4], float (*bonetransform)[MAXSTUDIOBONES][3][4] )

#else

extern "C" int Server_GetBlendingInterface( int version, struct 
sv_blending_interface_s **ppinterface, struct engine_studio_api_s *pstudio, float 
(*rotationmatrix)[3][4], float (*bonetransform)[MAXSTUDIOBONES][3][4] )

#endif
{
if ( version != SV_BLENDING_INTERFACE_VERSION )
return 0;

// Point the engine to our callback
*ppinterface = &svBlending;

// Copy in engine helper functions
memcpy( &IEngineStudio, pstudio, sizeof( IEngineStudio ) );

g_pRotationMatrix = rotationmatrix;

g_pBoneTransform = bonetransform;

// Success
return 1;
}

.
.
.

// blending function used by the server to blend the models (for hitbox purposes)
void SV_StudioSetupBones( struct model_s *pModel, float frame, int sequence, const 
vec3_t angles, const vec3_t origin, const byte *pcontroller, const byte *pblending, 
int iBone, const edict_t *pEdict )
{
// your blending code

[hlcoders] (no subject)

2002-01-24 Thread Nathan Taylor
 I know HLCoders is not the place to ask but thus has been bothering me for months.     I made a model (player) and exported and all that using the valve skeleton of Gordon deathmatch.  After exporting I edited the .qc file and added animations as needed.  However, whenever I try to run the .qc through studiomdl it goes fine until it gets to the bone: Bip01 L Leg.  I have not edited the skeleton, at all, all I have done is apply the vertices as needed.   Can somebody help me please (externally of HLCoders if need be)?   -Thanks LakarioModDev.netICQ: Get more from the Web.  FREE MSN Explorer download : http://explorer.msn.com


RE: [hlcoders] Models and sequences

2002-01-24 Thread Adrian Finol

 Same way you do on the client, but this time you apply your transformations
to the server side partners of the cliet StudioModelRenderer. It's all on
animation.cpp.

-Original Message-
From: David Flor
To: [EMAIL PROTECTED]
Sent: 1/24/02 8:40 AM
Subject: RE: [hlcoders] Models and sequences

You know, it never dawned on me that that could be the cause of some of
the hit detection issues in my mod. 

OK, so refresh my memory: how do I define the transformations on the
SERVER?

Tnx & Rgds...
David "Nighthawk" Flor ( [EMAIL PROTECTED] )
Lead Programmer, The Persistence Engine - http://www.persistengine.com/
Lead Programmer, "The Opera" - http://opera.redeemedsoft.com/
President, Mach III Enterprises

"When Alexander saw the breadth of his domain he wept for there were no
more worlds to conquer..."

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Adrian Finol
Sent: Wednesday, January 23, 2002 11:31 PM
To: Ken Birdwell; ''[EMAIL PROTECTED]' '
Subject: RE: [hlcoders] Models and sequences


 One thing to remember is that any transformation applied to the model
client side has to be duplicated on the server in order to mantain hit
detection in order.

 We had this problem with CS, where the client was doing all the
blendings ( 9 to be exact ) while the server had no idea about what was
going on. Hence the old CS hitbox problem.

___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




RE: [hlcoders] Models and sequences

2002-01-24 Thread David Flor

You know, it never dawned on me that that could be the cause of some of
the hit detection issues in my mod. 

OK, so refresh my memory: how do I define the transformations on the
SERVER?

Tnx & Rgds...
David "Nighthawk" Flor ( [EMAIL PROTECTED] )
Lead Programmer, The Persistence Engine - http://www.persistengine.com/
Lead Programmer, "The Opera" - http://opera.redeemedsoft.com/
President, Mach III Enterprises

"When Alexander saw the breadth of his domain he wept for there were no
more worlds to conquer..."

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]] On Behalf Of Adrian Finol
Sent: Wednesday, January 23, 2002 11:31 PM
To: Ken Birdwell; ''[EMAIL PROTECTED]' '
Subject: RE: [hlcoders] Models and sequences


 One thing to remember is that any transformation applied to the model
client side has to be duplicated on the server in order to mantain hit
detection in order.

 We had this problem with CS, where the client was doing all the
blendings ( 9 to be exact ) while the server had no idea about what was
going on. Hence the old CS hitbox problem.

___
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders




Re: [hlcoders] new model skeletons

2002-01-24 Thread [DRP]Avatar-X



Check out the multiplayer model "CF" (cold fusion)
it's a 4-legged centaur with wings, and totally new animations, which
work fine in-game
-av
Neale Roberts wrote:

On
the couple of occasions that we've actually had a modeller working for
us, they've had to use a modified skeleton for one of our primary player
models, as it has goat-like (reversed) legs. Although the model wasn't
actually completed, the animations were perfectly ok with the modified
skeleton. Unfortunately, they wouldn't display properly in-game, although
I suspect that was down to me not writing the .qc file correctly 

- Original Message -

From:
Christopher
Long

To: [EMAIL PROTECTED]

Sent: Thursday, January 24, 2002 1:51
AM

Subject: [hlcoders] new model skeletons
 I haven't actually looked into this
yet so i can't really say i have had a go but i was just wondering what
is involved when changing a players skeleton to one that doesn't use the
standard default valve skeleton. Is any coding involved at all or should
it all be handled already properly, providing animation lists are adhered
to. This is the first
time i have actually thought about it so i have absolutely no clue about
it. Can someone clear it up and limitations on new skeletons and whats
involved in them? thanks
peoples.


--
-
[DRP]Avatar-X
SillyZone Homepage: www.thesillyzone.com
SillyZone Forums: forum.thesillyzone.com
My Homepage: www.cyberwyre.com
 




Re: [hlcoders] new model skeletons

2002-01-24 Thread Neale Roberts



On the couple of occasions that we've actually had 
a modeller working for us, they've had to use a modified skeleton for one of our 
primary player models, as it has goat-like (reversed) legs. Although the model 
wasn't actually completed, the animations were perfectly ok with the modified 
skeleton. Unfortunately, they wouldn't display properly in-game, although I 
suspect that was down to me not writing the .qc file correctly
 

  - Original Message - 
  From: 
  Christopher Long 
  To: [EMAIL PROTECTED] 
  
  Sent: Thursday, January 24, 2002 1:51 
  AM
  Subject: [hlcoders] new model 
  skeletons
  
  I haven't actually looked into this yet so i 
  can't really say i have had a go but i was just wondering what is involved 
  when changing a players skeleton to one that doesn't use the standard default 
  valve skeleton. Is any coding involved at all or should it all be handled 
  already properly, providing animation lists are adhered to.
   
  This is the first time i have actually thought 
  about it so i have absolutely no clue about it. Can someone clear it up and 
  limitations on new skeletons and whats involved in them?
   
  thanks 
peoples.