Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
60c1050
Updated Makefile for compatibility & optimisations
APGRoboCop Oct 1, 2019
c3df046
Removing danger costs makes bots less weird in their navigation.
stefanhendriks Oct 2, 2019
b64b86d
More logging with radio
stefanhendriks Oct 2, 2019
f0b7e0f
Take walking into account for reaching destination
stefanhendriks Oct 2, 2019
8613aa6
Started testing on as_oilrig again
stefanhendriks Oct 2, 2019
a6649c8
Re-enable danger cost
stefanhendriks Oct 2, 2019
2ca0716
Optimisation, reduced redundancy and add missing parameters
APGRoboCop Feb 20, 2021
b9ef45c
Merge branch 'master' of https://github.com/APGRoboCop/RealBot
APGRoboCop Feb 20, 2021
70da662
Linux Build prefers older GCC
APGRoboCop Feb 20, 2021
3929979
Update Makefile
APGRoboCop Feb 20, 2021
4d3efa1
UMP45 Fix by TokusyuSAT700
APGRoboCop Feb 21, 2021
b2498cf
AMBuild support from AoiKagase
APGRoboCop Feb 21, 2021
c01f767
Bug fix for newer GCC
APGRoboCop Feb 21, 2021
9ea7788
Update todo.txt
APGRoboCop Feb 22, 2021
54b94b4
Update todo.txt
APGRoboCop Feb 22, 2021
67833b1
Update todo.txt
APGRoboCop Feb 22, 2021
b72f9c9
Update todo.txt
APGRoboCop Feb 22, 2021
097bf86
Reduced redundancy
APGRoboCop Aug 5, 2021
b40564d
Modernised code
APGRoboCop Aug 26, 2021
f218dcc
Version Updated
APGRoboCop Dec 18, 2021
9d5807d
Non-static members initialised
APGRoboCop Dec 18, 2021
15fa328
Performance enhancements
APGRoboCop Dec 18, 2021
64f1787
Tiny tweaks
APGRoboCop Dec 19, 2021
163ac16
Neatened the scripts
APGRoboCop Dec 20, 2021
3a472e4
Converting misled doubles into floats
APGRoboCop Feb 25, 2022
7ce1423
Code Modernised
APGRoboCop Mar 1, 2022
53077f7
Update dll.cpp
APGRoboCop Mar 1, 2022
b4997c9
Tiny fixes
APGRoboCop Mar 1, 2022
04772ab
Version 4.0.3-APG ready
APGRoboCop Mar 1, 2022
28cca69
Update todo.txt
APGRoboCop Mar 1, 2022
394559d
Reducing risk bot stuck in a cluster
APGRoboCop Mar 4, 2022
a9c66ea
Fixed CS 1.6 Buy for Five-seveN
APGRoboCop Mar 4, 2022
33f94f6
Reduce chances of using pistols
APGRoboCop Mar 4, 2022
a7a40d0
Altered BuyCode
APGRoboCop Mar 4, 2022
cbfabb1
Experimental changes
APGRoboCop Mar 4, 2022
9299daf
Update todo.txt
APGRoboCop Mar 15, 2022
00f454d
Attempting fixing the Todos
APGRoboCop Apr 2, 2022
c0dc3a8
Experimental tweaks
APGRoboCop Apr 15, 2022
f48a54e
TODO added
APGRoboCop Apr 15, 2022
6fe6e0a
Experiment refactoring and improved IniParser
APGRoboCop Apr 27, 2022
da5ec1b
Update todo.txt
APGRoboCop Apr 27, 2022
cacea18
Experimental additional def/implementations etc.
APGRoboCop Apr 28, 2022
56e1db3
Update NodeMachine.cpp
APGRoboCop Apr 28, 2022
b7cd0f0
Bsp2Rbn experimental proj added
APGRoboCop Apr 30, 2022
df71d29
Adding Experimental DuckJump Node and Func
APGRoboCop May 1, 2022
f4dc0a2
Node boundaries altered
APGRoboCop May 2, 2022
b3ba6e4
Node boundaries readjusted
APGRoboCop May 3, 2022
d1d5090
Update NodeDataTypes.h
APGRoboCop May 3, 2022
f3b2faa
Node boundaries readjusted
APGRoboCop May 4, 2022
52de5f8
Update todo.txt
APGRoboCop May 4, 2022
dddfaa8
Updated Makefile Debug
APGRoboCop May 4, 2022
03e6cd2
Update util.cpp
APGRoboCop May 4, 2022
c2f4f2f
Reverted Node Boundaries
APGRoboCop May 5, 2022
06f30c8
Update build.cpp
APGRoboCop May 5, 2022
4e86ed7
Version 4.0.5beta2 out
APGRoboCop May 5, 2022
58495a5
Merge branch 'master' of https://github.com/APGRoboCop/RealBot
APGRoboCop May 5, 2022
a0339cc
Chat and wonder rate min increased
APGRoboCop May 6, 2022
3a653be
Update NodeDataTypes.h
APGRoboCop May 6, 2022
5d48382
INI and Boundaries readjusted
APGRoboCop May 6, 2022
8f8fa1b
Update NodeDataTypes.h
APGRoboCop May 6, 2022
50b24d4
Todo updated
APGRoboCop May 6, 2022
d316bf5
Bsp2Rbn neatened and adding AMBuild
APGRoboCop May 7, 2022
83b6b3d
VS Project adjusted
APGRoboCop May 7, 2022
528365b
Update Bsp2Rbn.vcxproj
APGRoboCop May 7, 2022
f7ef2bc
Update todo.txt
APGRoboCop May 8, 2022
e5adb90
Version v4.0.5-beta3 out
APGRoboCop May 10, 2022
3700bb4
AMBuild updated
APGRoboCop May 10, 2022
1fbefec
Reverted Node Zone
APGRoboCop Oct 22, 2022
3418f61
Added Chat Delay to prevent chat spam
APGRoboCop Oct 22, 2022
386933c
converting floats
APGRoboCop Oct 22, 2022
bb39de5
Update bot.cpp
APGRoboCop Oct 22, 2022
702f02e
Neatened Scripts
APGRoboCop Oct 23, 2022
43dd9ec
Reducing sizebuf_t crashes
APGRoboCop Nov 2, 2022
b0befcb
Added more delay for bot_cfg_pause_time
APGRoboCop Nov 7, 2022
594c72f
Added delay for respawn_time
APGRoboCop Nov 7, 2022
2d8ac5f
Added sizebuf_t comment
APGRoboCop Nov 7, 2022
acd23e3
AMBuild updated
APGRoboCop Dec 10, 2022
f705c42
Removing old projects
APGRoboCop Dec 10, 2022
2f2bf9f
Updating AMBuildScript
APGRoboCop Jun 4, 2023
ce9bf89
Standard C++ refactoring and small optimisations
APGRoboCop Jul 16, 2023
2f2e279
Using newer C++ Standard functions
APGRoboCop Jul 30, 2023
d8a67cb
Reduced redundancy
APGRoboCop Dec 22, 2023
eb94991
C++ Modernisation
APGRoboCop Dec 25, 2023
8ef8a58
Converting doubles into floats
APGRoboCop Dec 29, 2023
48c1f53
Version 4.0.5-beta4 released
APGRoboCop Feb 19, 2024
30cd4f1
Reducing buffer overflows
APGRoboCop Apr 13, 2024
471f754
Repaired rouge snprintf
APGRoboCop Sep 5, 2024
6a868e8
Using C++ Algorithms and Modern Enums
APGRoboCop Dec 7, 2024
4a804cd
Splitting the NodeMachine implementations
APGRoboCop Dec 9, 2024
f124f08
Experimental fixes to bot's navigation
APGRoboCop Dec 27, 2024
15c5c33
String modernisation
APGRoboCop Mar 27, 2025
b31e679
Update util.cpp
APGRoboCop Mar 27, 2025
b1c1898
More optimisations and modernisations
APGRoboCop Mar 29, 2025
0ff643c
Adding experimental buildPath Function
APGRoboCop Mar 29, 2025
392a3c2
Updated FUNC_FindBreakable
APGRoboCop Mar 29, 2025
499f874
Updating headers for missing functions
APGRoboCop Mar 29, 2025
8e08392
Improved global coding
APGRoboCop Mar 29, 2025
03b4870
Experimental optimisations
APGRoboCop May 22, 2025
edb6da8
Experimental Modernisation
APGRoboCop May 22, 2025
934cee2
Redundant Condition Check in ChatEngine removed
APGRoboCop May 31, 2025
2818764
Improved Conditional Handling
APGRoboCop May 31, 2025
2c1f690
CZ Bots should no longer team attack
APGRoboCop Aug 1, 2025
b9968f2
Updating AMBuild
APGRoboCop Sep 12, 2025
c846b77
Update build.yml
APGRoboCop Sep 12, 2025
37996b3
Update build.yml
APGRoboCop Sep 12, 2025
9b26ec1
Experimental modernisation
APGRoboCop Sep 13, 2025
8e914a3
Small tweaks
APGRoboCop Sep 14, 2025
61264f4
Attempting to enhance Shoot Breakable code
APGRoboCop Sep 18, 2025
6648e67
More attempts to func_breakable code
APGRoboCop Sep 18, 2025
6e58ce0
Neatening code
APGRoboCop Sep 18, 2025
0e2bc06
Enhancing bot's function to attack breakable
APGRoboCop Sep 21, 2025
8b2e4a5
Update todo.txt
APGRoboCop Sep 21, 2025
f3fbabe
Modernising createPath (May need to revert)
APGRoboCop Sep 26, 2025
a44376b
Version 4.0.5-beta released!
APGRoboCop Oct 3, 2025
f6727b0
Update build.cpp
APGRoboCop Oct 3, 2025
7d6e4fc
Adding LTO
APGRoboCop Dec 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Build

on: ["push", "workflow_dispatch"]

jobs:
build_main:
name: Build for ${{ matrix.os_short }}
runs-on: ${{ matrix.os_version }}

# skip build on '[ci skip]'
if: "!contains(github.event.head_commit.message, '[ci skip]')"

strategy:
fail-fast: false
matrix:
os:
- ubuntu-22.04
- windows-x32
include:
- os: ubuntu-22.04
os_short: linux
os_version: ubuntu-22.04
package_ext: tar.gz
dbg_ext: dbg
cc: clang
cxx: clang++
vs_arch: unused
am_arch: x86

- os: windows-x32
os_short: win32
os_version: windows-latest
package_ext: zip
dbg_ext: pdb
cc: not-used
cxx: not-used
vs_arch: x32
am_arch: x86


steps:
- name: Install (Linux)
if: runner.os == 'Linux'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install -y clang g++-multilib
echo "CC=clang" >> $GITHUB_ENV
echo "CXX=clang++" >> $GITHUB_ENV

- name: Add msbuild to PATH (Windows)
if: runner.os == 'Windows'
uses: microsoft/setup-msbuild@v2

- name: Install (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
:: See https://github.com/microsoft/vswhere/wiki/Find-VC
for /f "usebackq delims=*" %%i in (`vswhere -latest -property installationPath`) do (
call "%%i"\Common7\Tools\vsdevcmd.bat -arch=${{ matrix.vs_arch }} -host_arch=x64
)

:: Loop over all environment variables and make them global.
for /f "delims== tokens=1,2" %%a in ('set') do (
echo>>"%GITHUB_ENV%" %%a=%%b
)

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Setup ambuild
run: |
python -m pip install --upgrade pip
python -m pip install wheel
pip install git+https://github.com/alliedmodders/ambuild

- name: Fetch RealBot
uses: actions/checkout@v4
with:
path: realbot
submodules: recursive

- name: Build Files
shell: bash
working-directory: realbot
run: |
mkdir post
cd post

export AM_ARCH=${{ matrix.am_arch }}

python3 ../configure.py --symbol-files --enable-optimize

ambuild

- uses: benjlevesque/short-sha@v2.2
id: short-sha

- name: Upload Binary
uses: actions/upload-artifact@v4
with:
name: realbot-${{ matrix.os_short }}-${{ steps.short-sha.outputs.sha }}
path: |
realbot/post/*

- name: Upload Debug Symbols
uses: actions/upload-artifact@v4
with:
name: realbot-dbgsym-${{ matrix.os_short }}-${{ steps.short-sha.outputs.sha }}
path: |
realbot/post/**/*.${{ matrix.dbg_ext }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
x64/
x86/
build/
build_linux/
bld/
[Bb]in/
[Oo]bj/
Expand Down Expand Up @@ -216,3 +217,5 @@ CMakeLists.txt
cmake-build-debug/

*.o
realbot_mm.so
apg-load
161 changes: 161 additions & 0 deletions AMBuildScript
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
# AMBuildScript for RealBot, written by Anonymous Player
# vim: set sts=4 ts=8 sw=4 tw=99 et ft=python:
import os, sys

builder.cxx = builder.DetectCxx(target_arch = 'x86')

# Include search paths
include_paths = [
os.path.join(builder.currentSourcePath, 'dependencies', 'metamod-hl1', 'metamod'),
os.path.join(builder.currentSourcePath, 'dependencies', 'hlsdk', 'common'),
os.path.join(builder.currentSourcePath, 'dependencies', 'hlsdk', 'public'),
os.path.join(builder.currentSourcePath, 'dependencies', 'hlsdk', 'dlls'),
os.path.join(builder.currentSourcePath, 'dependencies', 'hlsdk', 'engine'),
os.path.join(builder.currentSourcePath, 'dependencies', 'hlsdk', 'game_shared'),
os.path.join(builder.currentSourcePath, 'dependencies', 'hlsdk', 'pm_shared'),
]

# Compiler setup
builder.cxx.defines += [
'HAVE_STDINT_H',
]

if builder.cxx.like('gcc'):
builder.cxx.defines += [
'stricmp=strcasecmp',
'strcmpi=strcasecmp'
]

builder.cxx.c_only_flags += ['-std=gnu99']
if builder.cxx.target.platform == 'linux':
# Linux defines
builder.cxx.defines += ['_LINUX', 'POSIX', 'LINUX', 'linux']
# Linux compiler C flags
builder.cxx.cflags += [
'-mtune=generic',
'-pipe',
'-fPIC',
'-msse4.2',
'-mfpmath=sse',
'-fno-strict-aliasing',
'-Wall',
'-Werror',
'-Wno-uninitialized',
'-Wno-unused',
'-Wno-switch',
'-Wno-format',
'-Wno-format-security',
'-Wno-unknown-attributes',
'-Wno-logical-op-parentheses',
'-Wno-return-stack-address',
'-m32',
]
# Linux compiler C++ flags
builder.cxx.cxxflags += [
'-Wno-invalid-offsetof',
'-Wno-write-strings',
'-std=c++17',
]
# Linux linker flags
builder.cxx.linkflags += ['-m32', '-ldl', '-lm', '-flto']
elif builder.cxx.target.platform == 'windows':
# Windows defines
builder.cxx.defines += [
'_CRT_SECURE_NO_DEPRECATE',
'_CRT_SECURE_NO_WARNINGS',
'_CRT_NONSTDC_NO_DEPRECATE',
'NOMINMAX',
'WIN32',
'_WINDOWS'
]
# Windows compiler C flags
builder.cxx.cflags += []
# Windows compiler C++ flags
builder.cxx.cxxflags += [
'/std:c++17',
'/arch:SSE2',
'/fp:precise',
'/Qspectre',
'/EHsc'
]
# Windows linker flags
builder.cxx.linkflags += [
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
'/SECTION:.data,RW',
'/MACHINE:X86'
]

# Compiler options for optimization ( --enable-optimize )
if builder.options.optimize:
# Shared optimization definitions
builder.cxx.defines += ['NDEBUG']
if builder.cxx.target.platform == 'linux':
# Linux optimization flags
builder.cxx.cflags += ['-O3']
# Linux optimization link flags #TODO
#builder.cxx.linkflags += ['-flto']
elif builder.cxx.target.platform == 'windows':
# Windows optimization flags - /Ob3 needs to be after /Ox, enables aggressive function inling -caxanga334
builder.cxx.cflags += ['/Ox', '/Zo', '/Ob3', '/GL']
# Windows optimization link flags
builder.cxx.linkflags += ['/OPT:ICF', '/OPT:REF', '/LTCG']
# This needs to be after our optimization flags which could otherwise disable it.
builder.cxx.cflags += ['/Oy-']

# Compiler options for debugging ( --enable-debug )
if builder.options.debug:
# Shared debug definitions
builder.cxx.defines += ['DEBUG', '_DEBUG']
if builder.cxx.target.platform == 'linux':
# Linux debug flags
builder.cxx.cflags += ['-g3', '-Og', '-ggdb3']
elif builder.cxx.target.platform == 'windows':
# Windows debug flags
builder.cxx.cflags += ['/Od', '/RTC1', '/MTd']
# Windows debug link flags
builder.cxx.linkflags += ['/NODEFAULTLIB:libcmt']

# Handle --enable-static-lib and --enable-shared-lib
if builder.cxx.target.platform == 'linux':
if builder.options.staticlib == '1':
builder.cxx.linkflags += [
'-static-libgcc',
'-static-libstdc++'
]
elif builder.options.sharedlib == '1':
builder.cxx.linkflags += [
'-shared-libgcc',
]

library = builder.cxx.Library('realbot_mm')

library.compiler.includes += include_paths

library.sources += [
'bot.cpp',
'bot_buycode.cpp',
'bot_client.cpp',
'bot_func.cpp',
'bot_navigate.cpp',
'build.cpp',
'ChatEngine.cpp',
'dll.cpp',
'engine.cpp',
'game.cpp',
'IniParser.cpp',
'NodeMachine.cpp',
'util.cpp',
]

#builder.RunBuildScripts(
# [
# 'Bsp2Rbn/AMBuilder',
# ],
# #{ 'AMXX': AMXX }
#)

#
# Run scripts, add binaries
#

builder.Add(library)
24 changes: 24 additions & 0 deletions Bsp2Rbn/AMBuilder
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# vim: set sts=2 ts=8 sw=2 tw=99 et ft=python:
import os.path

#binary = AMXX.MetaModule(builder, 'bsp2rbn')

binary.sources = [
'../../public/sdk/amxxmodule.cpp',
'CRank.cpp',
'CMisc.cpp',
'NBase.cpp',
'NRank.cpp',
'usermsg.cpp',
'Utils.cpp',
'moduleconfig.cpp',
]

if builder.target_platform == 'windows':
#binary.sources += ['version.rc']
binary.compiler.linkflags += [
'/EXPORT:GiveFnptrsToDll=_GiveFnptrsToDll@8,@1',
'/SECTION:.data,RW',
]

##AMXX.modules += [builder.Add(binary)]
31 changes: 31 additions & 0 deletions Bsp2Rbn/Bsp2Rbn.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32414.318
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Bsp2Rbn", "Bsp2Rbn.vcxproj", "{85813A68-52FB-4F75-91BA-DD3B6C50FD68}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Debug|x64.ActiveCfg = Debug|x64
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Debug|x64.Build.0 = Debug|x64
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Debug|x86.ActiveCfg = Debug|Win32
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Debug|x86.Build.0 = Debug|Win32
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Release|x64.ActiveCfg = Release|x64
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Release|x64.Build.0 = Release|x64
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Release|x86.ActiveCfg = Release|Win32
{85813A68-52FB-4F75-91BA-DD3B6C50FD68}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {E7378DCB-1E54-43A4-B950-59F6E738F898}
EndGlobalSection
EndGlobal
Loading