build fails on linux
└─$ cmake --build . --config Release
[ 1%] Building CXX object external/discord-rpc/src/CMakeFiles/discord-rpc.dir/discord_rpc.cpp.o
In file included from /home/glitch/OpenAG/external/discord-rpc/src/serialization.h:15,
from /home/glitch/OpenAG/external/discord-rpc/src/rpc_connection.h:4,
from /home/glitch/OpenAG/external/discord-rpc/src/discord_rpc.cpp:6:
/home/glitch/OpenAG/external/discord-rpc/thirdparty/rapidjson-1.1.0/include/rapidjson/document.h: In member function ‘rapidjson::GenericStringRef<CharType>& rapidjson::GenericStringRef<CharType>::operator=(const rapidjson::GenericStringRef<CharType>&)’:
/home/glitch/OpenAG/external/discord-rpc/thirdparty/rapidjson-1.1.0/include/rapidjson/document.h:319:82: error: assignment of read-only member ‘rapidjson::GenericStringRef<CharType>::length’
319 | operator=(const GenericStringRef& rhs) { s = rhs.s; length = rhs.length; }
| ~~~~~~~^~~~~~~~~~~~
At global scope:
cc1plus: note: unrecognized command-line option ‘-Wno-global-constructors’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-exit-time-destructors’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-covered-switch-default’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-c++98-compat-pedantic’ may have been intended to silence earlier diagnostics
cc1plus: note: unrecognized command-line option ‘-Wno-c++98-compat’ may have been intended to silence earlier diagnostics
gmake[2]: *** [external/discord-rpc/src/CMakeFiles/discord-rpc.dir/build.make:79: external/discord-rpc/src/CMakeFiles/discord-rpc.dir/discord_rpc.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:335: external/discord-rpc/src/CMakeFiles/discord-rpc.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
Yeah, a compiler update now catches this problem in old rapidjson bundled by old discord-rpc... Not sure what's the best way to deal with it, maybe somehow bundle discord-rpc and its rapidjson in the OpenAG repo with a fix?
For now you can just change that file locally to make the length member not const.
what should i change it to? i deleted the const on both of them and it errored
is there a way to build it without rich presence? i don't use that feature
On line 325 in document.h change const SizeType length; to SizeType length;
thanks, the rest of the build worked
should probably leave this open
@YaLTeR where can i find the latest ag.7z? is the one from openag.pro the latest?
Yes
alr, i have it installed, am i able to join normal half-life community servers? or only openAG servers?
Only AG servers.
If you move client.dll/.so to the "valve_addon/cl_dlls" directory and enable custom addon content in video options (_setaddons_folder 1 does the thing too after restarting), then you'll be able to play HLDM with OpenAG client. Of course you need to play in "valve" gamedir, not "ag" one.
You can also play on HLDM servers without swapping out the client, directly from AG. The catch is that the server needs to be running on a reHLDS version that's recent enough.
Simply set setinfo _gd ag and you will be able to join valve servers. Note that it has to be the gamedir you are on (ag) and not the one you're trying to join. Can be a little counter-intuitive.
^
But you already need to know IPs of servers which support that feature. Also most of HLDM servers are on vanilla HLDS or on older ReHLDS versions.
alr, so just find ips on gametracker and see if they work?
Pretty much.
The relevant reHLDS patch https://github.com/rehlds/ReHLDS/commit/0c5ce53666811c4243ed5aa0c755dab26d2283d4 has been out since last year, so if the server owners have updated reHLDS since then, it's likely you'll be able to join the server this way.