diff options
| author | Caleb Mabry <caleb.mabry.15@cnu.edu> | 2022-03-26 17:00:45 -0400 |
|---|---|---|
| committer | Caleb Mabry <caleb.mabry.15@cnu.edu> | 2022-03-26 17:00:45 -0400 |
| commit | 7386f4cbec11b138e49d94a24f5a2368eb009994 (patch) | |
| tree | 18e092f7982e01655838396a66a90a4a910d9768 /webAO/client.ts | |
| parent | c32eea5367295c4ed653ea519ab1963459880f0c (diff) | |
Adding limits of 120 ms for slowness
Diffstat (limited to 'webAO/client.ts')
| -rw-r--r-- | webAO/client.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webAO/client.ts b/webAO/client.ts index aa000f7..9c1598d 100644 --- a/webAO/client.ts +++ b/webAO/client.ts @@ -2307,14 +2307,14 @@ class Viewport { // Changing Text Speed if (textSpeeds.has(characterElement.innerHTML)) { // Grab them all in a row - const index = this.textnow.length + const MAX_SLOW_CHATSPEED = 120 for(let i = this.textnow.length; i < this.chatmsg.content.length; i++) { const currentCharacter = this.chatmsg.parsed[i - 1].innerHTML if (currentCharacter === '{') { if (this.chatmsg.speed > 0) { this.chatmsg.speed -= 20 } - } else if(currentCharacter === '}') { + } else if(currentCharacter === '}' && this.chatmsg.speed < MAX_SLOW_CHATSPEED) { this.chatmsg.speed += 20 } else { // No longer at a speed character |
