doctorluk / Reign-of-the-Undead-Revolution-Scripts

All scripts used in the popular Zombie Survival Mod RotU-Revolution for Call of Duty 4: Modern Warfare
https://rotu-revolution.com
7 stars 8 forks source link

Fix for rank up loop #4

Closed DuncanCasteleyn closed 8 years ago

DuncanCasteleyn commented 8 years ago

This fix should solve this issue of ranking up multiple times to the same level. To give an example your about to rank up 1 xp away from rank up and throw a monkey bomb. You get 20 kills at the same frame time, this means your granted xp 20 times at the same time. But because of this you will also be ranked up to level 20 for example 20 times.

Also removes and unneeded loop at line 653 to announce the rank up.

Fixed an if clause that could end up with result null: if ( updateRank() ) which caused non-fatal script errors.

I did not change the documentation because it would take a long time and made this edit some probably like 6 months ago i will ad it later maybe.

DuncanCasteleyn commented 8 years ago

Might add some documentation to the script tomorrow.

doctorluk commented 8 years ago

And some formatting :P

DuncanCasteleyn commented 8 years ago

Will do but it's late and this is like I said an edit I made like 6 months ago

doctorluk commented 8 years ago

Sure, no problem. But maybe first send a pull request when there is actually stuff to pull :P

DuncanCasteleyn commented 8 years ago

The fix works so you can pull it the formatting can be done later i didn't change much to the file if you look at comparer from github.

doctorluk commented 8 years ago

Am I seeing it correctly that the two first commits are redundant to what you've committed before?

DuncanCasteleyn commented 8 years ago

Yeah, i'm working from my master branch now github has a strange way of working sometimes

doctorluk commented 8 years ago

Did you update your branch with master after your pull request was acquired?

DuncanCasteleyn commented 8 years ago

If you mean your branch then no because that was not possible since there was no file difference.

PS: i'm gonna sleep now I'll see it tommorow

doctorluk commented 8 years ago

Ah, okay. I thought these changes were already in the pull request. Alright, good night :)

DuncanCasteleyn commented 8 years ago

I just looked at the script and i'm not gonna document a script of 600 and more lines that i didn't make and don't fully understand myself and document it. All i know is that my update fixes rank up loops and that should be enough to merge it. If you want to document it go ahead but i'm really not gonna document something where some functions don't seem to be used and some seem to be exact duplicates of each other. This script is to confusing to document for me and i don't have the free time to spend my time on finding out.

doctorluk commented 8 years ago

I don't want you to document/format the whole script, just your changes or the functions you've changed. Every little helps. :)

DuncanCasteleyn commented 8 years ago

Here or in the script?

doctorluk commented 8 years ago

In the script. It would be great if changes would also be conform to our formatting principles and maybe you can also document at least the function you're altering, because altering an existing function most likely suggests you've fully understood what it does.

But I'm just asking politely, it is no problem if you have no time to do that.

DuncanCasteleyn commented 8 years ago

This should be enough?

doctorluk commented 8 years ago

Yep, thanks!