![]() |
![]() |
Ryusho |
![]()
Post
#1
|
Member ![]() ![]() Group: Members Posts: 37 Joined: 25-December 08 Member No.: 1,436 ![]() |
Just currious since it has been silent for a while, was wondering if anyone has figured anything out, though I w ould gladly try to help if I knew much about coding and AI, >.< Though thinking about it I might be able to have a friend help if I can get him too, though he tends to be busy, but he is a programmer.
|
![]() ![]() |
Solokiller |
![]()
Post
#2
|
Member ![]() ![]() Group: Members Posts: 23 Joined: 17-December 16 Member No.: 2,482 ![]() |
I downloaded the SC 4.5 release. It has a lot of compiler warnings so i set about fixing them.
I made a Github repo for this: https://github.com/SamVanheer/RCBot-Svencoop-CMake I've fixed all compiler warnings when using VS2015 and GCC 5.3, but i have to go through and commit them. Mostly using char* for string literals, unused variables and ambiguous use of && and ||, but i also had to fix the ent files having inconsistent line endings which caused it to generate exports for the same entities multiple times, and it didn't handle lines with only whitespace correctly (empty lines when using Windows line endings are essentially lines with one whitespace in them), so it generated empty exports too. I also ported it to CMake using the Metamod-P CMake config i made a few weeks ago so it's easier to cross-compile now. From what i can tell there are 3 build types: Standalone, Metamod plugin and TFC. I've added the former 2, but the latter doesn't seem any different from those. I also replaced the .def file with a pragma to add the GiveFnptrsToDll function to the ordinals table, not sure if that'll work for Borland but i've never used it, so i don't know. I can always add special support for Borland in the CMake file if needed. It uses the CMake automatic deployment code that i added for Metamod-P, so if set it'll put the dll in <game dir>/<mod dir>/addons/rcbot/dlls. This lets you configure the game directory (Half-Life or Sven Co-op) and which mod it uses, so it's easy to work with. Once i've committed the fixes the CMake files will be committed as well, i'll have to double check that all settings are mirrored in CMake first. I've also noticed that the SC specific code doesn't handle the 4.0 changes, it uses the MP5 because it thinks it has the GL. I added a TODO item in the code for that, but i haven't checked all of the cases yet. Some of these files are pretty large, so it might be a good idea to refactor some of this stuff out. I spotted some code that repeats several times, and explicit checks for whether it's a Metamod build or not, that can be abstracted out at a higher level. The file I/O code handles platform specific path separators explicitly as well, it might be a good idea to let a lower level file API handle this. Something like the IFileSystem interface used by the engine would handle that part automatically. Regarding Metamod, should RCBot be available as standalone or is the Metamod build the only one worth using? Seems like the standalone build requires a lot of manual work to forward exports, whilst Metamod-P does this automatically. It would certainly simplify a lot of code, and increase efficiency in calling these functions because it can call game functions directly. It would also cut down on exports that aren't used by the game being played, since out of the 3000+ exports only a subset are ever used by any given game. Also, this won't run under Sven Co-op's engine without special changes because they modified engine function interfaces. I'm putting together a report that will hopefully convince them to revert the changes, but until then the standalone build will not function with 5.0 and newer. The Metamod-P fork that i developed will function with it though. |
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 20th June 2025 - 11:18 AM |