Raised This Month: $51 Target: $400
 12% 

FF2 Slowing down boss max speed for a rage?


Post New Thread Reply   
 
Thread Tools Display Modes
VoiDeD
AlliedModders Donor
Join Date: Mar 2009
Location: Illinois, USA
Old 12-07-2014 , 15:37   Re: Slowing down boss max speed for a rage?
Reply With Quote #11

Not to mention that client's switching weapons tends to reset m_flMaxspeed.
__________________
VoiDeD is offline
Chdata
Veteran Member
Join Date: Aug 2012
Location: Computer Chair, Illinois
Old 12-07-2014 , 16:55   Re: Slowing down boss max speed for a rage?
Reply With Quote #12

Does m_flMaxspeed stick as long as they don't switch weapons?

I always thought it gets reset at some unknown interval of time.
__________________
Chdata is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 12-08-2014 , 12:03   Re: Slowing down boss max speed for a rage?
Reply With Quote #13

Sorry, just to explain my perspective...most of the people here asking for coding advice are probably going to make public hales. They're effectively in the same situation as me because I'm not a server operator. While there may be better options than m_flMaxspeed, it's what FF2 uses, and it trumps any other option whenever it's set. So if your goal is to create a public hale like Fast Zombie or Grey Alien, and you want to bypass FF2's use of m_flMaxspeed, you must use it yourself. There's no other way...and it's far too late now to transition from m_flMaxspeed to something else in the 1.X branch, IMO.

Chdata:
m_flMaxspeed is recalculated by two conditions I'm aware of:
- Changing weapons
- A user's m_nWaterLevel set to 3 (artificially or by the game)

But since FF2 calls it several times per second, it's rarely an issue. (and someone won't spam mouse wheel purposely as hale, it'll make them slower)
__________________

Last edited by sarysa; 12-08-2014 at 12:06.
sarysa is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 12-09-2014 , 06:32   Re: Slowing down boss max speed for a rage?
Reply With Quote #14

The way i do it is transparent to the mechanic, and if tf2att fails, it reverts to maxspeed.

You pass a speed value like 350 and it is converted to the ratio for that class.
An override perameter will set the speed if it is present, and there is a native for that.
The ff2 devs would just need to add this.

If i call ff2_setbossspeed(0, 350)
The boss will get 350 speed, be tf2 attributes installed or not, or i can enter negative value to reset it to default speed.

You really cant go wrong here. Just if tf2att is installed, it works much smoother and minigun/hunstman hales dont run around crazy fast when deployed, and there are no odd errors.
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 12-09-2014 at 06:37.
friagram is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 01-13-2015 , 21:40   Re: Slowing down boss max speed for a rage?
Reply With Quote #15

@sarysa, Shadow, etc: I've finally gotten around to implementing a stop-gap solution for this. There are now two new config options: "disable_health_override" and "disable_speed_override". DHO will prevent OnGetMaxHealth from being hooked while DSO will prevent FF2 from setting the maxspeed every 0.2 seconds. What this means is that if you set DHO to 1, you will also need to manually apply the boss's health (including the starting health when the round starts, or else the boss may have 0 health!). I'm honestly not too sure if you'll need to call "fl_maxspeed" yourself constantly, but based on friagram's comments, it seems so.

This solution is obviously undesirable, so...would it be more beneficial for me to add support for formulas in configs for 1.10.4 than wait until 2.0.0?


Actually, as I've been writing this, I've decided that formulas might as well be supported in 1.10.4. So I guess don't use DSO/DHO since they'll probably disappear before 1.10.4 is even released.
__________________
~Wliu
Wliu is offline
Reply



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 09:53.


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