Adapt for web

This commit is contained in:
Vladislav Khorev committed 2026-02-27 22:31:07 +03:00
1 parent 7418bbbe27
commit 9f82e7a2e6
14 files changed
+189 -40

No files matched your search

+1 -1
View File
@@ -1,4 +1,4 @@
#include "ClientState.h"
#include "ClientState.h"
uint32_t fnv1a_hash(const std::string& data) {
uint32_t hash = 0x811c9dc5;
+3 -3
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include <chrono>
#include <Eigen/Dense>
#define _USE_MATH_DEFINES
@@ -19,7 +19,7 @@ constexpr float ROTATION_SENSITIVITY = 0.002f;
constexpr float PLANET_RADIUS = 20000.f;
constexpr float PLANET_ALIGN_ZONE = 1.05f;
constexpr float PLANET_ANGULAR_ACCEL = 0.01f; // ??????? ??? ????????
constexpr float PLANET_ANGULAR_ACCEL = 0.01f;
constexpr float PLANET_MAX_ANGULAR_VELOCITY = 10.f;
constexpr float PITCH_LIMIT = static_cast<float>(M_PI) / 9.f;//18.0f;
@@ -41,7 +41,7 @@ struct ClientState {
std::string nickname = "Player";
int shipType = 0;
// ??? ??????? ????
std::chrono::system_clock::time_point lastUpdateServerTime;
void simulate_physics(size_t delta);
+1 -1
View File
@@ -1,4 +1,4 @@
#include "LocalClient.h"
#include "LocalClient.h"
#include <iostream>
#include <sstream>
#include <algorithm>
+1 -1
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "NetworkInterface.h"
#include <queue>
+1 -1
View File
@@ -1,4 +1,4 @@
#ifdef NETWORK
#ifdef NETWORK
#include "WebSocketClient.h"
#include <iostream>
+1 -1
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#ifdef NETWORK
+1 -1
View File
@@ -1,4 +1,4 @@
#ifdef NETWORK
#ifdef NETWORK
#include "WebSocketClientBase.h"
#include <iostream>
+1 -1
View File
@@ -1,4 +1,4 @@
#pragma once
#pragma once
#include "NetworkInterface.h"
#include <vector>