Jump to content

Home

Effects


Dom_152

Recommended Posts

How do I get the client to display effects like a lightning effect from the server side. Also I am trying to get the disintegrate effect to work. So far I have this:

 

vec3_t temp = {0,0,0};

ent->health = 0;

G_Damage(ent, ent, ent, temp, temp, 9999, 0, MOD_TRIGGER_HURT);

ent->client->ps.eFlags |= EF_DISINTEGRATION;

ent->s.eFlags|= EF_DISINTEGRATION;

 

And it kills me and I can see sparks coming off me as if I were being disintegrated but the model just stays there and then disappears after a while. How do I get these effects working? Oh yeah and dismemberment how does that work?

Link to comment
Share on other sites

Thanks! Now I have this strange error. I just built my latest version and tried to join my server. I can connect but then it drops me saying:

 

ERROR: AS_ParseSets: Unable to find ambient soundset "city_outdoor"!

ERROR: AS_ParseSets: Unable to find ambient soundset "piston"!

ERROR ...2 missing sound sets! (see above)

 

baseJKA and JA+ still work so theres something wrong with my mod but I haven't touched any of the sound stuff so I don't know whats happening here.

 

EDIT: Fixed it. It was a bad PK3.

Link to comment
Share on other sites

OK I've been looking through cg_player and I want to add some client side visual effects. Now I'm getting a bit confused between cent and cg. Say I wanted it so that all players who were frozen had a particular shader applied to them. I've tried this:

if((cent->playerState->persistant[PERS_XSTATE] & X_FREEZE) && cg.snap->ps.clientNum != cent->currentState.number)
{	
	//legs.shaderRGBA[0] = 150;
	//legs.shaderRGBA[1] = 0;
	//legs.shaderRGBA[2] = 255;
	legs.renderfx |= RF_RGB_TINT;
	legs.customShader = cgs.media.electricBody2Shader;
}

 

But the only time the shader is applied is when I am frozen and the shader is applied to me. If I freeze someone else they stay the same. Can someone explain how this sort of client side stuff works and what exact cg is?

Link to comment
Share on other sites

OK so something like this:

 

if((cent->playerState->persistant[PERS_XSTATE] & X_FREEZE))

{

//Render entity with particular shader

}

 

Would that work as I want it to?

 

But then I've noticed that legs which is a refEntity is always used for changing what a player looks like. How do i know which centity this relates to :S

Link to comment
Share on other sites

OK so something like this:

 

if((cent->playerState->persistant[PERS_XSTATE] & X_FREEZE))

{

//Render entity with particular shader

}

 

Would that work as I want it to?

 

But then I've noticed that legs which is a refEntity is always used for changing what a player looks like. How do i know which centity this relates to :S

 

CG_Player( centity_t *cent )

 

if cg.snap->ps.clientNum != cent->currentState.number then if (cent->playerState->persistant[PERS_XSTATE] & X_FREEZE)

{

// render your shader w/legs refEnt

}

Link to comment
Share on other sites

Good idea. Thanks.

OK well I can get it to draw a shell around the player with the right shader and all but I can't get it to do it at the right time. Doing it as you suggested doesn't do anything at all. If you remove the cg bit it works but only on myself not on anyone else.

Link to comment
Share on other sites

There are some generic "play effect" commands that can be sent from the server side.

 

However, those are just generic non-player related effects like gun fire effects, sparks, etc. So I'm not sure you'd be able to play the disintigration effect that way since it uses more data to create the effect.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...