Page 1 of 1

Bug in Pushthrough hook?

Posted: Mon May 04, 2015 10:11 pm
by bodom
Hi again,

I am trying to setup a simple Pushthrough hook, following the docs. Here is what i do.

1. In syshook.cfg, i add the following:

Code: Select all

SystemHookScript pushthrough.ecl
{
	Pushthrough Pushthrough
}
2. I create a pushthrough.src in the same package, with the following code:

Code: Select all

program PushthroughHook()
	Print( "Using PushthroughHook..." );
	return 1;
endprogram

exported function Pushthrough(walker, obstructors)
	print("Push " + walker.name);
	return 1;
endfunction
What the docs says:
Pushthrough:

params: CharRef character, Array of CharRefs in destination tile. When called: on EVERY move of EVERY character. Return: true if walk ok, false to block walk. Used to override core behavior for walking through tiles with other mobiles on them. Since this critical script is called so often, it is a very CPU expensive one to impliment.
What happens:
When the POL starts up, it says "Using PushthroughHook..." to confirm me the hook has been loaded correctly. When a character tries to push through a mobile, the POL still does standard checks, THEN calls my hook only if the check succeedes.
1. The character tries to push through
2a. If he's full stamina, the core will call my hook and use the return value
2b. If he's not full stamina, the core will just ignore my hook and prevent the character to move

What i would expect to happen:
I would expect the core to just skip the builting pushthrough checks and directly call my hook, in this way:
1. The character tries to push through
2. The core calls my hook and uses the return value
or even call the hook before every single move, just like the doc says.

I had a look the the related source code (charactr.cpp:3820) and concluded this could probably be a long-time bug that has never been reported because, by looking at the most famous distro scripts, it looks like nobody is using this feature.

Re: Bug in Pushthrough hook?

Posted: Mon May 04, 2015 10:18 pm
by bodom
I've just realized that I've posted in the wrong section. My apologies.

Re: Bug in Pushthrough hook?

Posted: Tue May 05, 2015 2:22 am
by Turley
Mmmh I looked into the code and I see no check for full stamina. The push through hook gets called as long as mobiles are on the spot. Please correct me if I'm wrong and you found the code line.
My guess is that the client itself disallows movement, at least if I remember correctly. You could verify it by attaching a pktlogger or by the internal .startlog. If no movement pkts get send you know that the client is the reason.

Re: Bug in Pushthrough hook?

Posted: Tue May 05, 2015 11:23 am
by Tomi
The problem with pushthrough hook is that is mostly unusable outside the trammel facet due to the current stamina >= max stamina check you found ( its in the client thats why Turley didnt find it in the core )

UOCH is capable to remove the stamina check from the client up to clients 7.0.0.0 iirc
Without the stamina patch all other facets than trammel are checking for stamina in the client.

Re: Bug in Pushthrough hook?

Posted: Wed May 06, 2015 12:49 am
by bodom
I confirm you it's a problem in the client preventing movement, the client needs to be patched and now everything works as expected.

Maybe you could add this info to the docs to prevent more newbies like me to fall on it?

Thank you!

Re: Bug in Pushthrough hook?

Posted: Wed May 06, 2015 3:58 pm
by Harley
I have this problem too!
Tell me please, how did you patch your client?

Re: Bug in Pushthrough hook?

Posted: Sun May 10, 2015 12:12 am
by bodom
I've found a tool called "SUMP" by googling. I am sorry but i no longer have the download link. If you can't find it, PM me and I'll be happy to forward it to you,

It's like the client's swiss army knife, our flag is "-s":
Simple Ultima Multi Patcher .4
Currently supported UO clients: 4.x - 7.x
Note: wildcards are supported for filename. For example: *.exe

Usage: SUMP.exe <filename> <options>
Example: SUMP.exe client.exe -m -l -s -b -g -e -h

Options:
-m : Apply multi-uo patch which allows you to run multiple clients.
-l : Apply always light patch.
-s : Remove stamina check when pushing through mobiles.
-b : Apply Batlin's sleep patch to reduce CPU usage.
-g : Apply Garret's patch to display no-draw items.
-e : Remove protocol encryption (and decryption).
-h : Apply hifi's global sound patch which enables sound for minimized client.

Re: Bug in Pushthrough hook?

Posted: Sun May 17, 2015 2:06 am
by blckfire
Interesting tool I shall use this one later on my project. Here's a link for the lazy ones SUMP.

Re: Bug in Pushthrough hook?

Posted: Mon Oct 24, 2016 12:09 pm
by Harley
Unfortunately, I didn't resolve that issue with client 7.0.3
When I tried to remove stamina check, it gave me:

Code: Select all

J:\Games\MULs\SUMP>SUMP.exe client.exe -s
Simple Ultima Multi Patcher .4
Currently supported UO clients: 4.x - 7.x
Attempting to patch "J:\Games\MULs\SUMP\client.exe"...

Stamina patch is unsuccessful, aborting...
I will be very greateful, if you know, how to remove that check from 7.0.3 client version.
With best regards!

Re: Bug in Pushthrough hook?

Posted: Tue Oct 25, 2016 6:55 am
by RusseL
Use britannia_alt as default realm and move all of your items and characters (edit data).
Client has no stamina check there and u will be able to run through peoples.

Re: Bug in Pushthrough hook?

Posted: Tue Oct 25, 2016 7:50 am
by Harley
RusseL, thanks for ur answer.

Yesterdat I tested with client 6.0.1 (with SUMP I can remove stamina check from client), and at britannia realm it works!
So, I suppose that there is a problem not in realm, but in client version.

I'll try your convenience and tell here.

Re: Bug in Pushthrough hook?

Posted: Tue Oct 25, 2016 12:56 pm
by Harley
Yes, you were right, realm britannia_alt allows to push through npcs & pcs.
But with SUMP I removed from 6.0.1 stamina check and can in realm britannia push them too.

Anybody knows some prog to remove stamina check from clients >7.x...

With best regards!

Re: Bug in Pushthrough hook?

Posted: Wed Oct 26, 2016 3:25 am
by RusseL
Harley wrote:Yes, you were right, realm britannia_alt allows to push through npcs & pcs.
But with SUMP I removed from 6.0.1 stamina check and can in realm britannia push them too.
I use britannia_alt as default realm already for 5 years and dont care about client patches ;)