Jump to content

Home

Fists in MP


recombinant

Recommended Posts

I'm trying to get the SP cheat-enabled fists working in MP, and it's not working as well as I had hoped.

 

I've got the sounds and effects registered and they seem to work fine, however after changing the stun baton's model to point to the "noweap.glm" & "noweap..md3" files in bg_misc.c, it's not behaving the way I expected.

 

What other modifications should I perform? Is exchanging the stun baton and noweap models the incorrect way to go about doing this?

 

Any suggestions/help will be greatly appreciated.

 

Thanks in Advance!

 

:D

Link to comment
Share on other sites

Originally posted by MASTER Siggeman

whoa! i know it's off topic but are you saying you can use your fists in SP?????

 

sorry but i have to know one thing: HOW!?

 

As far as I know, you can holster your weapon (minus key by default), but not actually punch anything ;)

Link to comment
Share on other sites

Originally posted by MilesTeg

Hello :confused: Anyone played the DarkForces Mod SP Demo?

 

It´s a two months old level and if you push "1" you can use the fists....

And they make damage (well, not much, but it works) :D

 

We have complete control over the damage value (and the range), so we can adjust it to be more like the original DF....

 

...or even increase it for that matter.

 

hehe.

 

:D

Link to comment
Share on other sites

The way I've got it set up now is that anytime you select the fists, it switches to third-person (camera) view.

 

I got the third person animation working this morning, and Wudan's helping to do some research to see if it's possible to do "the ol' one-two" - alternating between right and left punches. ;)

 

Here are some screenies:

 

shot0002.jpg

 

shot0004.jpg

 

shot0005.jpg

 

 

The next step is to get the first person animation working...

Link to comment
Share on other sites

Originally posted by razorace

You could just have it randomly pick the left or right punch animation.

Sounds like an interesting idea to me, but (pardon my ignorance) where might I put that?

 

I just changed the WeaponAttackAnim value in bg_misc.c from WP_STUN_BATON to WP_MELEE2. Where would be the appropriate spot to control which animation gets used if I wanted to switch it back and forth, or, as you suggested, use a random animation?

Link to comment
Share on other sites

We've already gotten fists to that state. I'm quite happy with them. I even modified the obituary message so it says "LukeSkywalker learned the truth: MaceWindu is his daddy" when a player punches another player.

 

I don't have the swinging sound, though - do you have one, JediStone?

Link to comment
Share on other sites

I got the random fist swinging working last night (thanks for the assistance, razorace!). There's a little problem with the animation on the left swing, however - it stops when he gets deepest into the swing - and I have to devise a way to get him to return to his original stance after swinging the left arm (this quirk can be viewed in ModView by playing the BOTH_MELEE1 animation).

 

Wudan, I believe you said that you had a solution to the left swing problem - would you mind sharing that fix with me?

 

Now my turn to share: ;)

 

I don't have the swinging sound, though - do you have one, JediStone?

 

Yes - I've got a swinging sound working. I believe I'm currently using "sounds/melee/swing1.mp3" (though it might be fun to set up a random swing selector too, since there are four to choose from).

 

Here's my code from CG_RegisterWeapon() in cg_weaponinit.c, inside the "case WP_STUN_BATON:" section:

weaponInfo->flashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/swing1.mp3" );
weaponInfo->altFlashSound[0] = trap_S_RegisterSound( "sound/weapons/melee/swing1.mp3" );

 

:D

Link to comment
Share on other sites

Originally posted by razorace

Also, why is your Kyle in a low LOD?

 

Yeah, someone else brought that to my attention too. I bumped it up to High and it looks much better...

 

I honestly was just so busy with working with the functionality, that I wasn't paying attention! ;)

 

Additionally, my test directory with the latest media files from our FTP gets rebuilt weekly, so I'm constantly starting over with new settings all the time - it's possible that the .cfg i'm pulling down has low LOD set, or it's just coming up Low by default...

Link to comment
Share on other sites

Certainly, it was in bg_pmove.c, after the if(ATST) crap ends witn a } (ok, I looked it up, about line 3211 in stock JK2mp code), I added :

if(pm->ps->weapon != WP_SABER)
{
   PM_SetAnim(SETANIM_TORSO, ( WeaponReadyAnim[pm->ps->weapon] ), SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 50);
}

That appears to be how the SP code works as well.

 

If I am correct, the animation data for a player gets sent every frame anyway, so I'm not lagging anything with this code.

 

Why != WP_SABER? Because saber Weapon Anims are handled separately from the rest of the weapons.

 

Re: Fists - can we make it so that the player has to click to attack with fists? Then we could set timers to see how long between clicks, right? That could be used to set animations for attacking.

Link to comment
Share on other sites

Thanks for pointing me in the right direction...

 

My fix is similar, but not identical:

 

if ( ( pm->ps->weapon == WP_STUN_BATON ) && 
    ( pm->ps->weaponTime <= 0 || 
      pm->ps->weaponstate != WEAPON_FIRING )) {

 PM_SetAnim(SETANIM_TORSO, 
            BOTH_STAND6, 
            SETANIM_FLAG_OVERRIDE|SETANIM_FLAG_HOLD, 
            50);
}

 

...everything else I tried didn't work the way I wanted it to, but this works fine.

 

whew!

 

:D

Link to comment
Share on other sites

Originally posted by wudan

yeah, pretty much the same thing, but a little different - also in PM_Weapon ?

 

I think I might have thought of how to do a right left right punch ... but i dunno yet.

 

yes.. it's in PM_Weapon(), and later on in the code I perform the following to do the random fist action (with the original code surrounding it for context ;) ):

 

if (pm->ps->weapon == WP_DISRUPTOR && pm->ps->zoomMode == 1)
{
   PM_StartTorsoAnim( BOTH_ATTACK4 );
}
// jodfmod - fists: random animation BEGIN
else if (pm->ps->weapon == WP_STUN_BATON)
{
   iRandom = Q_irand(1,2);

   if ( iRandom == 1 ) 
   {	
       PM_StartTorsoAnim( BOTH_MELEE1 );
   }
   else
   {
       PM_StartTorsoAnim( BOTH_MELEE2 );
   }
}
// jodfmod - fists: random animation END
else
{
PM_StartTorsoAnim( WeaponAttackAnim[pm->ps->weapon] );
}

 

It's not perfect, but it's working pretty well now. Someone else had an interesting suggestion, which was to have one hand be standard fire, and the alt-fire be the other hand.

 

I thought that was a cool idea and may try to implement it. That way I could assign different damage values for each as well, or perhaps have random swings for primary fire, then do a right hook with more damage for alt-fire.

 

I want to work on something else for a while, I think so I'll back burner those ideas for a while, but it's an interesting suggestion.

 

:D

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...