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

FF2 A fix for the long-standing 40 second super jump glitch


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
sarysa
Senior Member
Join Date: Mar 2014
Old 05-18-2014 , 19:40   A fix for the long-standing 40 second super jump glitch
Reply With Quote #1

I was a fan of FF2 long before I started making my own bosses, and a no-raging tryhard at that. Though one thing that would make me rage (and not in-game) is a long-standing glitch where after a teleport boss is hale, the next super jump boss can't use their jump for up to 40 seconds. Here's an example below:



The way to reproduce this bug is easy on a test server, just log onto a server alone with bots, replace "headless" and "saxton" with respective teleport and super jump bosses that you have, and enter the following:
ff2_special saxton;ff2_addpoints YOURNAME 5000;sm_slay @red
(wait until round begins with you as saxton, do NOT kill yourself)
ff2_special horseless;ff2_addpoints YOURNAME 5000;sm_slay @red
(wait until round begins with bot as HHH)
ff2_special saxton;ff2_addpoints YOURNAME 5000;sm_slay @red

You should see a screen similar to mine. Now it is my lifelong passion to see this glitch eradicated from all FF2 servers, so I decided to dive deep into the depths of the FF2 codebase to find the source of this malady. And I fixed it in 5 minutes...which is kind of what I expected.

Look in default_abilities.sp for this function:
Code:
public Action:StartBossTimer(Handle:hTimer)
{
    for(new client=0; FF2_GetBossUserId(client)!=-1; client++)
    {
        if(FF2_HasAbility(client, this_plugin_name, "charge_teleport"))
        {
            FF2_SetBossCharge(client, FF2_GetAbilityArgument(client, this_plugin_name, "charge_teleport", 0, 1), -1.0*FF2_GetAbilityArgumentFloat(client, this_plugin_name, "charge_teleport", 2, 5.0));
        }
    }
}
...and change it to this:

Code:
public Action:StartBossTimer(Handle:hTimer)
{
    for(new client=0; FF2_GetBossUserId(client)!=-1; client++)
    {
        if(FF2_HasAbility(client, this_plugin_name, "charge_teleport"))
        {
            FF2_SetBossCharge(client, FF2_GetAbilityArgument(client, this_plugin_name, "charge_teleport", 0, 1), -1.0*FF2_GetAbilityArgumentFloat(client, this_plugin_name, "charge_teleport", 2, 5.0));
        }
        else if(FF2_HasAbility(client, this_plugin_name, "charge_bravejump"))
        {
            FF2_SetBossCharge(client, FF2_GetAbilityArgument(client, this_plugin_name, "charge_bravejump", 0, 1), -1.0*FF2_GetAbilityArgumentFloat(client, this_plugin_name, "charge_bravejump", 2, 5.0));
        }
    }
}
Tested and it works. It'll also have the wonderful side-effect of players not getting ambushed 3 seconds into the round on certain VSH maps. (like arakawa) If you actually -want- players to be able to ambush right away, simply change the FF2_SetBossCharge call to this:
FF2_SetBossCharge(client, FF2_GetAbilityArgument(client, this_plugin_name, "charge_bravejump", 0, 1), 0.0);

Finally, to actually compile default_abilities.sp, run the following commands from the addons/sourcemod/scripting directory:

Windows:
Code:
spcomp freaks\default_abilities.sp
move /Y default_abilities.smx ..\plugins\freaks\default_abilities.smx
Linux:
Code:
spcomp freaks/default_abilities.sp
mv -f default_abilities.smx ../plugins/freaks
I hope this makes it into future versions of FF2.

Last edited by sarysa; 05-18-2014 at 19:57.
sarysa is offline
Wliu
Veteran Member
Join Date: Apr 2013
Old 05-18-2014 , 20:10   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #2

This is already in 1.10.0.

EDIT: My fix is different than yours in that it just resets all the ability slots to 0 (except teleport). Previously, only rage was being reset to 0%.
__________________
~Wliu

Last edited by Wliu; 05-18-2014 at 20:13.
Wliu is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 05-18-2014 , 21:26   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #3

Cool. Hopefully this post will be useful to folks who can't directly upgrade. (i.e. servers where their source is already heavily modified)

(for example, I'm almost positive the three or four on the top 10 of gametracker all have modified core FF2 source)

Last edited by sarysa; 05-18-2014 at 21:28.
sarysa is offline
friagram
Veteran Member
Join Date: Sep 2012
Location: Silicon Valley
Old 05-19-2014 , 03:19   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #4

Yeah.. Just set the charges to 0, for some reason ff2 only set the main slot to 0 but not others.
The boss will set teleport initial cooldown penalty appropriately anyways if you are using the old method (which is terrible)
__________________
Profile - Plugins
Add me on steam if you are seeking sp/map/model commissions.

Last edited by friagram; 05-19-2014 at 03:22.
friagram is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-19-2014 , 09:13   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #5

I know the fire friendly servers are running a ff2 1.0.7 beta(pretty old right) but modified. The server owner implemented his own fix for it.
Edit: Seems like this post is for the fire friendly servers: http://www.disc-ff.com/viewtopic.php?f=56&t=4606

Last edited by WildCard65; 05-19-2014 at 09:16.
WildCard65 is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 05-23-2014 , 05:28   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #6

Quote:
Originally Posted by WildCard65 View Post
I know the fire friendly servers are running a ff2 1.0.7 beta(pretty old right) but modified. The server owner implemented his own fix for it.
Edit: Seems like this post is for the fire friendly servers: http://www.disc-ff.com/viewtopic.php?f=56&t=4606
Eh, it's been a problem on all FF2 servers I've played on with teleport bosses. It's just that it particularly bothered me on the DISC-FF servers, heh.
sarysa is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-30-2014 , 11:28   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #7

Quote:
Originally Posted by sarysa View Post
Eh, it's been a problem on all FF2 servers I've played on with teleport bosses. It's just that it particularly bothered me on the DISC-FF servers, heh.
Sorry for bumping this, but...
It actually depends on if server owners want to update ff2.
WildCard65 is offline
sarysa
Senior Member
Join Date: Mar 2014
Old 05-31-2014 , 04:51   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #8

Quote:
Originally Posted by WildCard65 View Post
Sorry for bumping this, but...
It actually depends on if server owners want to update ff2.
Yup. Many don't...I'm guessing because of the long hiatus, people who knew how would just mod the hell out of FF2 themselves. Especially if you've built a distinct "brand" of FF2 it's virtually impossible to go back afterwards.

'tis the motivation for my post here...plus I didn't know it finally got fixed for 1.10.0 lol.

Sorry, I'm not trying to put down DISC-FF or anything. When I said it especially bothered me there it's because I actually played on that server extensively, which is a compliment. All non-beta FF2 servers have the issue after all.

Last edited by sarysa; 05-31-2014 at 04:53.
sarysa is offline
WildCard65
Veteran Member
Join Date: Aug 2013
Location: Canada
Old 05-31-2014 , 10:05   Re: A fix for the long-standing 40 second super jump glitch
Reply With Quote #9

Quote:
Originally Posted by sarysa View Post
Yup. Many don't...I'm guessing because of the long hiatus, people who knew how would just mod the hell out of FF2 themselves. Especially if you've built a distinct "brand" of FF2 it's virtually impossible to go back afterwards.

'tis the motivation for my post here...plus I didn't know it finally got fixed for 1.10.0 lol.

Sorry, I'm not trying to put down DISC-FF or anything. When I said it especially bothered me there it's because I actually played on that server extensively, which is a compliment. All non-beta FF2 servers have the issue after all.
Ya, fire, the server owner, said he had customized the ff2 version he's using which is why he's not updating.
WildCard65 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 21:01.


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