Skip to content

Commit

Permalink
Merge branch 'master' into opfor
Browse files Browse the repository at this point in the history
  • Loading branch information
nekonomicon committed Aug 21, 2024
2 parents f16d255 + f1c430a commit 66ffcb8
Show file tree
Hide file tree
Showing 21 changed files with 220 additions and 113 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,20 @@ jobs:
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Checkout steam-runtime
if: startsWith(matrix.os, 'ubuntu')
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ValveSoftware/steam-runtime
path: steam-runtime
- name: Cache steam-runtime
if: startsWith(matrix.os, 'ubuntu')
id: cache-steam-runtime
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
key: ${{ runner.os }}-steam-runtime
Expand Down Expand Up @@ -65,7 +65,7 @@ jobs:
- name: Add msbuild to PATH
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2
- name: Build on Windows
if: startsWith(matrix.os, 'windows')
run: |
Expand All @@ -87,25 +87,25 @@ jobs:
id: extract_gamedir
- name: Upload linux artifact
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-linux
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
- name: Upload linux artifact with vgui
if: startsWith(matrix.os, 'ubuntu') && matrix.cc == 'gcc'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-linux-vgui
path: dist-vgui/${{ steps.extract_gamedir.outputs.gamedir }}
- name: Upload windows artifact
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-windows
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
- name: Upload windows artifact with vgui
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-windows-vgui
path: dist-vgui/${{ steps.extract_gamedir.outputs.gamedir }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ jobs:
CXX: ${{ matrix.cxx }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Checkout steam-runtime
if: startsWith(matrix.os, 'ubuntu')
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ValveSoftware/steam-runtime
path: steam-runtime
- name: Cache steam-runtime
if: startsWith(matrix.os, 'ubuntu')
id: cache-steam-runtime
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: com.valvesoftware.SteamRuntime.Sdk-i386-scout-sysroot.tar.gz
key: ${{ runner.os }}-steam-runtime
Expand Down Expand Up @@ -73,7 +73,7 @@ jobs:
- name: Add msbuild to PATH
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1.1
uses: microsoft/setup-msbuild@v2
- name: Build on Windows
if: startsWith(matrix.os, 'windows')
run: |
Expand All @@ -100,13 +100,13 @@ jobs:
Remove-Item -Force -Path dist/${{ steps.extract_gamedir.outputs.gamedir }}/dlls/hl.lib
- name: Upload linux artifact
if: startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-linux
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
- name: Upload windows artifact
if: startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: hlsdk-${{ steps.extract_branch.outputs.branch }}-windows
path: dist/${{ steps.extract_gamedir.outputs.gamedir }}
Expand Down
1 change: 1 addition & 0 deletions cl_dll/ammohistory.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ class HistoryResource
void Reset( void )
{
memset( rgAmmoHistory, 0, sizeof rgAmmoHistory );
iCurrentHistorySlot = 0;
}

int iHistoryGap;
Expand Down
2 changes: 1 addition & 1 deletion cl_dll/hud_spectator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ int UTIL_FindEntityInMap( const char *name, float *origin, float *angle )

if( token[0] == '}' )
{
gEngfuncs.Con_DPrintf( "UTIL_FindEntityInMap: closing brace without data" );
gEngfuncs.Con_DPrintf( "UTIL_FindEntityInMap: closing brace without data\n" );
return 0;
}

Expand Down
2 changes: 1 addition & 1 deletion dlls/animation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ int FindTransition( void *pmodel, int iEndingAnim, int iGoalAnim, int *piDir )
}
}

ALERT( at_console, "error in transition graph" );
ALERT( at_console, "error in transition graph\n" );
return iGoalAnim;
}

Expand Down
2 changes: 1 addition & 1 deletion dlls/h_cycler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void CCycler::GenericCyclerSpawn( const char *szModel, Vector vecMin, Vector vec
{
if( !szModel || !*szModel )
{
ALERT( at_error, "cycler at %.0f %.0f %0.f missing modelname", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z );
ALERT( at_error, "cycler at %.0f %.0f %0.f missing modelname\n", (double)pev->origin.x, (double)pev->origin.y, (double)pev->origin.z );
REMOVE_ENTITY( ENT( pev ) );
return;
}
Expand Down
4 changes: 2 additions & 2 deletions dlls/monsters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2098,7 +2098,7 @@ void CBaseMonster::StartMonster( void )

if( !m_pGoalEnt )
{
ALERT( at_error, "ReadyMonster()--%s couldn't find target %s", STRING( pev->classname ), STRING( pev->target ) );
ALERT( at_error, "ReadyMonster()--%s couldn't find target %s\n", STRING( pev->classname ), STRING( pev->target ) );
}
else
{
Expand All @@ -2110,7 +2110,7 @@ void CBaseMonster::StartMonster( void )
// At this point, we expect only a path_corner as initial goal
if( !FClassnameIs( m_pGoalEnt->pev, "path_corner" ) )
{
ALERT( at_warning, "ReadyMonster--monster's initial goal '%s' is not a path_corner", STRING( pev->target ) );
ALERT( at_warning, "ReadyMonster--monster's initial goal '%s' is not a path_corner\n", STRING( pev->target ) );
}
#endif
// set the monster up to walk a path corner path.
Expand Down
2 changes: 1 addition & 1 deletion dlls/osprey.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ void COsprey::UpdateGoal()
}
else
{
ALERT( at_console, "osprey missing target" );
ALERT( at_console, "osprey missing target\n" );
}
}

Expand Down
8 changes: 4 additions & 4 deletions dlls/pathcorner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,21 +93,21 @@ void CPathCorner::Touch( CBaseEntity *pOther )
// UNDONE: support non-zero flWait
/*
if( m_flWait != 0 )
ALERT( at_warning, "Non-zero path-cornder waits NYI" );
ALERT( at_warning, "Non-zero path-cornder waits NYI\n" );
*/

// Find the next "stop" on the path, make it the goal of the "toucher".
if( FStringNull( pev->target ) )
{
ALERT( at_warning, "PathCornerTouch: no next stop specified" );
ALERT( at_warning, "PathCornerTouch: no next stop specified\n" );
}

pOther->m_pGoalEnt = CBaseEntity::Instance( FIND_ENTITY_BY_TARGETNAME( NULL, STRING( pev->target ) ) );

// If "next spot" was not found (does not exist - level design error)
if( !pOther->m_pGoalEnt )
{
ALERT( at_console, "PathCornerTouch--%s couldn't find next stop in path: %s", STRING( pev->classname ), STRING( pev->target ) );
ALERT( at_console, "PathCornerTouch--%s couldn't find next stop in path: %s\n", STRING( pev->classname ), STRING( pev->target ) );
return;
}

Expand Down Expand Up @@ -375,7 +375,7 @@ CPathTrack *CPathTrack::Nearest( Vector origin )
deadCount++;
if( deadCount > 9999 )
{
ALERT( at_error, "Bad sequence of path_tracks from %s", STRING( pev->targetname ) );
ALERT( at_error, "Bad sequence of path_tracks from %s\n", STRING( pev->targetname ) );
return NULL;
}
delta = origin - ppath->pev->origin;
Expand Down
4 changes: 2 additions & 2 deletions dlls/plats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ void CFuncTrain::Spawn( void )
pev->speed = 100;

if( FStringNull(pev->target) )
ALERT( at_console, "FuncTrain with no target" );
ALERT( at_console, "FuncTrain with no target\n" );

if( pev->dmg == 0 )
pev->dmg = 2;
Expand Down Expand Up @@ -1441,7 +1441,7 @@ void CFuncTrackTrain::Spawn( void )
m_dir = 1;

if( FStringNull( pev->target ) )
ALERT( at_console, "FuncTrain with no target" );
ALERT( at_console, "FuncTrain with no target\n" );

if( pev->spawnflags & SF_TRACKTRAIN_PASSABLE )
pev->solid = SOLID_NOT;
Expand Down
2 changes: 1 addition & 1 deletion dlls/player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,7 @@ edict_t *EntSelectSpawnPoint( CBaseEntity *pPlayer )
ReturnSpot:
if( FNullEnt( pSpot ) )
{
ALERT( at_error, "PutClientInServer: no info_player_start on level" );
ALERT( at_error, "PutClientInServer: no info_player_start on level\n" );
return INDEXENT( 0 );
}

Expand Down
2 changes: 1 addition & 1 deletion dlls/scripted.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ void CCineAI::PossessEntity( void )
pTarget->pev->flags &= ~FL_ONGROUND;
break;
default:
ALERT( at_aiconsole, "aiscript: invalid Move To Position value!" );
ALERT( at_aiconsole, "aiscript: invalid Move To Position value!\n" );
break;
}

Expand Down
16 changes: 8 additions & 8 deletions dlls/triggers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,7 @@ void CTriggerMultiple::Spawn( void )
if( pev->health > 0 )
{
if( FBitSet( pev->spawnflags, SPAWNFLAG_NOTOUCH ) )
ALERT( at_error, "trigger_multiple spawn: health and notouch don't make sense" );
ALERT( at_error, "trigger_multiple spawn: health and notouch don't make sense\n" );
pev->max_health = pev->health;
UNDONE: where to get pfnDie from?
pev->pfnDie = multi_killed;
Expand Down Expand Up @@ -1169,16 +1169,16 @@ void CBaseTrigger::CounterUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US
switch( m_cTriggersLeft )
{
case 1:
ALERT( at_console, "Only 1 more to go..." );
ALERT( at_console, "Only 1 more to go...\n" );
break;
case 2:
ALERT( at_console, "Only 2 more to go..." );
ALERT( at_console, "Only 2 more to go...\n" );
break;
case 3:
ALERT( at_console, "Only 3 more to go..." );
ALERT( at_console, "Only 3 more to go...\n" );
break;
default:
ALERT( at_console, "There are more to go..." );
ALERT( at_console, "There are more to go...\n" );
break;
}
}
Expand All @@ -1187,7 +1187,7 @@ void CBaseTrigger::CounterUse( CBaseEntity *pActivator, CBaseEntity *pCaller, US

// !!!UNDONE: I don't think we want these Quakesque messages
if( fTellActivator )
ALERT( at_console, "Sequence completed!" );
ALERT( at_console, "Sequence completed!\n" );

ActivateMultiTrigger( m_hActivator );
}
Expand Down Expand Up @@ -1347,7 +1347,7 @@ When the player touches this, he gets sent to the map listed in the "map" variab
void CChangeLevel::Spawn( void )
{
if( FStrEq( m_szMapName, "" ) )
ALERT( at_console, "a trigger_changelevel doesn't have a map" );
ALERT( at_console, "a trigger_changelevel doesn't have a map\n" );

if( FStrEq( m_szLandmarkName, "" ) )
ALERT( at_console, "trigger_changelevel to %s doesn't have a landmark\n", m_szMapName );
Expand Down Expand Up @@ -1611,7 +1611,7 @@ int CChangeLevel::ChangeList( LEVELLIST *pLevelList, int maxList )
entityFlags[entityCount] = flags;
entityCount++;
if( entityCount > MAX_ENTITY )
ALERT( at_error, "Too many entities across a transition!" );
ALERT( at_error, "Too many entities across a transition!\n" );
}
//else
// ALERT( at_console, "Failed %s\n", STRING( pEntity->pev->classname ) );
Expand Down
18 changes: 9 additions & 9 deletions dlls/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,10 @@ edict_t *DBG_EntOfVars( const entvars_t *pev )
{
if( pev->pContainingEntity != NULL )
return pev->pContainingEntity;
ALERT( at_console, "entvars_t pContainingEntity is NULL, calling into engine" );
ALERT( at_console, "entvars_t pContainingEntity is NULL, calling into engine\n" );
edict_t *pent = (*g_engfuncs.pfnFindEntityByVars)( (entvars_t*)pev );
if( pent == NULL )
ALERT( at_console, "DAMN! Even the engine couldn't FindEntityByVars!" );
ALERT( at_console, "DAMN! Even the engine couldn't FindEntityByVars!\n" );
( (entvars_t *)pev )->pContainingEntity = pent;
return pent;
}
Expand Down Expand Up @@ -1606,7 +1606,7 @@ static int gSizes[FIELD_TYPECOUNT] =
sizeof(string_t), // FIELD_STRING
sizeof(void*), // FIELD_ENTITY
sizeof(void*), // FIELD_CLASSPTR
sizeof(void*), // FIELD_EHANDLE
sizeof(EHANDLE), // FIELD_EHANDLE
sizeof(void*), // FIELD_entvars_t
sizeof(void*), // FIELD_EDICT
sizeof(float) * 3, // FIELD_VECTOR
Expand Down Expand Up @@ -1771,7 +1771,7 @@ unsigned short CSaveRestoreBuffer::TokenHash( const char *pszToken )
static int tokensparsed = 0;
tokensparsed++;
if( !m_pdata->tokenCount || !m_pdata->pTokens )
ALERT( at_error, "No token table array in TokenHash()!" );
ALERT( at_error, "No token table array in TokenHash()!\n" );
#endif
for( int i = 0; i < m_pdata->tokenCount; i++ )
{
Expand All @@ -1780,7 +1780,7 @@ unsigned short CSaveRestoreBuffer::TokenHash( const char *pszToken )
if( i > 50 && !beentheredonethat )
{
beentheredonethat = TRUE;
ALERT( at_error, "CSaveRestoreBuffer :: TokenHash() is getting too full!" );
ALERT( at_error, "CSaveRestoreBuffer :: TokenHash() is getting too full!\n" );
}
#endif
int index = hash + i;
Expand All @@ -1796,7 +1796,7 @@ unsigned short CSaveRestoreBuffer::TokenHash( const char *pszToken )

// Token hash table full!!!
// [Consider doing overflow table(s) after the main table & limiting linear hash table search]
ALERT( at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!" );
ALERT( at_error, "CSaveRestoreBuffer :: TokenHash() is COMPLETELY FULL!\n" );
return 0;
}

Expand Down Expand Up @@ -2109,7 +2109,7 @@ void CSave::BufferHeader( const char *pname, int size )
{
short hashvalue = TokenHash( pname );
if( size > 1 << ( sizeof(short) * 8 ) )
ALERT( at_error, "CSave :: BufferHeader() size parameter exceeds 'short'!" );
ALERT( at_error, "CSave :: BufferHeader() size parameter exceeds 'short'!\n" );
BufferData( (const char *)&size, sizeof(short) );
BufferData( (const char *)&hashvalue, sizeof(short) );
}
Expand All @@ -2121,7 +2121,7 @@ void CSave::BufferData( const char *pdata, int size )

if( m_pdata->size + size > m_pdata->bufferSize )
{
ALERT( at_error, "Save/Restore overflow!" );
ALERT( at_error, "Save/Restore overflow!\n" );
m_pdata->size = m_pdata->bufferSize;
return;
}
Expand Down Expand Up @@ -2427,7 +2427,7 @@ void CRestore::BufferReadBytes( char *pOutput, int size )

if( ( m_pdata->size + size ) > m_pdata->bufferSize )
{
ALERT( at_error, "Restore overflow!" );
ALERT( at_error, "Restore overflow!\n" );
m_pdata->size = m_pdata->bufferSize;
return;
}
Expand Down
4 changes: 2 additions & 2 deletions dlls/vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ void CFuncVehicle::Spawn()

if( FStringNull( pev->target ))
{
ALERT( at_console, "Vehicle with no target" );
ALERT( at_console, "Vehicle with no target\n" );
}

if( pev->spawnflags & SF_TRACKTRAIN_PASSABLE )
Expand Down Expand Up @@ -927,7 +927,7 @@ void CFuncVehicle::Restart()

if( FStringNull( pev->target ))
{
ALERT( at_console, "Vehicle with no target" );
ALERT( at_console, "Vehicle with no target\n" );
}

UTIL_SetOrigin( pev, pev->oldorigin );
Expand Down
Loading

0 comments on commit 66ffcb8

Please sign in to comment.