Disconnected when trying to feed a mag

By the way, it is possible your mag feed may take more time than 3 minutes and that's because it's not really 3 minutes but the equivalent of 3 minutes at 30 fps. If your fps drops, it will also take you longer to feed your mag lol
 
Thanks for the help, I think I got the code 100% now. Just tested it. Yeah, idling was what was throwing me off before, because I assumed the timer started with the last feed and not the first. Awesome.
 
That's cool and all that you've fixed this, but think about the possibilities now.

If someone feeds the mag one time and gets his client side timer frozen for different reasons and feed 2 items in the last few seconds of the 3 minutes count. Then the player feed 3 items at the start of the next 3 minutes count. The server side timer being off receives 5 items to be fed in the same 3 minutes timeframe.

While you could set your code to trigger after 5 mag feeds, a hack that enables you to feed 5 times would still give roughly a 66% mag feed bonus. Plus, there will always be ways to work around that trigger because it is controlled client sided rather than by the server. Now if mag feed was completely disabled in the client and enabled only through a server packet, that would work really well.
 
Actually, it doesn't matter if the client timer freezes with the new code. :) I thought about it and client side timing doesn't matter. If the client's timer truly gets hung, this is what will happen (using your example of client feeding 2 items in the last few seconds and 3 at the start of the next):

1. Client feeds item at 7:48:00 (picked random ass time of 7:48am, server feeding 3:30 second minute window starts here. If more than 3 mag items are fed to a mag between 7:48:00 am and 7:51:30, then the player will get disconnected. If an item is fed to a mag after 7:51:30, then the window starts over.)
2. Client hangs at 7:49:15 for 20 seconds.
3. Client feeds last two items at 7:51:48. (2 seconds before his 3:30 minute window would have reset, client side)
4. In a legitimate PSO client, since the client still fed the item within the default window (because his timer hung), "Give items" will be locked out.
5. The server had started a new 3 minute window for 3 items at 7:51:30, so by it's logic, he actually could feed one more item to his mag, even though "Give Items" is greyed out on the client side. The server will reset the window at 7:55:00 to allow 3 more items to be fed.
6. Client's own "Give Items" will light up again at 7:55:18.
7. Does not cause a disconnect.
 
That doesn't really explain how it handles this unless I'm misreading.

In a legitimate client, the mag feed would be enabled again at 7:51:50 to allow 3 feeds even if the client fed 2 items at 7:51:48.

The server receives 5 items to feed for the same mag in a few seconds by a legit client. Like I said, at this point the server timer is off so it never resets inbetween. Anyway, I'm just saying this is something to keep in mind, and as long as you handle this properly, you will avoid false positives.
 
Well, since enabling the code last night after your post, I only had one disconnect from it and that was like RIGHT AFTER I enabled it. Not sure if that was a false positive or not.

It's been almost 12 hours or maybe it has been 12 hours with different people logging on and no other event in the log.

My old code had an event every so often, that's why I had to turn it off. Will keep monitoring, though.
 
Just happened. kept opening/closing mag window once i thought it was time to feed in Secret Delivery and i fed the mag as soon as it went white. Haven't had issues the 2 hours or so that I was on earlier feeding and clearing the government quests

Edit: it was addicting food not secret delivery.
 
Just added more leniency with the latest ship restart. Should only disconnect you if it's glaringly obvious you're doing it.
 
Back
Top