Jump to content

Home

Turning Off Weapon Activation/Firing


DeadlyBOFH

Recommended Posts

Posted

How would i prevent someone from being able to shoot a weapon if they were in an emote position

 

Lets say they're in BOTH_SLEEP2

 

How would i make it so that they cant fire a weapon or turn on the saber?

Posted

bg_pmove.c :

PM_Weapon()

 

instead of :

if (pm->ps->weaponTime < 1 && (pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)))

 

add :

if (pm->ps->weaponTime < 1 && (pm->cmd.buttons & (BUTTON_ATTACK|BUTTON_ALT_ATTACK)) && ps->torsoAnim != BOTH_SLEEP2 )

 

 

should work...

  • 2 weeks later...
Posted

You could also just add to weaponTime when you go into the animation. But, that would only prevent weaponfire for that given amount of time.

 

For a perm no-attack, TCK's method would probably work best.

Archived

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

×
×
  • Create New...