Raised This Month: $32 Target: $400
 8% 

Finding when a player is charging a CM5k shot?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 06-05-2017 , 06:41   Finding when a player is charging a CM5k shot?
Reply With Quote #1

To fix a bug in my plugin, I need to know when a player is currently firing a Cow Mangler 5000 shot.

I noticed that I can just look for them holding that weapon and having their m_flMaxspeed be a certain value, but this is not so great for me. I can make it work, but it has issues.

Does anyone know of a good way to check if a player is in this state?
CoolJosh3k is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 06-05-2017 , 07:02   Re: Finding when a player is charging a CM5k shot?
Reply With Quote #2

When you fire the cow mangler charged shot you are slowed with the TFCond_Slowed cond.
__________________
Pelipoika is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 06-05-2017 , 07:05   Re: Finding when a player is charging a CM5k shot?
Reply With Quote #3

Is that not used by other things too though? Mind, this would still fit just fine for me.

Edit: tested and that condition seems to do nothing.

Last edited by CoolJosh3k; 06-05-2017 at 07:13.
CoolJosh3k is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 06-05-2017 , 07:09   Re: Finding when a player is charging a CM5k shot?
Reply With Quote #4

Add a Soldier class check and make sure they're holding the cow mangler?

The slowed cond only applies when they're firing a charged shot, not a regular one.
__________________

Last edited by Pelipoika; 06-05-2017 at 07:17.
Pelipoika is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 06-05-2017 , 07:29   Re: Finding when a player is charging a CM5k shot?
Reply With Quote #5

I had tested using addcond and removecond.

Tested via some code (TF2_IsPlayerInCondition) and actually it does work. My bad!

Thanks for your help.

Last edited by CoolJosh3k; 06-05-2017 at 07:31. Reason: typos
CoolJosh3k is offline
Pelipoika
Veteran Member
Join Date: May 2012
Location: Inside
Old 06-05-2017 , 07:42   Re: Finding when a player is charging a CM5k shot?
Reply With Quote #6

You can install https://github.com/Pelipoika/The-unf...nditionlist.sp on your server so in the future it's easier to see what conds you have on right now (idk if it works on linux)

Edit:
Just updated it with complete condition list
__________________

Last edited by Pelipoika; 06-05-2017 at 07:49.
Pelipoika is offline
CoolJosh3k
AlliedModders Donor
Join Date: Mar 2010
Old 06-05-2017 , 08:05   Re: Finding when a player is charging a CM5k shot?
Reply With Quote #7

Thanks
CoolJosh3k is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:09.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode