   is anyone familary with Q3 SDK?  could you explain what the refEntityType_t means ?
  thanks in advance..
  Well, I'm not familliar with the Q3 SDK (or any engine, for that matter) but I won't let that stop me.According to the source, a refEntityType_t is an enum type and is defined like so...typedef enum {RT_MODEL,RT_POLY,RT_SPRITE,RT_BEAM,RT_RAIL_CORE,RT_RAIL_RINGS,RT_LIGHTNING,RT_PORTALSURFACE,// doesn't draw anything, just info for portalsRT_MAX_REF_ENTITY_TYPE} refEntityType_t;Basically, it's a way to have a human-readable "variable" that can only hold the values you define. Enum "values", although human-readable, are actually integers. RT_MODEL's value is 0 (zero), because it wasn't specified when it was typedef-ed. RT_MODEL, being the next in line, has a value of 1 (one). That continues on up to RT_MAX_REF_ENTITY_TYPE, which has a value of 8 (eight).Taking the refEntityType_t as an example:We could define a variable of refEntityType_t...refEntityType_t myEntityType = RT_SPRITE;We could use that type like so...std::string GetFriendlyEntityTypeMessage(refEntityType_t refType){  switch (refType)  {  case RT_MODEL:return "I'm a model. Am I pretty?";break;  case RT_POLY:return "I'm a polly. I have many different sides.";break;  case RT_SPRITE:return "I'm a sprite. Wee!";break;  case RT_BEAM:return "I'm a beam. Can I come up, Scotty?";break;  case RT_RAIL_CORE:return "I'm a rail core. I'm sure I'm a sub-genre of metal.";break;  case RT_RAIL_RINGS:return "I'm rail rings. If you have me, go see a doctor.";break;  case RT_LIGHTNING:return "I'm lightning. I hate golfers.";break;  case RT_PORTALSURFACE:return "I'm a portal surface. I can have an orange or blue color.";break;  case RT_MAX_REF_ENTITY_TYPE:return "I'm a max ref entity. I've got the highest number, that makes me better.";break;  default:return "I don't know what type I am. I must've bumped my head :(";}}std::string freindlyEntityMessage = GetFriendlyEntityTypeMessage(myEntityType);std::cout << freindlyEntityMessage.c_str() << std::endl;Obviously, that's a stupid example, but it should illustrate its use.As it relates to the engine, it appears to be used to identify what a certain entity is (model, poly, sprite, etc.).   ;  refEntityType_t tells the type of a refEntity_t struct, which is used to represent an entity on the client. This struct can be used by the client to predict what's going on on the server, without having to know the internals of the entity code (i.e. movement is interpolated). In Unreal-slang it's a "proxy".(I've never used Q3 for anything beyond reading the code, so take my explanation with a grain of salt :P)   ;  AverageMidget thank you rneckelmann   thank youi am learning Q3 souce code for MODi want to make a client event using localentity and shader.void CG_EveTest(entityState_t *es){  refEntity_t smoke;  memset( &smoke, 0, sizeof( smoke ) );smoke.reType = RT_LIGHTNING;smoke.customShader = cgs.media.smokePuffShader;VectorCopy( es->origin, arc.origin );trap_R_AddRefEntityToScene( &smoke);}but it does not work..i dont understand what the realationship between the shader with the reType.i know the reType is a render flag, could you give me some details about this?   ;  Let me just post some code from the "cg_effects.c" file, first.localEntity_t *CG_SmokePuff( const vec3_t p, const vec3_t vel,    float radius,   float r, float g, float b, float a,   float duration,   int startTime,   int fadeInTime,   int leFlags,   qhandle_t hShader ) {static intseed = 0x92;localEntity_t*le;refEntity_t*re;//int fadeInTime = startTime + duration / 2;le = CG_AllocLocalEntity();le->leFlags = leFlags;le->radius = radius;re = &le->refEntity;re->rotation = Q_random( &seed ) * 360;re->radius = radius;re->shaderTime = startTime / 1000.0f;le->leType = LE_MOVE_SCALE_FADE;le->startTime = startTime;le->fadeInTime = fadeInTime;le->endTime = startTime + duration;if ( fadeInTime > startTime ) {le->lifeRate = 1.0 / ( le->endTime - le->fadeInTime );}else {le->lifeRate = 1.0 / ( le->endTime - le->startTime );}le->color[0] = r;le->color[1] = g; le->color[2] = b;le->color[3] = a;le->pos.trType = TR_LINEAR;le->pos.trTime = startTime;VectorCopy( vel, le->pos.trDelta );VectorCopy( p, le->pos.trBase );VectorCopy( p, re->origin );re->customShader = hShader;// rage pro can't alpha fade, so use a different shaderif ( cgs.glconfig.hardwareType == GLHW_RAGEPRO ) {re->customShader = cgs.media.smokePuffRageProShader;re->shaderRGBA[0] = 0xff;re->shaderRGBA[1] = 0xff;re->shaderRGBA[2] = 0xff;re->shaderRGBA[3] = 0xff;} else {re->shaderRGBA[0] = le->color[0] * 0xff;re->shaderRGBA[1] = le->color[1] * 0xff;re->shaderRGBA[2] = le->color[2] * 0xff;re->shaderRGBA[3] = 0xff;}re->reType = RT_SPRITE;re->radius = le->radius;return le;}It probably doesn't help that I'm not familiar with this engine. I could also be way off not knowing what you're trying to accomplish.The code above is creating a localEntity_t* and a refEntity_t*, to create a "smoke puff" effect. Then they assign the refEntity_t* pointer with this line...re = &le->refEntity;Again, I don't know what you're trying to accomplish, but that code appears to be how the game engine is creating effects.If you go through the "cg_effects.c" file, there are other examples that use roughly the same approach.I wish I knew how to help more, but I really don't know how the engine is structured. I'm just guessing!   ;  AverageMidget AS you say,the answer is in the souce code itselfI should study the code more carefully.void CG_Test(vec3_t start,vec3_t end){localEntity_t* le=CG_MakeExplosion(start,end,cgs.media.dishFlashModel,cgs.media.smokePuffRageProShader,3000,qtrue);trap_R_AddRefEntityToScene(&le->refEntity);}the above code works well.My english is not good enough to explain my question clearly :)but your answer give me a lot of help.thanksby the way ,i have been looking for q3 mod forums,but i cant find one.