Jump to content

Home

JK2 Animation Thread


razorace

Recommended Posts

Posted
Originally posted by Primesghost

When you think about it, it makes a lot of sense that way actually. You wouldn't want a player to be able to perform a bunch of keypress combos and be able to just sit back and watch his character fight would you? Or go the other way with it, during a saber fight a player may make several button presses per second, woudn't it suck if the game cached them all and made you watch while they played out?

 

True, but it makes multiple-button-press moves harder to do. If you have a millisecond buffer it allows players to be non-prefect with their button presses. Without a buffer, you MUST press all the keys at the exact same time to execute the move. This means you should hold down the buttons for a certian move (until it executes) instead of just tapping the buttons.

  • Replies 117
  • Created
  • Last Reply
Posted

What I meant was that the PM_ utility functions only get called from the bg_ files (Both Game) and there's only one instance of a PM_ function getting called in a g_ file (Game).

Posted

There's a thought. Without a input buffer, multiple key stroke moves aren't possible such as double tapping Jump, etc. Is that true for current JK2 gameplay?

Posted

What about inversion animations (like the back flip and wall walk)? Does the model physically flip (rebound/collision box included) or is it all visual? If so, is it the torso or leg animation that causes the flip?

Posted

You have double tap jump against a wall to do a wall flip.

 

The flipping is an animation I think, and the bounding boxes probably stay the same.

 

And its a BOTH animation rather than just a LEG or aTORSO anim.

Posted
Originally posted by NickR

The flipping is an animation I think, and the bounding boxes probably stay the same.

 

 

wrong the bounding boxes changes.

Posted

the bounding boxes are just stupid simple boxes.

defined with your origin and view angles.

so if a player is turned to 45° from the level y axis he is easier to hit !

 

i think someone in the quake world forum did an octogonal bounding box, and an other dude did a model hit detection but it used too much the cpu.

 

look at the bg_pmove.c

and check the mins and maxs.

Posted

There's some critical information about animations posted on page one. It would be nice to have the thread where people can actually find and use this information. :)

  • 2 weeks later...
Posted

Ok maybe I'm just a lot slower and stupider then you guys but I am still not in understanding...

 

Lets say that I want to call the animation BOTH_HOP_B

 

So The call is:

PM_SetAnim(SETANIM_BOTH, BOTH_HOP_B, SETANIM_FLAG_OVERRIDE, 0);

 

 

And assuming that I want this animation to be activated through a command, where do I put this call statement

Posted

Ok the in g_cmds.c there is this under loveandpeace:

 

else if (Q_stricmp(cmd, "loveandpeace") == 0 && CheatsOk( ent ))
{
	trace_t tr;
	vec3_t fPos;

	AngleVectors(ent->client->ps.viewangles, fPos, 0, 0);

	fPos[0] = ent->client->ps.origin[0] + fPos[0]*40;
	fPos[1] = ent->client->ps.origin[1] + fPos[1]*40;
	fPos[2] = ent->client->ps.origin[2] + fPos[2]*40;

	trap_Trace(&tr, ent->client->ps.origin, 0, 0, fPos, ent->s.number, ent->clipmask);

	if (tr.entityNum < MAX_CLIENTS && tr.entityNum != ent->s.number)
	{
		gentity_t *other = &g_entities[tr.entityNum];

		if (other && other->inuse && other->client)
		{
			vec3_t entDir;
			vec3_t otherDir;
			vec3_t entAngles;
			vec3_t otherAngles;

			if (ent->client->ps.weapon == WP_SABER && !ent->client->ps.saberHolstered)
			{
				Cmd_ToggleSaber_f(ent);
			}

			if (other->client->ps.weapon == WP_SABER && !other->client->ps.saberHolstered)
			{
				Cmd_ToggleSaber_f(other);
			}

			if ((ent->client->ps.weapon != WP_SABER || ent->client->ps.saberHolstered) &&
				(other->client->ps.weapon != WP_SABER || other->client->ps.saberHolstered))
			{
				VectorSubtract( other->client->ps.origin, ent->client->ps.origin, otherDir );
				VectorCopy( ent->client->ps.viewangles, entAngles );
				entAngles[YAW] = vectoyaw( otherDir );
				SetClientViewAngle( ent, entAngles );

				StandardSetBodyAnim(ent, BOTH_KISSER1LOOP, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS);
				ent->client->ps.saberMove = LS_NONE;
				ent->client->ps.saberBlocked = 0;
				ent->client->ps.saberBlocking = 0;

				VectorSubtract( ent->client->ps.origin, other->client->ps.origin, entDir );
				VectorCopy( other->client->ps.viewangles, otherAngles );
				otherAngles[YAW] = vectoyaw( entDir );
				SetClientViewAngle( other, otherAngles );

				StandardSetBodyAnim(other, BOTH_KISSEE1LOOP, SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS);
				other->client->ps.saberMove = LS_NONE;
				other->client->ps.saberBlocked = 0;
				other->client->ps.saberBlocking = 0;
			}
		}
	}
}

 

So what does this have to do with calling the following code:

 

PM_SetAnim(SETANIM_BOTH, BOTH_HOP_B, SETANIM_FLAG_OVERRIDE, 0); 

Posted

PM_ functions are only avialable in bg_ files

 

if you have had a look at the code you posted you should have seen this function call:

 

StandardSetBodyAnim
(other,BOTH_KISSEE1LOOP,SETANIM_FLAG_OVERRIDE
|SETANIM_FLAG_HOLD|SETANIM_FLAG_HOLDLESS);

 

 

Can you imagine for what it is?

 

 

And if you want to have a look at the function in which the code is. you'd nearly know all of your question

Archived

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

×
×
  • Create New...