Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
92d04ab
Added cl_hide_center_messages, moved custom viewmodel pointers below …
SmileyAG Jan 7, 2022
9fe60e5
Register showtriggers as client command (#153)
SmileyAG Jan 30, 2022
e5bea9e
Strafing HUD (#149)
Schlufi Jan 30, 2022
c139703
CI: Specify windows-2019
YaLTeR Feb 18, 2022
070cad9
Added r_drawentities 5 for hardware rendering
SmileyAG Feb 17, 2022
256588c
CI: Remove intermediate compiler version tests
YaLTeR Feb 24, 2022
ddb0032
Ducktap fix (#155)
yhoiluhi Feb 25, 2022
d013b41
Added cl_team_sounds_volume (#158)
chinese-soup Mar 12, 2022
b997b80
Added cl_killsound & cl_killsound_path & hud_saytext_sound_path (#157)
SmileyAG Apr 5, 2022
eb4d471
discord: hardcode hl1_bhop maps without a beta prefix for thumbnails
SmileyAG Apr 5, 2022
d15e427
discord: hardcode e1m1 too D
SmileyAG Apr 5, 2022
44fcb20
CI improvements
Margen67 Oct 16, 2021
e560896
Remove Travis
Margen67 Apr 6, 2022
679f146
RPC: Always convert current map name to lowercase for thumbnails (#164)
SmileyAG Apr 14, 2022
173ebd4
StudioModelRenderer: Move new methods to end of virtual table
UnkwUsr Mar 20, 2022
75bff14
flatpak: Update runtime version
YaLTeR May 22, 2022
502f5d2
flatpak: Set empty finish-args
YaLTeR May 22, 2022
2252a44
SayText: Add cvar to disable rainbow color
tmp64 Aug 16, 2022
b1d3f55
Added cl_hide_other_players
chinese-soup Oct 12, 2022
3286fe3
CustomTimer: Use float time instead of decimal
SmileyAG Oct 3, 2022
8eb1d98
Make name/team change and game leave messages ignorable
fireblizzard Dec 24, 2022
76b33bf
CI: Update to ubuntu-20.04
YaLTeR May 2, 2023
78fac3a
CI: Fix mistakes
YaLTeR May 2, 2023
27e7143
Make hud_saytext draw even when hud_draw is 0
SmileyAG Dec 9, 2022
28878c2
Make sure the client is linked to libSDL2
FreeSlave Dec 19, 2023
f57684c
Removed DMC and Ricochet files
SmileyAG Dec 9, 2022
314c882
Don't lookup cvars via CVAR_GET_ macro to save performance
SmileyAG Dec 9, 2022
5b0b52d
Added hashedcdkey and m_nSteamID variables at the end of player_info_t
SmileyAG Dec 8, 2023
6c75ed8
Matched structs in com_model.h with hardware and software engine vers…
SmileyAG Dec 8, 2023
87ee37d
Commented new variable at end of msurface_t struct that got added wit…
SmileyAG Dec 8, 2023
ad29114
Added undocumented functions at the end of cl_enginefunc_t and engine…
SmileyAG Dec 9, 2023
c206831
Added commented code for initialize the old MOTD implementation and f…
SmileyAG Dec 12, 2023
84c813d
Moved some of cvar declarations to corresponding classes for them at …
SmileyAG Dec 14, 2023
4ad5b2f
Added cmd_function_t structure
SmileyAG Dec 23, 2023
0ad666a
Make a new list for hardcoded map series in Discord RPC module and fi…
SmileyAG Dec 30, 2023
7c35c77
Added cl_show_server_triggers_* cvars (related to plugin PR) (#183)
SmileyAG Dec 31, 2023
1b33f0b
Add hud_watermark command (#191)
sabianroberts Nov 14, 2024
ecd3d83
update ci (#192)
larziwau Nov 24, 2024
d824a04
CI: Bump to ubuntu-22.04
YaLTeR Jun 1, 2025
05b0e09
CI: Update compiler versions
YaLTeR Jun 1, 2025
7e1e799
CI: Downgrade clang to 15
YaLTeR Jun 1, 2025
83e8d91
Remove XP build from Continuous Integration workflow (#205)
sabianroberts Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
55 changes: 35 additions & 20 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,20 @@ name: CI
on:
push:
paths-ignore:
- '.gitattributes'
- '.github/*'
- '.github/*_TEMPLATE/**'
- '.gitignore'
- '*.bat'
- '*.yml'
- '*.md'
- 'LICENSE*'
pull_request:
paths-ignore:
- '.gitattributes'
- '.github/*'
- '.github/*_TEMPLATE/**'
- '.gitignore'
- '*.bat'
- '*.yml'
- '*.md'
Expand All @@ -23,87 +27,98 @@ on:

jobs:
build-windows:
runs-on: windows-latest
name: Build (Windows, ${{ matrix.config.toolset }}, ${{ matrix.configuration }})
runs-on: ${{ matrix.config.runs-on }}
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
toolset: [v141_xp, v141, v142]
config:
- { runs-on: windows-2022, toolset: v143 }
configuration: [Release, Debug]
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: CMake generate
run: cmake -T ${{ matrix.toolset }} -A Win32 -B build
run: cmake -T ${{ matrix.config.toolset }} -A Win32 -B build

- name: Build
run: cmake --build build -j $env:NUMBER_OF_PROCESSORS --config ${{ matrix.configuration }}
- uses: actions/upload-artifact@v2
if: matrix.toolset == 'v141_xp'

- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: openag-${{ runner.os }}-${{ matrix.configuration }}
path: build\${{ matrix.configuration }}\client.dll
if-no-files-found: error

build-linux-gcc:
name: build-linux (gcc-${{ matrix.gcc-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-18.04
name: Build (Linux, gcc-${{ matrix.gcc-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
gcc-ver: [6, 7, 8, 9, 10, 11]
gcc-ver: [9, 12]
configuration: [Release, Debug]
env:
CC: gcc-${{ matrix.gcc-ver }}
CXX: g++-${{ matrix.gcc-ver }}
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -y g++-${{ matrix.gcc-ver }}-multilib libgl-dev ninja-build rapidjson-dev

- name: CMake generate
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -B build

- name: Build
working-directory: build
run: ninja
- uses: actions/upload-artifact@v2

- name: Upload build artifact
uses: actions/upload-artifact@v4
if: matrix.gcc-ver == '11'
with:
name: openag-${{ runner.os }}-${{ matrix.configuration }}
path: build/client.so
if-no-files-found: error

build-linux-clang:
name: build-linux (clang-${{ matrix.clang-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-18.04
name: Build (Linux, clang-${{ matrix.clang-ver }}, ${{ matrix.configuration }})
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
clang-ver: [3.9, '4.0', '5.0', '6.0', 7, 8, 9, 10, 11, 12] # #.0 is interpreted as integer without quotation marks
clang-ver: [11, 15]
configuration: [Release, Debug]
env:
CC: clang-${{ matrix.clang-ver }}
CXX: clang++-${{ matrix.clang-ver }}
steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup
run: |
if [ '${{ matrix.clang-ver }}' -ge '11' ]; then
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-11 main'
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-12 main'
fi
sudo apt-get update
sudo apt-get install -y clang-${{ matrix.clang-ver }} g++-multilib libgl-dev ninja-build rapidjson-dev

- name: CMake generate
run: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -B build

- name: Build
working-directory: build
run: ninja
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,15 @@ elseif(UNIX)
# I wasn't able to do this in any other way.
# Things like imported targets result in linking with relative path.
set(VGUI_LINK_FLAGS "-L${CMAKE_SOURCE_DIR}/linux/release -l:vgui.so")
set(SDL2_LINK_FLAGS "-L${CMAKE_SOURCE_DIR}/linux -lSDL2")

# --push-state isn't supported on older compilers. I tried checking for support
# using CheckCXXCompilerFlag and CheckCXXSourceCompiles, but they were reporting
# success on Travis while the flag was still giving an error. Thus, I will set
# --no-as-needed for all compilers.
set(VGUI_LINK_FLAGS "-Wl,--no-as-needed ${VGUI_LINK_FLAGS}")

set_property(TARGET client PROPERTY LINK_FLAGS ${VGUI_LINK_FLAGS})
set_property(TARGET client PROPERTY LINK_FLAGS "${VGUI_LINK_FLAGS} ${SDL2_LINK_FLAGS}")
endif(APPLE)
endif(WIN32)

Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
OpenAG
======================
[![Build Status](https://github.com/YaLTeR/OpenAG/workflows/CI/badge.svg?branch=master)](https://github.com/YaLTeR/OpenAG/actions?query=branch:master)
[![Build Status](https://travis-ci.org/YaLTeR/OpenAG.svg?branch=master)](https://travis-ci.org/YaLTeR/OpenAG)
[![Chat on Discord](https://discordapp.com/api/guilds/252168904359542784/widget.png)](https://discord.gg/jCYhYNH)

OpenAG is an open-source client of the Half-Life promod Adrenaline Gamer, completely rewritten from scratch on latest Half-Life SDK. It adds new features, bugfixes and other tweaks over the original mod, while maintaining the ability to play on all currently existing servers.
Expand Down
3 changes: 2 additions & 1 deletion build-aux/flatpak/pro.openag.OpenAG.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"app-id": "pro.openag.OpenAG",
"runtime": "org.freedesktop.Sdk",
"runtime-version": "19.08",
"runtime-version": "21.08",
"command": "",
"sdk": "org.freedesktop.Sdk",
"sdk-extensions": [
"org.freedesktop.Sdk.Compat.i386",
"org.freedesktop.Sdk.Extension.toolchain-i386"
],
"finish-args": [],
"build-options": {
"append-path": "/usr/lib/sdk/toolchain-i386/bin",
"env": {
Expand Down
3 changes: 3 additions & 0 deletions cl_dll/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ add_sources(
hud_spectator.h
hud_speedometer.cpp
hud_speedometer.h
hud_strafeguide.cpp
hud_strafeguide.h
hud_suddendeath.cpp
hud_suddendeath.h
hud_timeout.cpp
Expand All @@ -93,6 +95,7 @@ add_sources(
kbutton.h
menu.cpp
message.cpp
# MOTD.cpp
rainbow.cpp
rainbow.h
saytext.cpp
Expand Down
7 changes: 4 additions & 3 deletions cl_dll/MOTD.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ int CHudMOTD :: Init( void )

// HOOK_MESSAGE( MOTD );

CVAR_CREATE( "motd_display_time", "15", 0 );
motd_display_time = CVAR_CREATE( "motd_display_time", "15", 0 );

m_iFlags &= ~HUD_ACTIVE; // start out inactive
m_szMOTD[0] = 0;
Expand Down Expand Up @@ -95,7 +95,8 @@ int CHudMOTD :: Draw( float fTime )
while ( *ch )
{
int line_length = 0; // count the length of the current line
for ( char *next_line = ch; *next_line != '\n' && *next_line != 0; next_line++ )
char *next_line;
for ( next_line = ch; *next_line != '\n' && *next_line != 0; next_line++ )
line_length += gHUD.m_scrinfo.charWidths[ *next_line ];
char *top = next_line;
if ( *top == '\n' )
Expand Down Expand Up @@ -139,7 +140,7 @@ int CHudMOTD :: MsgFunc_MOTD( const char *pszName, int iSize, void *pbuf )
{
m_iFlags |= HUD_ACTIVE;

MOTD_DISPLAY_TIME = max( 10, CVAR_GET_FLOAT( "motd_display_time" ) );
MOTD_DISPLAY_TIME = max( 10, motd_display_time->value );

m_flActiveRemaining = MOTD_DISPLAY_TIME;

Expand Down
5 changes: 5 additions & 0 deletions cl_dll/StudioModelRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2225,6 +2225,11 @@ void CStudioModelRenderer::StudioRenderFinal_Hardware( void )
gEngfuncs.pTriAPI->RenderMode( kRenderNormal );
}

if ( m_pCvarDrawEntities->value == 5 )
{
IEngineStudio.StudioDrawAbsBBox( );
}

IEngineStudio.RestoreRenderer();
}

Expand Down
33 changes: 17 additions & 16 deletions cl_dll/StudioModelRenderer.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//========= Copyright 1996-2002, Valve LLC, All rights reserved. ============
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
//
// Purpose:
//
Expand Down Expand Up @@ -32,9 +32,6 @@ class CStudioModelRenderer
virtual int StudioDrawModel ( int flags );
virtual int StudioDrawPlayer ( int flags, struct entity_state_s *pplayer );

private:
virtual model_t* GetPlayerModel(int player_index);

public:
// Local interfaces
//
Expand All @@ -50,12 +47,6 @@ class CStudioModelRenderer

// Find final attachment points
virtual void StudioCalcAttachments ( void );

// Returns whether StudioAdjustViewmodelAttachments needs to be called for the viewmodel
virtual bool NeedAdjustViewmodelAdjustments();

// Reprojects attachments of the viewmodel if FOV is changed
virtual void StudioAdjustViewmodelAttachments(Vector &vOrigin);

// Save bone matrices and names
virtual void StudioSaveBones( void );
Expand Down Expand Up @@ -110,6 +101,15 @@ class CStudioModelRenderer
// Calculate the viewmodel fov and set the OpenGL projection matrix
virtual void SetViewmodelFovProjection ( void );

// Returns whether StudioAdjustViewmodelAttachments needs to be called for the viewmodel
virtual bool NeedAdjustViewmodelAdjustments();

// Reprojects attachments of the viewmodel if FOV is changed
virtual void StudioAdjustViewmodelAttachments(Vector &vOrigin);

private:
virtual model_t* GetPlayerModel(int player_index);

public:

// Client clock
Expand All @@ -133,12 +133,6 @@ class CStudioModelRenderer
cvar_t *m_pCvarDeveloper;
// Draw entities bone hit boxes, etc?
cvar_t *m_pCvarDrawEntities;
// Change viewmodel FOV
cvar_t *m_pCvarViewmodelFov;
// Disable viewmodel idle/fidget animations on viewmodels
cvar_t *m_pCvarViewmodelNoIdle;
// Disable viewmodel draw/holster/deploy animations on viewmodels
cvar_t *m_pCvarViewmodelNoEquip;
// The entity which we are currently rendering.
cl_entity_t *m_pCurrentEntity;

Expand Down Expand Up @@ -201,6 +195,13 @@ class CStudioModelRenderer
// Concatenated bone and light transforms
float (*m_pbonetransform) [ MAXSTUDIOBONES ][ 3 ][ 4 ];
float (*m_plighttransform)[ MAXSTUDIOBONES ][ 3 ][ 4 ];

// Change viewmodel FOV
cvar_t *m_pCvarViewmodelFov;
// Disable viewmodel idle/fidget animations on viewmodels
cvar_t *m_pCvarViewmodelNoIdle;
// Disable viewmodel draw/holster/deploy animations on viewmodels
cvar_t *m_pCvarViewmodelNoEquip;
};

#endif // STUDIOMODELRENDERER_H
6 changes: 3 additions & 3 deletions cl_dll/ammo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,8 +287,8 @@ int CHudAmmo::Init(void)

Reset();

CVAR_CREATE( "hud_drawhistory_time", HISTORY_DRAW_TIME, FCVAR_ARCHIVE );
CVAR_CREATE( "hud_fastswitch", "0", FCVAR_ARCHIVE ); // controls whether or not weapons can be selected in one keypress
gHUD.hud_drawhistory_time = CVAR_CREATE( "hud_drawhistory_time", HISTORY_DRAW_TIME, FCVAR_ARCHIVE );
gHUD.hud_fastswitch = CVAR_CREATE( "hud_fastswitch", "0", FCVAR_ARCHIVE ); // controls whether or not weapons can be selected in one keypress

hud_weapon = CVAR_CREATE("hud_weapon", 0, FCVAR_ARCHIVE);

Expand Down Expand Up @@ -436,7 +436,7 @@ void WeaponsResource :: SelectSlot( int iSlot, int fAdvance, int iDirection )
return;

WEAPON *p = NULL;
bool fastSwitch = CVAR_GET_FLOAT( "hud_fastswitch" ) != 0;
bool fastSwitch = gHUD.hud_fastswitch->value != 0;

if ( (gpActiveSel == NULL) || (gpActiveSel == (WEAPON *)1) || (iSlot != gpActiveSel->iSlot) )
{
Expand Down
4 changes: 2 additions & 2 deletions cl_dll/ammohistory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void HistoryResource :: AddToHistory( int iType, int iId, int iCount )
}

HIST_ITEM *freeslot = &rgAmmoHistory[iCurrentHistorySlot++]; // default to just writing to the first slot
HISTORY_DRAW_TIME = CVAR_GET_FLOAT( "hud_drawhistory_time" );
HISTORY_DRAW_TIME = gHUD.hud_drawhistory_time->value;

freeslot->type = iType;
freeslot->iId = iId;
Expand Down Expand Up @@ -86,7 +86,7 @@ void HistoryResource :: AddToHistory( int iType, const char *szName, int iCount
freeslot->type = iType;
freeslot->iCount = iCount;

HISTORY_DRAW_TIME = CVAR_GET_FLOAT( "hud_drawhistory_time" );
HISTORY_DRAW_TIME = gHUD.hud_drawhistory_time->value;
freeslot->DisplayTime = gHUD.m_flTime + HISTORY_DRAW_TIME;
}

Expand Down
2 changes: 2 additions & 0 deletions cl_dll/cdll_int.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@ int CL_DLLEXPORT HUD_VidInit( void )

VGui_Startup();

gHUD.white_sprite = gEngfuncs.pfnSPR_Load("sprites/white.spr");

return 1;
}

Expand Down
9 changes: 9 additions & 0 deletions cl_dll/cl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ static size_t get_player_count()
return player_count;
}

inline void convert_to_lower_case(const char *str)
{
unsigned char *str_lw = (unsigned char *)str;
while (*str_lw) {
*str_lw = tolower(*str_lw);
str_lw++;
}
}

inline client_textmessage_t *TextMessageGet( const char *pName ) { return gEngfuncs.pfnTextMessageGet( pName ); }
inline int TextMessageDrawChar( int x, int y, int number, int r, int g, int b )
{
Expand Down
Loading