Remove 10 points at a time for power levels

This commit is contained in:
TehRealSalt 2019-04-23 00:56:28 -04:00
parent b669069098
commit 8f3efa7598

View file

@ -786,15 +786,40 @@ void Y_Ticker(void)
r++; r++;
data.match.jitter[data.match.num[q]] = 1; data.match.jitter[data.match.num[q]] = 1;
if (data.match.increase[data.match.num[q]] > 0)
if (powertype != -1)
{ {
if (--data.match.increase[data.match.num[q]]) // Power Levels
kaching = false; if (abs(data.match.increase[data.match.num[q]]) < 10)
{
// Not a lot of point increase left, just set to 0 instantly
data.match.increase[data.match.num[q]] = 0;
}
else
{
SINT8 remove = 0; // default (should not happen)
if (data.match.increase[data.match.num[q]] < 0)
remove = -10;
else if (data.match.increase[data.match.num[q]] > 0)
remove = 10;
// Remove 10 points at a time
data.match.increase[data.match.num[q]] -= remove;
// Still not zero, no kaching yet
if (data.match.increase[data.match.num[q]] != 0)
kaching = false;
}
} }
else if (data.match.increase[data.match.num[q]] < 0) else
{ {
if (++data.match.increase[data.match.num[q]]) // Basic bitch points
kaching = false; if (data.match.increase[data.match.num[q]])
{
if (--data.match.increase[data.match.num[q]])
kaching = false;
}
} }
} }