Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
110 commits
Select commit Hold shift + click to select a range
36b9f13
Add engine functions documentation by Solokiller
fireblizzard Jun 5, 2021
23bd68b
Add fps limiter + Refactor commands/votes
fireblizzard Jun 19, 2021
6d88385
Remove hardcoded admin
fireblizzard Jun 19, 2021
dd008ab
Remove questionable command
fireblizzard Jun 19, 2021
e2c89d9
Disable fps limiter by default
fireblizzard Jun 19, 2021
5cd6eaf
Add cvar to auto skip intermission
fireblizzard Jun 19, 2021
cae3d84
Remove unused cvar allow_spectators
fireblizzard Jun 19, 2021
30838dc
Add fps limit commands to aglistvotes
fireblizzard Jun 20, 2021
6809801
Tell the min/max timelimit upon failing to vote
fireblizzard Jun 20, 2021
bfa430f
Add votes for extending timelimit
fireblizzard Jun 20, 2021
7a75c8b
Avoid extending timelimit too quickly
fireblizzard Jun 20, 2021
cdcbe54
Fix mp_intermission_skip_auto 1 and 2 being swapped
fireblizzard Jun 20, 2021
6103b67
Fixed mangled game description
chinese-soup Jun 30, 2021
5f1b920
Merge pull request #4 from chinese-soup/fixed_mangled_game_desc
fireblizzard Jun 30, 2021
bcc6856
Fix crash fps limiter crash with bots
fireblizzard Jun 30, 2021
6d893bb
Fix crash with model names
fireblizzard Jun 30, 2021
5f3fd68
Fix player's name not appearing on team join
fireblizzard Jun 30, 2021
f6424f4
Make CTF/DOM gamemode autoswitch depend on cvar
fireblizzard Jul 1, 2021
4f66444
Fixes #5 (players appearing as if they were in the match)
fireblizzard Jul 7, 2021
cfa939a
Fixed cvar query response spam
chinese-soup Jul 7, 2021
e595ada
Fix typo, rename cvar ag_fps_limit_auto_check_interval -> ag_fps_limi…
chinese-soup Jul 8, 2021
99f8d88
Add satchel destructibility and solidity settings
fireblizzard Nov 22, 2021
e908328
Add a setting for bots not to count towards votes
fireblizzard Nov 23, 2021
468e497
Changing team during a match triggers a suicide
fireblizzard Nov 23, 2021
024a31c
Added GitHub Actions CI (#7)
SmileyAG Nov 25, 2021
2f2f185
"Squeak Grenade Lastinv" server crash fix (#8)
ScriptedSnark Nov 26, 2021
9039a91
Add damage and spawn messages for bots
fireblizzard Nov 28, 2021
811ee2f
Change cvar name to singular
fireblizzard Nov 28, 2021
5c604f6
Implement static bots that respawn upon death
fireblizzard Nov 28, 2021
e6b0f7b
Add flood control for name/model changes
fireblizzard Nov 28, 2021
f11a69f
Implement flood cache for name/model changes
fireblizzard Nov 29, 2021
b72b4c9
Fix bot limit message
fireblizzard Nov 29, 2021
c4dd964
Merge branch 'master' of https://github.com/fireblizzard/agmod into m…
fireblizzard Nov 29, 2021
22d2f7a
Made agforceteamup and agforcespectator votable
fireblizzard Dec 8, 2021
7e16b8e
Classify name/team change and game leave messages
fireblizzard Dec 8, 2021
c4afbd4
Make spawnbot choose opposite team to caller
fireblizzard Dec 8, 2021
63c14cf
Enforce model or spec for a while
fireblizzard Dec 9, 2021
bd65b21
Fix player-targeting votes not working when name is changed
fireblizzard Dec 10, 2021
43b96ee
Allow for longer gamemode config names
fireblizzard Dec 10, 2021
a43d615
Add a cvar to force clients to record matches
fireblizzard Dec 12, 2021
cad5379
Fixed ammo counter reset when starting a demo record (#9)
SmileyAG Dec 12, 2021
95acef6
Increase MOTD max length
fireblizzard Dec 13, 2021
fb6b0c4
Implement muting capabilities during matches
fireblizzard Dec 14, 2021
f5b54fa
Allow adding bots during a match on listenserver
fireblizzard Dec 14, 2021
236d065
Fix corpses' animation not finishing
fireblizzard Dec 14, 2021
25b1253
Add missing changes about match muting
fireblizzard Dec 15, 2021
f757407
Make respawn time FPS-independent + Fix mp_forcerespawn
fireblizzard Dec 15, 2021
2ae14bc
Add an option to ignore all selfgauss
fireblizzard Dec 19, 2021
49c2c2a
Add a cvar to only allow match players to vote
fireblizzard Dec 19, 2021
c8499c2
Match target player by partial name in votes
fireblizzard Dec 19, 2021
827dacd
Rename cvar to singular
fireblizzard Dec 19, 2021
989b156
Fix forcespec'd players being able to play a match
fireblizzard Dec 19, 2021
71dbfe2
CVar overhaul
fireblizzard Jan 1, 2022
7a4e89e
Small refactor
fireblizzard Jan 1, 2022
acfd52d
Add `agdefault` vote to reset cvars
fireblizzard Jan 1, 2022
f27cd84
Sanity checks for targeted votes
fireblizzard Jan 2, 2022
8241b5b
Fix some cvars not being votable
fireblizzard Jan 2, 2022
4b7ebc1
Implement nuke blocking capabilities
fireblizzard Jan 3, 2022
67926c3
Warn about cvars' dirty state on agstart
fireblizzard Jan 3, 2022
cf78f3b
Add dirty state indicator to game name
fireblizzard Jan 3, 2022
a7bdb69
Add a speedrun mode for fraglimited games
fireblizzard Jan 3, 2022
2207015
Make team change penalty customizable
fireblizzard Jan 3, 2022
1a656d2
Remove unused stuff
fireblizzard Jan 3, 2022
233fec1
Allow for longer cvars to be voted
fireblizzard Jan 3, 2022
627ad8b
Add spawn seeding + some cleanup
fireblizzard Jan 4, 2022
1d278a6
Make spawn-related cvars belong to gamemode
fireblizzard Jan 4, 2022
da3c7d3
Make countdown votable
fireblizzard Jan 5, 2022
c99d75e
Merged last bits of missing original code
fireblizzard Jan 5, 2022
ac3b447
Reflect real value in countdown cvar when clamped
fireblizzard Jan 5, 2022
597f8b0
Stop showing unknown command when dropping weapons
fireblizzard Jan 5, 2022
5530bba
Add cvar logging options
fireblizzard Jan 16, 2022
7aba373
Make gauss/rpg fix cvars gamemode-related
fireblizzard Jan 16, 2022
6ae29d2
Fix mp_timelimit and mp_fraglimit vote messages
fireblizzard Jan 16, 2022
c5337e5
Fix being able to "vote" a cvar without value
fireblizzard Jan 16, 2022
7bb37d4
Rename AgLog to AgLogError
fireblizzard Jan 16, 2022
c0b2322
Make `gamemodevars` return cvars in order
fireblizzard Jan 16, 2022
5d2a4eb
Cvar code cleanup + sanity checks
fireblizzard Jan 16, 2022
176ff7a
Tell spawn seed at the end when speedrunning
fireblizzard Jan 16, 2022
d87ec5c
Log ServerMessage
fireblizzard Jan 16, 2022
aa6e2cd
Add speedrunning stats for singleplayer
fireblizzard Jan 22, 2022
60d63f1
Fix tripmine beam position when spawning out of PVS
fireblizzard Jan 22, 2022
9e8bdb1
Restore bhopcap state on singleplayer
fireblizzard Jan 22, 2022
f71fcd5
Add a way to move freely during changelevel delay
fireblizzard Jan 22, 2022
bb88787
Add unlimited uranium mode for Gauss% runs or gamemodes
fireblizzard Jan 23, 2022
418eebd
Add self-damage customization votable cvars
fireblizzard Jan 23, 2022
96b2d66
Make sv_ag_start_* cvars affect singleplayer
fireblizzard Jan 23, 2022
fc416df
Handle player weaponstrip in Gauss%
fireblizzard Jan 23, 2022
d2917fa
Make sys_timescale usable
fireblizzard Jan 23, 2022
7a688e2
Fix getting full damageboost when losing all armor
fireblizzard Jan 24, 2022
ff4c725
Fix godmode broken by some new cvars
fireblizzard Jan 24, 2022
0e58a46
Fix sv_cheats not working until map load
fireblizzard Jan 24, 2022
b9e1147
Fix some crashes in singleplayer
fireblizzard Jan 25, 2022
bb64254
Add a cvar to print changelevel in chat
fireblizzard Jan 29, 2022
07739da
Add line break only if it's not there
fireblizzard Jan 30, 2022
afed3d2
Try to unstuck after changelevel trigger
fireblizzard Jan 30, 2022
acecc65
Game duration formatting refactor
fireblizzard Mar 19, 2022
5928959
Stop messing with other bots
fireblizzard Mar 19, 2022
c008deb
Fix NPCs not opening doors on saveload
fireblizzard Sep 24, 2022
a2bd50d
Don't allow to use "follownext" if we not in spectator mode
SmileyAG Sep 30, 2022
56b1a10
Add missing sanity checks for spectator commands
fireblizzard Nov 5, 2022
42956ce
windows-2019, update checkout & artifacts version (#16)
SmileyAG Nov 5, 2022
575b793
Fix bad include
fireblizzard Nov 5, 2022
76bc0e5
Refactor console printing
fireblizzard Nov 6, 2022
90e7e35
Don't allow to use entities if player not spawned (#12)
SmileyAG Nov 6, 2022
ca9b041
Added spawnflags for keep player angles & velocity in trigger_telepor…
SmileyAG Nov 6, 2022
2665df6
Fix sv_ag_gamemode_auto not working
fireblizzard Nov 13, 2022
d6d2672
Update singleplayer notes
fireblizzard Nov 15, 2022
175653f
Soften spawn blocking criteria
fireblizzard Sep 11, 2023
a9684d5
Lower the minimum countdown time
fireblizzard Sep 11, 2023
bf06e4f
Set some properties for the VS project
fireblizzard Sep 15, 2023
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
48 changes: 48 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Monthly

jobs:
linux:
name: Linux-x86
runs-on: ubuntu-latest
env:
CONFIGURATION: release
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Update system
run: sudo apt update
- name: Install G++ (multilib)
run: sudo apt install -y g++-multilib
- name: Build
run: cd linux && CFG=release make
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: Linux-x86
path: |
linux/release/ag.so
linux/release/ag.so.dbg
win32:
name: Win32
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@v1.0.3
- name: Build
run: MSBuild.exe projects/vs2019/projects.sln /p:Configuration=Release /p:Platform=Win32
- name: Deploy
uses: actions/upload-artifact@v3
with:
name: Win32
path: |
projects/vs2019/Release/agdll/ag.dll
projects/vs2019/Release/agdll/ag.pdb
6 changes: 5 additions & 1 deletion SINGLEPLAYER.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ which is automatically executed right before the first map loads, thus you don't
Singleplayer in AG has some quirks. It uses most of the multiplayer features, like vertical gauss boosting, constant 10hp falldamage...
and some more stuff not related to multiplayer, like dead corpses being non-solid, fixes for some common crashes... you can find the changes below.

If you want to run the AG% speedrunning category, there's this [AG speedrunning package](https://drive.google.com/open?id=1hSErqgUqDmbJCYJZLAHsrfC6NziW1494) that includes some fixes to the HL1 campaign maps to make them more compatible with AG and have nicer speedruns. You need AG installed, and then replace the files in your installation with the ones from the package, but make sure you backup your files just in case. You'll also need to inject the BunnymodXT included in the speedrunning package (backup your current one or put this somewhere else), which is not
_TO DO: Update the AG speedrunning package_

If you want to run the AG% speedrunning category, there's this [(OUTDATED) AG speedrunning package](https://drive.google.com/open?id=1hSErqgUqDmbJCYJZLAHsrfC6NziW1494) that includes some fixes to the HL1 campaign maps to make them more compatible with AG and have nicer speedruns. You need AG installed, and then replace the files in your installation with the ones from the package, but make sure you backup your files just in case. You'll also need to inject the BunnymodXT included in the speedrunning package (backup your current one or put this somewhere else), which is not
merged yet with the [official BunnymodXT](https://github.com/YaLTeR/BunnymodXT), but it will be in the future after more testing and some fixes that are pending (e.g.: `bxt_autopause` not working on AG apparently).
You inject it the same way we do for HL1 speedrunning. There's a `speedrun.cfg` in there for the required cvars to run AG%, an `example.cfg` to check some useful cvars and aliases, and some demos to learn the first chapter of the game, that you can replay with `startdemos start_1 start_2 start_3 start_4 start_5 start_6`.

Expand Down Expand Up @@ -61,6 +63,8 @@ These are the changes to singleplayer in AG 6.7 when compared to HL Steam, and s
- HEV chargers now give at maximum 30 AP.
- Now you start with crowbar and glock in the campaign or map.
- Now scientists and barneys have +50 and +30 hp respectively, to be balanced with the increased weapon damage.
- Fixed getting stuck on walls or other brushes after a changelevel (e.g.: ST pipe, after the pipe2pipe strat).
- Fixed NPCs not being able to open doors on saveload.

## Known issues
Some of these are specific to the HL campaign.
Expand Down
2 changes: 1 addition & 1 deletion dlls/agarena.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void AgArena::Think()
if (GetPlayer1() && GetPlayer2())
{
m_Status = Countdown;
m_fMatchStart = gpGlobals->time + 5.0;
m_fMatchStart = gpGlobals->time + GetCountdownTimeOrDefault(5.0f);
m_fNextCountdown = gpGlobals->time + 2.0;
}

Expand Down
113 changes: 95 additions & 18 deletions dlls/agclient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

#include "aggamerules.h"
#include "agclient.h"
#include "cvar.h"
#include "speedrunstats.h"

#include "voice_gamemgr.h"
extern CVoiceGameMgr g_VoiceGameMgr;
Expand All @@ -31,6 +33,9 @@ extern int gmsgPlaySound;
extern int gmsgTeamInfo;
extern int g_teamplay;

extern bool g_bPostponeChangelevel;
extern CChangeLevel* g_pLastChangelevel;

AgClient::AgClient()
{

Expand Down Expand Up @@ -106,6 +111,7 @@ bool AgClient::HandleCommand(CBasePlayer* pPlayer)
// player is dropping an item.
pPlayer->DropPlayerItem((char*)CMD_ARGV(1));
}
return true;
}
else if (FStrEq(CMD_ARGV(0), "spectate"))
{
Expand Down Expand Up @@ -281,8 +287,84 @@ bool AgClient::HandleCommand(CBasePlayer* pPlayer)
else if (FStrEq(CMD_ARGV(0), "settings"))
{
pPlayer->SetDisplayGamemode(0);

const auto changedCVars = CVar::GetChangesOverGamemode();
if (changedCVars.size() > 0)
{
AgString msg;

msg.append("These cvars have been changed:\n");
for (const auto changedCVar : changedCVars)
{
msg.append(UTIL_VarArgs("- %s [%s -> %s]\n",
changedCVar.name.c_str(), changedCVar.defaultValue.c_str(), changedCVar.changedValue.c_str()));
}
AgConsole(msg, pPlayer);
}
else
AgConsole("No gamemode-related cvar changed", pPlayer);

return true;
}
else if (FStrEq(CMD_ARGV(0), "gamemodevars"))
{
if ((pPlayer->m_flLastGamemodeVarsRequest + GAMEMODE_VARS_REQUEST_COOLDOWN) > AgTime())
return true;

pPlayer->m_flLastGamemodeVarsRequest = AgTime();

AgString msg;
const auto cvars = CVar::GetGamemodeCVars();

msg.append(UTIL_VarArgs("---- Showing %d gamemode config cvars ----\n", cvars.size()));
for (const auto entry : cvars)
{
msg.append(UTIL_VarArgs("-> %s: %s\n", entry.first.c_str(), entry.second.c_str()));
}
AgConsole(msg, pPlayer);

return true;
}
else if (FStrEq(CMD_ARGV(0), "stats_run"))
{
if (singleplayer.value > 0.0f && g_bLangame)
{
SpeedrunStats::PrintRun();
return true;
}
return false;
}
else if (FStrEq(CMD_ARGV(0), "stats_session"))
{
if (singleplayer.value > 0.0f && g_bLangame)
{
SpeedrunStats::PrintSession();
return true;
}
return false;
}
else if (FStrEq(CMD_ARGV(0), "delay_changelevel"))
{
if (singleplayer.value > 0.0f && g_bLangame)
{
if (g_bPostponeChangelevel && g_pLastChangelevel)
g_pLastChangelevel->DoChangeLevel();

g_bPostponeChangelevel = !g_bPostponeChangelevel;

const auto msg = UTIL_VarArgs("Changelevel delay: %s\n", g_bPostponeChangelevel ? "ON" : "OFF");
if (ag_say_on_changelevel_delay.value != 0.0f)
UTIL_ServerMessage(msg);
else
{
// If this ever goes to multiplayer, change this AgConsole to UTIL_ClientPrintAll I guess
AgConsole(msg, pPlayer);
}

return true;
}
return false;
}
#ifndef AG_NO_CLIENT_DLL
else if (FStrEq(CMD_ARGV(0), "dropitems") && CTF == AgGametype())
{
Expand Down Expand Up @@ -370,11 +452,13 @@ bool AgClient::HandleCommand(CBasePlayer* pPlayer)
pPlayer->ShowVGUI(MENU_TEAM);
return true;
}
/*
else if (FStrEq(CMD_ARGV(0), "agosinfo"))
{
AgConsole(AgOSVersion(), pPlayer);
return true;
}
*/
#ifndef AG_NO_CLIENT_DLL
else if (FStrEq(CMD_ARGV(0), "maplist"))
{
Expand All @@ -390,24 +474,6 @@ bool AgClient::HandleCommand(CBasePlayer* pPlayer)
}
#endif

/*
else if (FStrEq(CMD_ARGV(0), "botme"))
{
edict_t* pEntity = g_engfuncs.pfnCreateFakeClient( "botme" );
entvars_t *pev = &pEntity->v;
CBasePlayer* pBot = GetClassPtr((CBasePlayer*)pev); //Link bot object to the edict

pBot->Init();
pev->flags |= FL_FAKECLIENT; // bot is fakeclient
pBot->Spawn();
pev->flags |= FL_FAKECLIENT; // bot is fakeclient
pBot = (CBasePlayer *)CBasePlayer::Instance(pEntity);
g_pGameRules->PlayerThink( pBot);
g_engfuncs.pfnSetClientKeyValue( pPlayer->entindex(),
g_engfuncs.pfnGetInfoKeyBuffer(pEntity), "model", "xxx");
}
*/

return false;
}

Expand Down Expand Up @@ -664,6 +730,11 @@ void AgClient::Say(CBasePlayer* pPlayer, say_type Type)
if (0 == ag_spectalk.value && !pPlayer->IsAdmin() && All == Type && 0 < ag_match_running.value && pPlayer != pPlayerLoop)
continue;

// sv_ag_match_mute 2, i'm a spec and match players won't see my message
if (ag_match_running.value != 0.0f && ag_match_mute.value == 2.0f
&& !pPlayer->IsAdmin() && !pPlayerLoop->IsSpectator() && pPlayer != pPlayerLoop)
continue;

#ifndef AG_NO_CLIENT_DLL
if (bSendLocation)
{
Expand Down Expand Up @@ -721,6 +792,12 @@ void AgClient::Say(CBasePlayer* pPlayer, say_type Type)
if ((Team == Type || Close == Type) && pPlayerLoop->IsSpectator())
continue;

// sv_ag_match_mute 2, i'm a match player and my opponents won't see my messages,
// but my teammates and specs will see them
if (ag_match_running.value != 0.0f && ag_match_mute.value == 2.0f
&& !pPlayer->IsTeammate(pPlayerLoop) && !pPlayerLoop->IsSpectator())
continue;

#ifndef AG_NO_CLIENT_DLL
if (bSendLocation)
{
Expand Down
Loading
Loading