So, what happens if (Destiny)

by Earendil, Wednesday, January 28, 2015, 11:33 (3395 days ago) @ Cody Miller

You are not understanding.

I was not understanding the assumptions you were making. I was making or allowing for a greater number of scenarios.

You save the value THE INSTANT BEFORE THE CHARACTER REBUILD HAPPENS. The glitch happens when the character is rebuilt on spawn. So you determine how much ammo you have the nanosecond before spawn, then restore it after spawn.

You assume two things:
1. That the nanosecond before spawn that the ammo count is still available. It may get wiped on death, and rebuilt on life.
2. That there is no scenario where the player does not have time to change the capacity. If the capacity is no longer available after death, and doesn't get instantiated again until life, than you have anywhere between 3 seconds and an infinite time between next spawn.


Also, if you remove the armor in your example while you are alive, the same thing would happen. There is no problem at all with the scenario. If you have 7 ammo, and remove armor pieces that let you have that 7, or course your ammo is going to go down.

That was not my example. My example was having 3 rockets with a capacity of 6. Removing armor while alive that drops your capacity to 4 should have no effect on the 3 rockets you have. If you simply use a percentage total capacity, and there exists time for the player to adjust that capacity between when the current value is no longer accessible and when the value is instantiated again, you will have a problem

That said, ZackDark came up with a solution based on percentage weapon capacity instead of total capacity that I can't find a way to break yet. It might involve changing the variable type (which isn't always an easy task) but functionally I don't see an issue with yet.


Complete thread:

 RSS Feed of thread