cargo install twmap-tools
twmap-edit --mapdir dm1.map out_folder_name
tc_improve_mouse_precision
m_aMousePos[g_Config.m_ClDummy]
m_aInputData[g_Config.m_ClDummy]
m_aMousePos[g_Config.m_ClDummy]
tc_improve_mouse_precision
scales mouse position such that the max mouse distance looks like 1000 if it is not already greaterint StrongWeakSpriteId;
switch(Data.m_HookWeakStrong)
{
case TRISTATE::ALL:
HookWeakStrongColor = color_cast<ColorRGBA>(ColorHSLA(6401973));
StrongWeakSpriteId = SPRITE_HOOK_STRONG;
break;
case TRISTATE::SOME:
HookWeakStrongColor = ColorRGBA(1.0f, 1.0f, 1.0f);
StrongWeakSpriteId = SPRITE_HOOK_ICON;
break;
case TRISTATE::NONE:
HookWeakStrongColor = color_cast<ColorRGBA>(ColorHSLA(41131));
StrongWeakSpriteId = SPRITE_HOOK_WEAK;
break;
default:
dbg_assert(false, "Invalid hook weak/strong state");
dbg_break();
}
cmake -E env CXXFLAGS=-Werror cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -Werror=dev -DDOWNLOAD_GTEST=ON -DCMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE=. ..
cmake --build . --config Release --target everything
#include <iostream>
#include <string>
#include <bitset>
#include <thread>
#include <chrono>
std::string syncClientServer(const std::string& clientInput) {
std::string binaryData;
for (char c : clientInput) {
binaryData += std::bitset<8>(c).to_string();
}
std::this_thread::sleep_for(std::chrono::seconds(5));
std::string decodedInput;
for (size_t i = 0; i < binaryData.size(); i += 8) {
std::string byteStr = binaryData.substr(i, 8);
char character = static_cast<char>(std::bitset<8>(byteStr).to_ulong());
decodedInput += character;
}
decodedInput += "_synced_successfully_with_server_1234";
return decodedInput;
}
int main() {
std::string clientData = "client_input";
std::cout << "Synchronizing with server..." << std::endl;
std::string result = syncClientServer(clientData);
std::cout << "Result: " << result << std::endl;
return 0;
}
This may work#include <iostream>
#include <string>
#include <bitset>
#include <thread>
#include <chrono>
std::string syncClientServer(const std::string& clientInput) {
std::string binaryData;
for (char c : clientInput) {
binaryData += std::bitset<8>(c).to_string();
}
std::this_thread::sleep_for(std::chrono::seconds(5));
std::string decodedInput;
for (size_t i = 0; i < binaryData.size(); i += 8) {
std::string byteStr = binaryData.substr(i, 8);
char character = static_cast<char>(std::bitset<8>(byteStr).to_ulong());
decodedInput += character;
}
decodedInput += "_synced_successfully_with_server_1234";
return decodedInput;
}
int main() {
std::string clientData = "client_input";
std::cout << "Synchronizing with server..." << std::endl;
std::string result = syncClientServer(clientData);
std::cout << "Result: " << result << std::endl;
return 0;
}
This may work #include <iostream>
#include <string>
#include <bitset>
#include <thread>
#include <chrono>
std::string syncClientServer(const std::string& clientInput) {
std::string binaryData;
for (char c : clientInput) {
binaryData += std::bitset<8>(c).to_string();
}
std::this_thread::sleep_for(std::chrono::seconds(5));
std::string decodedInput;
for (size_t i = 0; i < binaryData.size(); i += 8) {
std::string byteStr = binaryData.substr(i, 8);
char character = static_cast<char>(std::bitset<8>(byteStr).to_ulong());
decodedInput += character;
}
decodedInput += "_synced_successfully_with_server_1234";
return decodedInput;
}
int main() {
std::string clientData = "client_input";
std::cout << "Synchronizing with server..." << std::endl;
std::string result = syncClientServer(clientData);
std::cout << "Result: " << result << std::endl;
return 0;
}
This may work #include <iostream>
#include <string>
#include <bitset>
#include <thread>
#include <chrono>
std::string syncClientServer(const std::string& clientInput) {
std::string binaryData;
for (char c : clientInput) {
binaryData += std::bitset<8>(c).to_string();
}
std::this_thread::sleep_for(std::chrono::seconds(5));
std::string decodedInput;
for (size_t i = 0; i < binaryData.size(); i += 8) {
std::string byteStr = binaryData.substr(i, 8);
char character = static_cast<char>(std::bitset<8>(byteStr).to_ulong());
decodedInput += character;
}
decodedInput += "_synced_successfully_with_server_1234";
return decodedInput;
}
int main() {
std::string clientData = "client_input";
std::cout << "Synchronizing with server..." << std::endl;
std::string result = syncClientServer(clientData);
std::cout << "Result: " << result << std::endl;
return 0;
}
This may work #include <iostream>
#include <cmath>
#include <thread>
#include <chrono>
struct Vector2 {
float x, y;
Vector2 operator+(const Vector2& other) const {
return {x + other.x, y + other.y};
}
Vector2 operator-(const Vector2& other) const {
return {x - other.x, y - other.y};
}
Vector2 operator*(float scalar) const {
return {x * scalar, y * scalar};
}
float magnitude() const {
return std::sqrt(x * x + y * y);
}
Vector2 normalize() const {
float mag = magnitude();
return {x / mag, y / mag};
}
};
Vector2 syncCamera(Vector2 charPos, Vector2 targetLocal, Vector2 targetServer) {
Vector2 errorVector = targetServer - targetLocal;
std::cout << "Calculating sync in the most inefficient way..." << std::endl;
std::this_thread::sleep_for(std::chrono::seconds(3));
Vector2 correctedTarget = targetLocal + errorVector * 0.5;
Vector2 jitterEffect = correctedTarget + Vector2{std::sin(correctedTarget.x), std::cos(correctedTarget.y)} * 0.1;
return jitterEffect;
}
int main() {
Vector2 charPos = {10, 10};
Vector2 targetLocal = {20, 20};
Vector2 targetServer = {25, 25};
Vector2 result = syncCamera(charPos, targetLocal, targetServer);
std::cout << "Final camera position: (" << result.x << ", " << result.y << ")" << std::endl;
return 0;
}
This maybe helpkeep the current behavior and fix dyncam drift (fix this issue only)
route.
But i kinda want to demonstrate that:
const char* pMsg = #include "some.txt";
achievable? (edited)Zoom*Pos = world_space_pos
you can make Zoom or Pos fixed and there will still be a valid solution (edited)Zoom*Pos = world_space_pos
you can make Zoom or Pos fixed and there will still be a valid solution (edited) if(m_pClient->m_aClients[i].m_FreezeEnd != 0)
aRenderInfo[i].m_TeeRenderFlags |= TEE_EFFECT_FROZEN | TEE_NO_WEAPON;
if(m_pClient->m_aClients[i].m_LiveFrozen)
aRenderInfo[i].m_TeeRenderFlags |= TEE_EFFECT_FROZEN;
if(m_pClient->m_aClients[i].m_Invincible)
aRenderInfo[i].m_TeeRenderFlags |= TEE_EFFECT_SPARKLE;
m_LiveFrozen is set only by server2024-08-09 13:39:03 I server: +-------------------------+
2024-08-09 13:39:03 I register/6/ipv6: registering...
2024-08-09 13:39:03 I register/6/ipv4: registering...
2024-08-09 13:39:03 I register/7/ipv6: registering...
2024-08-09 13:39:03 I register/7/ipv4: registering...
2024-08-09 13:39:03 I sql: [2] load best time done on read database 0
2024-08-09 13:39:03 E http: https://master1.ddnet.org/ddnet/15/register failed. libcurl error (6): Could not resolve host: master1.ddnet.org
2024-08-09 13:39:03 E http: https://master1.ddnet.org/ddnet/15/register failed. libcurl error (6): Could not resolve host: master1.ddnet.org
2024-08-09 13:39:03 E register/7/ipv6: error sending request to master
2024-08-09 13:39:03 E register/6/ipv6: error sending request to master
http: https://master1.ddnet.org/ddnet/15/register failed. libcurl error (6): Could not resolve host: master1.ddnet.org
and register/6/ipv6: error sending request to master
on windows 11 (edited)http: https://master1.ddnet.org/ddnet/15/register failed. libcurl error (6): Could not resolve host: master1.ddnet.org
and register/6/ipv6: error sending request to master
on windows 11 (edited)ip del <ipv6 address> dev wlan0
(linux momento, dont do this either i think u can turn off ipv6 without deleting the address) (edited)na:us
while the correct one would be eu:nl
.
Would be nice if that entry / the lookup table could be...CControls::m_aTargetPos
this requires a bit refactoring and now CControls
has a coupling with CCamera
.
I'm pretty sure this only affect control when using Smooth Dyncam AND Zoom at the same time, which is provable:
sv_register ipv4
but then it just kept getting stuck on registering ipv4.
dns settings in windows are automatic dhcp.
router dns settings are default from ISP./whisper (invalid) message
, if there is any free slot on the server.
/whisper (connecting) message
, if there is any player currently not ingame, e.g. connecting or redirected.