rebalancing

This commit is contained in:
evanpelle
2024-09-07 13:35:07 -07:00
parent 8ff03496c6
commit bf7273ad5a
10 changed files with 54 additions and 23 deletions
+3 -2
View File
@@ -4,9 +4,10 @@ import {loadTerrainMap, TerrainMap} from "../core/TerrainMapLoader";
import {ClientGame, createClientGame} from "./ClientGame";
import backgroundImage from '../../resources/images/TerrainMapFrontPage.png';
import favicon from '../../resources/images/Favicon.png';
import {v4 as uuidv4} from 'uuid';
import './styles.css';
import {generateUniqueId} from "../core/Util";
class Client {
@@ -120,7 +121,7 @@ class Client {
console.log(`got ip ${clientIP}`)
this.game = createClientGame(
getUsername(),
generateUniqueId(),
uuidv4(),
clientIP,
lobby.id,
getConfig(),
+4
View File
@@ -242,6 +242,10 @@ export class ClientGame {
let borderTileClosest = 10000000
let enemyShoreClosest = 10000
if (borderWithDists.length == 0 && enemyShoreDists.length == 0) {
return
}
if (bordersWithDists.length > 0) {
borderTileClosest = borderWithDists[0].dist
}
+1 -1
View File
@@ -10,7 +10,7 @@
<body>
<div class="content">
<h1>OpenFront.io</h1>
<h2>(v0.3.0)</h2>
<h2>(v0.3.5)</h2>
<div id="username-container">
<input type="text" id="username" placeholder="Enter your username">
</div>