-
Notifications
You must be signed in to change notification settings - Fork 22
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
Update Death Counter Due To Fall Damage #158
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trivial style fix needed, and as noted in the description the functionality isn't quite complete yet but I can confirm a "death" was counted :-)
However, I wonder if this is the right approach 🤔 Is this not merely adding a count for the deaths when the player would have died, but doesn't, as opposed to making the player actually die properly to fall damage, which would automatically involve the respawn on the flag base just as if killed by another player? And maybe even increase the death counter through that logic too.
All I did was make sure that if the player died and was not killed by anyone there would be no null pointer exception, which before blocked the flow, but now allows for the code to continue as can be seen by restoration of health. But the problem lies in teleportation back to the base. Maybe I didnt really understand what you meant? |
Hmm, on looking at the code more closely, you're right - I thought the death would have been handled elsewhere, and this just handled the counter. But that method seems to approximate player death without actually dying - as you say it includes the teleport step and everything, that just doesn't work for some reason. That helps - sorry for my misunderstanding, I haven't dug deep in this part of the code lately :-) As for why the teleport doesn't work - hmm. The flow probably still differs - usually when a player kills another player it is handled somewhere with an That's me just thinking out loud more than anything, would need to look around some more, but it is nearing in on midnight here, I should probably get some sleep ... 😅 |
ok sure , Just wanted to mention that when I had a look at it I noticed that a few components which had been added such as the location component , rigid body component etc ,was removed for some reason which probably should not be happening , but right when I thought I found the error the behavior started changing completely so hopefully I will be able to observe something more consistent, wont disturb your sleep anymore 😀. |
Why was that closed? 🤔 @ahv15 |
I believe because of
|
@stefaniamak The PR I made only updated the statistics but for some reason death due to fall damage did not trigger teleport back to the base. As I did not take a further look at it I decided to close it and open it back later if I try to fix this later on. |
I guess something is going on in some other class which prevents the teleport |
I see, so the flag didn't teleport too. I was to suggest merging just the counter and having the issue only being at teleporting the player, but that could be really confusing to the player when seeing their score. Alright, got it 👍 |
Contains
"Fixes #145"
Updates the death counter every time the player dies due to fall damage.
How to test
In game give fall damage to the player until the player dies.
Outstanding before merging