Jump to content

Home

[code] Adding a New Barrel for Weapons


recombinant

Recommended Posts

If I want to add a barrel (at the request of the weapon modeler I'm working with) to a weapon that currently does not have one (in this case WP_THERMAL), do I just need to add it in CG_RegisterWeapon (in cg_weaponinit.c)?

 

Are there other areas which I'll need to pay attention to the new barrel as far as animating is concerned, or will the engine just deal with it once I've added it in CG_RegisterWeapon?

 

Thanks!

 

:D

Link to comment
Share on other sites

If you're talking about the 1st person barrel, just copying your new md3 file over the thermal.md3 file should be the easiest way.

 

In terms of animating it, if you want it to spin or something, you'll have to touch up some unused code in there.

Link to comment
Share on other sites

Which, in this case, isn't going to be that big of a problem since I'm not changing the behavior of the thermal...

 

Salv just wants to add some better animation from the players perspective, so I think I'm good to go here.

 

Thanks for the help!

 

:D

Link to comment
Share on other sites

Well, all the animations are controlled server side, but you could do a client side hack to make the animation for thermal tossing be something else. I wouldn't totally recommend that thou as the length of the toss animation probably isn't the same as the replacement animation.

 

As such, you'd probably have a problem with the player freezeing at the end of the animation, not finishing the animation, or partially repeating ithe animation before ending. To fix that sort of problem you'd have to make some changes to the PM code.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...