Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for master branch #688

Closed
wants to merge 19 commits into from
Closed

fixes for master branch #688

wants to merge 19 commits into from

Conversation

ghost
Copy link

@ghost ghost commented May 28, 2020

Resolves #683 #676 #691

Changes proposed in this pull request:

  • fork rebase

  • I have tested my changes and corrected any errors found

@BoGuu
Copy link
Member

BoGuu commented May 28, 2020

re. HandleHeal - I'm correct in thinking you can cancel the healing right?

If that's the case, I'm not at all a fan of HandleHeal - it seems pretty useless.

@ghost
Copy link
Author

ghost commented May 28, 2020

Well, the main issue I try to resolve with it is that when a heal item (FirstAidKit, Medkit) is used on self or by other player in the field although the healing itself is done by the engine the hud is not updated. I've done it for the healing at the hospital NPC and hence I'd like to also get it working for the healing items. Unfortunately I wasn't able to find any other event handler triggered on healing. So, if you have any suggestions for this problem please tell me. Otherwise just not fix this at all isn't really satisfying me.

@BoGuu
Copy link
Member

BoGuu commented May 28, 2020

Updating would be the default behavior on the v5 branch - but a damage check was removed in a tidy up. The easiest solution to this is to utilise life_fnc_survival, it does periodic state checking as is, one would just need to re-add a damage check between iterations

@ghost
Copy link
Author

ghost commented May 28, 2020

I don't see such a change would fix the base issue as the hud gets updated everytime either food/water ticks or if the player consumes some item that change those values. So in other words: Getting healed (either self or by someone else) and using a water bottle also end up in refreshing the hud - but the issue still remains that the healing isn't caught so the "health" (or rather: damage) indicator doesn't get updated right away but only when a change on one of the other two triggers the hud update.
On the other hand, when damage is inflicted the hud gets update straight away. So at least it's some handler triggers on damage infliction. I just want to get the same working when healing happens.

From as far as I now understand it's this: It seems that the event handler for the "HandleHeal" event always gets triggered on the unit using the FAK, no matter if this unit heals itself or another player.
As the BI wiki itself shows there's an easy to wait until the healing itself is done and then continue with triggering something else. My next idea now is to relay the completion of the healing to the server and let it relay it back to the unit that's being healed. I tried to copy over from what I've seen in the jail system as it seems to do exactly what I want to achieve, but this would also require not just adding a simple event handler in the client mission but also some server code. I don't know if this would be worth a valuable modification to fix the hud not updating on healing.

It's one of those "This has to work somehow ..." type of things where the "correct" solution is so near but yet so far. The overall bad design of the engine, its scripting and the documentation doesn't help much in solve this issue.

cryptearth added 6 commits May 29, 2020 11:55
there're 6 tables and 6 precedures to clean them on startup - let's call them all
servers two purposes:
1. does the same as on server startup
2. prevents database dropping connection due to long timeout (can be tweaked to meet database server requirements)
@ghost
Copy link
Author

ghost commented May 29, 2020

removed any changes for #666 as it's not possible to do

@ghost ghost closed this May 29, 2020
@ghost ghost mentioned this pull request Jun 1, 2020
1 task
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant