Zed fixes #16
@ -515,7 +515,9 @@ function GiveProgressiveDosh(NicePlayerController nicePlayer){
|
|||||||
record.lastCashWave = nextWave;
|
record.lastCashWave = nextWave;
|
||||||
UpdatePlayerRecord(record);
|
UpdatePlayerRecord(record);
|
||||||
}
|
}
|
||||||
simulated function Mutate(string MutateString, PlayerController kfPlayer){
|
|
||||||
|
simulated function Mutate(string MutateString, PlayerController kfPlayer)
|
||||||
|
{
|
||||||
local int i, readLenght;
|
local int i, readLenght;
|
||||||
local NicePlayerController nicePlayer;
|
local NicePlayerController nicePlayer;
|
||||||
local NiceServerData remoteData;
|
local NiceServerData remoteData;
|
||||||
@ -529,10 +531,11 @@ simulated function Mutate(string MutateString, PlayerController kfPlayer){
|
|||||||
// Always contains at least 10 elements, that may be empty strings if there wasn't enough modifiers.
|
// Always contains at least 10 elements, that may be empty strings if there wasn't enough modifiers.
|
||||||
// Done for safe access without the need to check for bounds.
|
// Done for safe access without the need to check for bounds.
|
||||||
local array<String> modArray;
|
local array<String> modArray;
|
||||||
|
|
||||||
// Helpful sequence
|
// Helpful sequence
|
||||||
white = chr(27)$chr(200)$chr(200)$chr(200);
|
white = chr(27)$chr(200)$chr(200)$chr(200);
|
||||||
// Transform our command into array for convenience
|
// Transform our command into array for convenience
|
||||||
wordsArray = SplitString(MutateString, " ");
|
Split(MutateString, " ", wordsArray);
|
||||||
// Exit if command is empty
|
// Exit if command is empty
|
||||||
if(wordsArray.Length == 0)
|
if(wordsArray.Length == 0)
|
||||||
return;
|
return;
|
||||||
@ -815,48 +818,7 @@ function BroadcastSkills(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Function for string splitting, because why would we have it as a standard function? It would be silly, right?
|
|
||||||
function array<string> SplitString(string inputString, string div){
|
|
||||||
local array<string> parts;
|
|
||||||
local bool bEOL;
|
|
||||||
local string tempChar;
|
|
||||||
local int preCount, curCount, partCount, strLength;
|
|
||||||
strLength = Len(inputString);
|
|
||||||
if(strLength == 0)
|
|
||||||
return parts;
|
|
||||||
bEOL = false;
|
|
||||||
preCount = 0;
|
|
||||||
curCount = 0;
|
|
||||||
partCount = 0;
|
|
||||||
while(!bEOL)
|
|
||||||
{
|
|
||||||
tempChar = Mid(inputString, curCount, 1);
|
|
||||||
if(tempChar != div)
|
|
||||||
curCount ++;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if(curCount == preCount)
|
|
||||||
{
|
|
||||||
curCount ++;
|
|
||||||
preCount ++;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
parts[partCount] = Mid(inputString, preCount, curCount - preCount);
|
|
||||||
partCount ++;
|
|
||||||
preCount = curCount + 1;
|
|
||||||
curCount = preCount;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if(curCount == strLength)
|
|
||||||
{
|
|
||||||
if(preCount != strLength)
|
|
||||||
parts[partCount] = Mid(inputString, preCount, curCount);
|
|
||||||
bEOL = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return parts;
|
|
||||||
}
|
|
||||||
// Function for broadcasting messages to players
|
// Function for broadcasting messages to players
|
||||||
function BroadcastToAll(string message){
|
function BroadcastToAll(string message){
|
||||||
local Controller P;
|
local Controller P;
|
||||||
|
Loading…
Reference in New Issue
Block a user