Discovery Gaming Community

Full Version: [FLHook] Docking Module plugin, rise from your grave
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
*Waits for review and approval
I finished rewriting docking modules plugin from zero.

Solid work. I feel it's worth pointing out, the infinite jump bug has never been reproduced outside the live server. Something to add as well, and I know this isn't you but more a problem with the original plugin (and all plugins made by Cannon for that matter), but you might want to adjust the hardcoded values. There are a lot of them littered throughout the plugin, and if any of them don't exist it'll cause a server/client crash.

(i'm going to keep editing this as I think of more things to add)

I would have personally checked up with devs before posting this, because if it doesn't work (and I doubt it fixes the infinite jump bug if I'm being truly honest), it gives people false hope. Even after I've stopped doing dev work I am still asked to rewrite this plugin at least once a week (I don't even see the appeal in it tbh).

You've changed some of the returncodes to nofunctioncall and this will cause plugin conflicts. You really shouldn't do that unless you are absolutely sure the action wont be used in more than once place. I.e. the dock_call function call could have a massive fit if someone tries to dock while having a pending request. LaunchPosHook can bug up with PoBs since they both use the same structure as the temp ship store.

Looking at your code, you are creating new threads. You need to do proper thread management if you go down the route of multi-threaded behaviour because this code would absolutely not scale well. Like, I really need to stress that. You need to properly terminate your threads and not create one inside a for loop! Small scale, threads work quite well and it's difficult to see where errors may appear. But I'm reasonably confident, looking at your code, that this would scale horrible on the live server, given how many threads you are creating, and how you are just letting them run, rather than properly identifying, segregating, detaching, and terminating them.
Does this fix the infinite jump though?
Hm, I've read about docking module concept.
Seems fairly interesting, but, as far as I heard it's bugged. Is it fixed now? It sounds very interesting to have a thing that allows others to dock on player ship.
Cool stuff.

Hope we can just test this on the server to see if the infinite jump bug happens or not.
(06-09-2019, 06:31 PM)Laz Wrote: [ -> ]I doubt it fixes the infinite jump bug if I'm being truly honest

I don't actually known where is the problem. I thought and decided to completely remove the function that is responsible for forced change of systems, since bugs occur during this. I want to test it at separate server with all private plugins enabled and look at result. If the bug is present after this, I will try to fix it again.


(06-09-2019, 06:31 PM)Laz Wrote: [ -> ]LaunchPosHook can bug up with PoBs since they both use the same structure as the temp ship store.

Maybe it is possible. Would be great if you tell me other, safe and nice way to teleport player ship to carrier.


(06-09-2019, 06:31 PM)Laz Wrote: [ -> ]You've changed some of the returncodes to nofunctioncall and this will cause plugin conflicts.

Codes were put back.


(06-09-2019, 06:31 PM)Laz Wrote: [ -> ]I.e. the dock_call function call could have a massive fit if someone tries to dock while having a pending request.

Fixed.


(06-09-2019, 06:31 PM)Laz Wrote: [ -> ]Looking at your code, you are creating new threads. You need to do proper thread management if you go down the route of multi-threaded behaviour because this code would absolutely not scale well.

Totally forgot about HkTimerCheckKick, all delayed actions were rewritten using this hook. Scaling problem solved.
Nice, lets hope this fix past ishues and will pass live server test.
Even little hope of seeing working modules in game is better than no hope at all.
Did some small, but important changes.
Hindsight: Probably would have been better to have put this on a Github that way changes could be seen easily.
(06-09-2019, 11:05 PM)Its Raisu Wrote: [ -> ]Hindsight: Probably would have been better to have put this on a Github that way changes could be seen easily.

The link is updated. Now it leads to repository at new GitHub account.
Note: I uploaded all files, but after putting some more changes. They are noted in readme.
Pages: 1 2 3