Sync latest code from Team Fortress 2

- Latest code as of 2025/11/07
This commit is contained in:
Autumn Ashton
2025-11-07 22:40:37 +00:00
parent 010c5cbe82
commit b2705ba55b
63 changed files with 282 additions and 112 deletions
+1
View File
@@ -418,6 +418,7 @@ LINK_ENTITY_TO_CLASS( player, C_BasePlayer );
C_BasePlayer::C_BasePlayer() : m_iv_vecViewOffset( "C_BasePlayer::m_iv_vecViewOffset" )
{
AddVar( &m_vecViewOffset, &m_iv_vecViewOffset, LATCH_SIMULATION_VAR );
AddVar( &m_Local.m_vecPunchAngle, &m_Local.m_iv_vecPunchAngle, LATCH_SIMULATION_VAR );
AddVar( &m_Local.m_vecPunchAngleVel, &m_Local.m_iv_vecPunchAngleVel, LATCH_SIMULATION_VAR );
+2 -2
View File
@@ -758,9 +758,9 @@ const char* C_ObjectSentrygun::GetStatusName() const
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
C_SentrygunShield* C_SentrygunShield::Create( const char* pszModelName )
C_SentrygunShield *C_SentrygunShield::Create( const char *pszModelName )
{
C_SentrygunShield* pShield = new C_SentrygunShield();
C_SentrygunShield *pShield = new C_SentrygunShield();
if ( !pShield )
return NULL;
+2 -1
View File
@@ -35,7 +35,7 @@ class C_SentrygunShield : public C_BaseAnimating
DECLARE_CLASS( C_SentrygunShield, C_BaseAnimating );
public:
static C_SentrygunShield* Create( const char* pszModelName );
static C_SentrygunShield *Create( const char *pszModelName );
virtual void ClientThink();
@@ -46,6 +46,7 @@ private:
float m_flFadeOutEndTime;
};
//-----------------------------------------------------------------------------
// Purpose: Sentry object
//-----------------------------------------------------------------------------
+1
View File
@@ -11611,6 +11611,7 @@ void C_TFPlayer::ClientAdjustVOPitch( int& pitch )
{
pitch *= 1.3f;
}
// Halloween voice futzery?
float flVoicePitchScale = 1.f;
CALL_ATTRIB_HOOK_FLOAT( flVoicePitchScale, voice_pitch_scale );
+3 -3
View File
@@ -198,7 +198,7 @@ public:
virtual const char *GetResFileName( void ) { return "resource/UI/HudAccountPanel.res"; }
protected:
virtual Color GetColor( const account_delta_t::eAccountDeltaType_t& type, const int iDeltaValue = 0 );
virtual Color GetColor( const account_delta_t::eAccountDeltaType_t &type, const int iDeltaValue = 0 );
CUtlVector <account_delta_t> m_AccountDeltaItems;
@@ -1038,7 +1038,7 @@ account_delta_t *CAccountPanel::OnAccountValueChanged( int iOldValue, int iNewVa
return NULL;
}
Color CAccountPanel::GetColor( const account_delta_t::eAccountDeltaType_t& type, const int iDeltaValue )
Color CAccountPanel::GetColor( const account_delta_t::eAccountDeltaType_t &type, const int iDeltaValue )
{
if ( type == account_delta_t::ACCOUNT_DELTA_BONUS_POINTS )
{
@@ -1046,7 +1046,7 @@ Color CAccountPanel::GetColor( const account_delta_t::eAccountDeltaType_t& type,
}
else if ( type == account_delta_t::ACCOUNT_DELTA_HEALING )
{
return iDeltaValue < 0 ? m_DeltaNegativeColor : m_DeltaPositiveColor;
return ( iDeltaValue < 0 ) ? m_DeltaNegativeColor : m_DeltaPositiveColor;
}
else if ( type == account_delta_t::ACCOUNT_DELTA_DAMAGE )
{
@@ -23,7 +23,7 @@
#include <tier0/memdbgon.h>
ConVar tf_explanations_charinfo_armory_panel( "tf_explanations_charinfo_armory_panel", "0", FCVAR_ARCHIVE, "Whether the user has seen explanations for this panel." );
ConVar tf_armory_page_skip( "tf_armory_page_skip", "10", FCVAR_ARCHIVE, "Number of pages to skip in the Mann Co. Catalogue.", true, 1, true, 100 );
ConVar tf_armory_page_skip( "tf_armory_page_skip", "10", FCVAR_ARCHIVE, "Number of pages to skip in the Mann Co. Catalog", true, 1, true, 100 );
const char *g_szArmoryFilterStrings[ARMFILT_TOTAL] =
{
@@ -308,61 +308,61 @@ void CArmoryPanel::OnClosing()
//-----------------------------------------------------------------------------
void CArmoryPanel::OnCommand( const char *command )
{
if (!Q_stricmp(command, "prevpage"))
if ( !Q_stricmp( command, "prevpage" ) )
{
if (m_iFilterPage > 0)
if ( m_iFilterPage > 0 )
{
m_iFilterPage--;
}
else
{
m_iFilterPage = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1;
m_iFilterPage = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1;
}
UpdateItemList();
UpdateSelectedItem();
}
else if (!Q_stricmp(command, "prevpageskip"))
else if ( !Q_stricmp( command, "prevpageskip" ) )
{
for (int i = 0; i < tf_armory_page_skip.GetInt(); i++)
for ( int i = 0; i < tf_armory_page_skip.GetInt(); i++ )
{
if (m_iFilterPage > 0)
if ( m_iFilterPage > 0 )
{
m_iFilterPage--;
}
else
{
m_iFilterPage = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1;
m_iFilterPage = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1;
}
}
UpdateItemList();
UpdateSelectedItem();
}
else if (!Q_stricmp(command, "skiptostart"))
else if ( !Q_stricmp( command, "skiptostart" ) )
{
m_iFilterPage = 0;
UpdateItemList();
UpdateSelectedItem();
}
else if (!Q_stricmp(command, "nextpage"))
else if ( !Q_stricmp( command, "nextpage" ) )
{
m_iFilterPage++;
if (m_iFilterPage > ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1)
if ( m_iFilterPage > ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1 )
{
m_iFilterPage = 0;
}
UpdateItemList();
UpdateSelectedItem();
}
else if (!Q_stricmp(command, "nextpageskip"))
else if ( !Q_stricmp( command, "nextpageskip" ) )
{
uint32 unNumPages = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns));
m_iFilterPage = ((m_iFilterPage + tf_armory_page_skip.GetInt()) % unNumPages);
uint32 unNumPages = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) );
m_iFilterPage = ( ( m_iFilterPage + tf_armory_page_skip.GetInt() ) % unNumPages );
UpdateItemList();
UpdateSelectedItem();
}
else if (!Q_stricmp(command, "skiptoend"))
else if ( !Q_stricmp( command, "skiptoend" ) )
{
m_iFilterPage = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1;
m_iFilterPage = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1;
UpdateItemList();
UpdateSelectedItem();
}
@@ -400,7 +400,7 @@ void CArmoryPanel::OnCommand( const char *command )
ELanguage iLang = PchLanguageToELanguage( uilanguage );
char szURL[512];
Q_snprintf( szURL, sizeof(szURL), "https://wiki.teamfortress.com/scripts/itemredirect.php?id=%d&lang=%s", m_SelectedItem.GetItemDefIndex(), GetLanguageICUName( iLang ) );
Q_snprintf( szURL, sizeof( szURL ), "https://wiki.teamfortress.com/scripts/itemredirect.php?id=%d&lang=%s", m_SelectedItem.GetItemDefIndex(), GetLanguageICUName( iLang ) );
steamapicontext->SteamFriends()->ActivateGameOverlayToWebPage( szURL );
C_CTF_GameStats.Event_Catalog( IE_ARMORY_BROWSE_WIKI, NULL, &m_SelectedItem );
@@ -392,7 +392,7 @@ void CDashboardPartyMember::OnCommand( const char *command )
{
case MEMBER_PRESENT:
{
// You can always send a message to party memebers
// You can always send a message to party members
contextMenuBuilder.AddMenuItem( "#TF_Friends_SendMessage", new KeyValues( "Context_SendMessage" ), "party" );
// If we're the leader, we can kick
@@ -88,6 +88,7 @@ static const char *kBodygroupArray[] =
"headphones",
"shoes",
"shoes_socks",
"bullets"
};
extern IFileSystem *g_pFullFileSystem;
@@ -6998,6 +6999,9 @@ CTFFileImportDialog::LOAD_RESULT CTFFileImportDialog::LoadTxt( const char *pszFi
}
}
char szFileBase[ MAX_PATH ];
V_FileBase( pszSourceFile, szFileBase, sizeof( szFileBase ) );
LOAD_RESULT result = SetAnimationSource( nClassIndex, pszSourceFile );
if ( result != LOAD_OKAY )
{
@@ -7013,6 +7017,23 @@ CTFFileImportDialog::LOAD_RESULT CTFFileImportDialog::LoadTxt( const char *pszFi
V_ComposeFileName( pszBasePath, pszVCDFile, pszLoadPath, sizeof(pszLoadPath) );
pszVCDFile = pszLoadPath;
}
if ( !g_pFullFileSystem->FileExists( pszVCDFile, "MOD" ) )
{
const char *pszTempVCDFile = pszVCDFile;
// If the file isn't found using the path in the manifest, let's look where we think it should be on disk.
// We're sometimes seeing absolute paths for the creator's hard drive in the manifest for the vcd_file.
char szFallbackTest[ MAX_PATH ];
V_sprintf_safe( szFallbackTest, "%sgame\\scenes\\%s\\player\\%s\\low\\%s.vcd", pszBasePath, GetWorkshopFolder(), kClassFolders[ nClassIndex ], szFileBase );
pszVCDFile = szFallbackTest;
if ( !g_pFullFileSystem->FileExists( pszVCDFile, "MOD" ) )
{
// Set it back to the original value and let it fail below.
pszVCDFile = pszTempVCDFile;
}
}
}
result = SetAnimationVCD( nClassIndex, pszVCDFile );
+1 -1
View File
@@ -1257,7 +1257,7 @@ int CAI_AssaultBehavior::TranslateSchedule( int scheduleType )
break;
case SCHED_HOLD_RALLY_POINT:
if( HasCondition(COND_NO_PRIMARY_AMMO) | HasCondition(COND_LOW_PRIMARY_AMMO) )
if( HasCondition(COND_NO_PRIMARY_AMMO) || HasCondition(COND_LOW_PRIMARY_AMMO) )
{
return SCHED_RELOAD;
}
+1 -1
View File
@@ -1885,7 +1885,7 @@ int CNPC_Combine::SelectFailSchedule( int failedSchedule, int failedTask, AI_Tas
{
// This eases the effects of an unfortunate bug that usually plagues shotgunners. Since their rate of fire is low,
// they spend relatively long periods of time without an attack squad slot. If you corner a shotgunner, usually
// the other memebers of the squad will hog all of the attack slots and pick schedules to move to establish line of
// the other members of the squad will hog all of the attack slots and pick schedules to move to establish line of
// fire. During this time, the shotgunner is prevented from attacking. If he also cannot find cover (the fallback case)
// he will stand around like an idiot, right in front of you. Instead of this, we have him run up to you for a melee attack.
return SCHED_COMBINE_MOVE_TO_MELEE;
@@ -190,7 +190,7 @@ float CHL2MPBotSquad::GetSlowestMemberIdealSpeed( bool includeLeader ) const
//----------------------------------------------------------------------
// Return the maximum formation error of the squad's memebers.
// Return the maximum formation error of the squad's members.
float CHL2MPBotSquad::GetMaxSquadFormationError( void ) const
{
float maxError = 0.0f;
+1 -1
View File
@@ -81,7 +81,7 @@ void CPointCamera::Spawn( void )
// Purpose: Transmit only to players who are in PVS of the camera and its link
// See PointCameraSetupVisibility
//-----------------------------------------------------------------------------
int CPointCamera::ShouldTransmit( const CCheckTransmitInfo* pInfo )
int CPointCamera::ShouldTransmit( const CCheckTransmitInfo *pInfo )
{
if ( m_bitsTransmitPlayers.IsBitSet( pInfo->m_pClientEnt->m_EdictIndex ) )
return FL_EDICT_ALWAYS;
+1 -1
View File
@@ -29,7 +29,7 @@ public:
// Tell the client that this camera needs to be rendered
void SetActive( bool bActive );
int ShouldTransmit( const CCheckTransmitInfo* pInfo );
int ShouldTransmit( const CCheckTransmitInfo *pInfo );
int UpdateTransmitState( void );
void TransmitToPlayer( int nPlayerIndex, bool bTransmit );
+1 -1
View File
@@ -4597,7 +4597,7 @@ Action< CTFBot > *CTFBot::OpportunisticallyUseWeaponAbilities( void )
}
}
}
else if ( weapon->GetWeaponID() == TF_WEAPON_BAT_WOOD || weapon->GetWeaponID() == TF_WEAPON_BAT_GIFTWRAP )
else if ( ( weapon->GetWeaponID() == TF_WEAPON_BAT_WOOD ) || ( weapon->GetWeaponID() == TF_WEAPON_BAT_GIFTWRAP ) )
{
// sandman or wrap assassin
if ( GetAmmoCount( TF_AMMO_GRENADES1 ) > 0 )
+1 -1
View File
@@ -202,7 +202,7 @@ float CTFBotSquad::GetSlowestMemberIdealSpeed( bool includeLeader ) const
//----------------------------------------------------------------------
// Return the maximum formation error of the squad's memebers.
// Return the maximum formation error of the squad's members.
float CTFBotSquad::GetMaxSquadFormationError( void ) const
{
float maxError = 0.0f;
+2 -2
View File
@@ -1166,9 +1166,9 @@ void CObjectTeleporter::TeleporterThink( void )
SetState( TELEPORTER_STATE_RECHARGING );
m_flCurrentRechargeDuration = (float)g_iTeleporterRechargeTimes[GetUpgradeLevel()];
if (!m_bWasMapPlaced)
if ( !m_bWasMapPlaced )
{
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER(GetBuilder(), m_flCurrentRechargeDuration, mult_teleporter_recharge_rate);
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( GetBuilder(), m_flCurrentRechargeDuration, mult_teleporter_recharge_rate );
}
m_flRechargeTime = gpGlobals->curtime + m_flCurrentRechargeDuration;
+2 -2
View File
@@ -1858,8 +1858,8 @@ bool CTFPasstimeLogic::ParseSetSection( const char *pStr, SetSectionParams &s )
{
return false;
}
pszStartName[ ARRAYSIZE(pszStartName) - 1 ] = '\0';
pszEndName[ ARRAYSIZE(pszEndName) - 1 ] = '\0';
pszStartName[ ARRAYSIZE( pszStartName ) - 1 ] = '\0';
pszEndName[ ARRAYSIZE( pszEndName ) - 1 ] = '\0';
s.pSectionStart = dynamic_cast<CPathTrack*>( gEntList.FindEntityByName( 0, pszStartName ) );
s.pSectionEnd = dynamic_cast<CPathTrack*>( gEntList.FindEntityByName( 0, pszEndName ) );
+37 -5
View File
@@ -5952,7 +5952,7 @@ void CTFPlayer::HandleAnimEvent( animevent_t *pEvent )
float flDuration;
if ( sscanf( pEvent->options, "%127s %f %f", szAttrName, &flVal, &flDuration ) == 3 )
{
szAttrName[ ARRAYSIZE(szAttrName) - 1 ] = '\0';
szAttrName[ ARRAYSIZE( szAttrName ) - 1 ] = '\0';
Assert( flDuration > 0.f );
AddCustomAttribute( szAttrName, flVal, flDuration );
}
@@ -6871,14 +6871,14 @@ void CTFPlayer::HandleCommand_JoinClass( const char *pClassName, bool bAllowSpaw
else
{
int iChoices = 0;
int iClasses[TF_LAST_NORMAL_CLASS - 1] = {}; // -1 to remove the civilian from the randomness
int iClasses[ TF_LAST_NORMAL_CLASS - 1 ] = {}; // -1 to remove the civilian from the randomness
int iCurrentClass = GetPlayerClass()->GetClassIndex();
for ( iClass = TF_FIRST_NORMAL_CLASS; iClass < TF_LAST_NORMAL_CLASS; iClass++ )
{
if ( iClass != iCurrentClass && TFGameRules()->CanPlayerChooseClass( this, iClass ) )
{
iClasses[iChoices++] = iClass;
iClasses[ iChoices++ ] = iClass;
}
}
@@ -6892,7 +6892,7 @@ void CTFPlayer::HandleCommand_JoinClass( const char *pClassName, bool bAllowSpaw
return;
}
iClass = iClasses[random->RandomInt( 0, iChoices - 1 )];
iClass = iClasses[ random->RandomInt( 0, iChoices - 1 ) ];
}
if ( TFGameRules() && TFGameRules()->State_Get() == GR_STATE_RND_RUNNING )
@@ -7343,7 +7343,7 @@ bool CTFPlayer::ClientCommand( const CCommand &args )
if ( FStrEq( pcmd, "jointeam" ) )
{
// don't let them spam the server with changes
if ( GetNextChangeTeamTime() > gpGlobals->curtime && GetTeamNumber() != TEAM_UNASSIGNED )
if ( ( GetNextChangeTeamTime() > gpGlobals->curtime ) && ( GetTeamNumber() != TEAM_UNASSIGNED ) )
return true;
SetNextChangeTeamTime( gpGlobals->curtime + 2.0f ); // limit to one change every 2 secs
@@ -19131,6 +19131,30 @@ void CTFPlayer::DoTauntAttack( void )
pLoser->TakeDamage( CTakeDamageInfo( pWinner, pWinner, NULL, 999, DMG_GENERIC, 0 ) );
}
}
else if ( iTauntAttack == TAUNTATK_ENGINEER_TRICKSHOT )
{
// Engineer "Texan Trickshot" attack
Vector vecForward;
AngleVectors( EyeAngles(), &vecForward );
Vector vecEnd = EyePosition() + vecForward * 500;
trace_t tr;
UTIL_TraceLine( EyePosition(), vecEnd, ( MASK_SOLID | CONTENTS_HITBOX ), this, COLLISION_GROUP_PLAYER, &tr );
// DebugDrawLine( EyePosition(), vecEnd, 0, 0, 255, true, 3.0f );
if ( tr.fraction < 1.0 )
{
CBaseEntity *pEnt = tr.m_pEnt;
if ( pEnt && pEnt->IsPlayer() && pEnt->GetTeamNumber() > LAST_SHARED_TEAM && pEnt->GetTeamNumber() != GetTeamNumber() )
{
// Launch them up a little
AngleVectors( QAngle( -45, m_angEyeAngles[ YAW ], 0 ), &vecForward );
pEnt->TakeDamage( CTakeDamageInfo( this, this, GetActiveTFWeapon(), vecForward * 25000, WorldSpaceCenter(), 500.0f, DMG_BULLET, TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT ) );
}
}
}
// Particle Being played in VCD instead
//else if ( iTauntAttack == TAUNTATK_FLIP_LAND_PARTICLE )
//{
@@ -21580,6 +21604,7 @@ static bool SelectPartnerTaunt( const GameItemDefinition_t *pItemDef, CTFPlayer
{
static CSchemaItemDefHandle pItemDef_rpsTaunt( "RPS Taunt" );
static CSchemaItemDefHandle pItemDef_TauntNeckSnap( "Taunt: Neck Snap" );
static CSchemaItemDefHandle pItemDef_TauntBearHug( "Taunt: Bear Hug" );
CTFTauntInfo *pTauntData = pItemDef->GetTauntData();
if ( !pTauntData )
@@ -21629,6 +21654,13 @@ static bool SelectPartnerTaunt( const GameItemDefinition_t *pItemDef, CTFPlayer
iInitiator = 0;
iReceiver = ( iReceiverClass != TF_CLASS_SOLDIER ) ? 0 : 1;
}
else if ( pItemDef == pItemDef_TauntBearHug )
{
Assert( iInitiatorSceneCount == 2 && iReceiverSceneCount > 0 );
iInitiator = 0;
iReceiver = ( iReceiverClass != TF_CLASS_HEAVYWEAPONS ) ? 0 : 1;
}
else
{
// randomly select a player to pick 0 (could be silent taunt)
+1
View File
@@ -3370,6 +3370,7 @@ DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_SLAP_KILL )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_CROC )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_TAUNTATK_GASBLAST )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_AXTINGUISHER_BOOSTED )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT )
DECLARE_SCRIPT_CONST( ETFDmgCustom, TF_DMG_CUSTOM_END )
REGISTER_SCRIPT_CONST_TABLE( ETFDmgCustom )
+2
View File
@@ -92,6 +92,8 @@ BEGIN_ENT_SCRIPTDESC( CEconEntity, CBaseAnimating, "Econ Entity" )
END_SCRIPTDESC();
#endif
#ifdef TF_CLIENT_DLL
#endif
#ifdef CLIENT_DLL
+3 -3
View File
@@ -316,7 +316,7 @@ static CDateBasedHolidayNoSpecificYear g_Holiday_ValentinesDay ( "valentines", "
static CDateBasedHoliday g_Holiday_MeetThePyro ( "meet_the_pyro", "2012-06-26", "2012-07-05" );
/* starting date cycle length in days bonus time in days on both sides */
static CCyclicalHoliday g_Holiday_FullMoon ( "fullmoon", 12, 15, 2024, 29.53f, 1.0f );
static CCyclicalHoliday g_Holiday_FullMoon ( "fullmoon", 10, 06, 2025, 29.53f, 1.0f );
// note: the cycle length is 29.5 instead of 29.53 so that the time calculations always start at noon based on the way CCyclicalHoliday works
static COrHoliday g_Holiday_HalloweenOrFullMoon ( "halloween_or_fullmoon", &g_Holiday_Halloween, &g_Holiday_FullMoon );
@@ -330,8 +330,8 @@ static CDateBasedHoliday g_Holiday_CommunityUpdate ( "community_update", "2015
static CDateBasedHolidayNoSpecificYear g_Holiday_Soldier ( "soldier", "04-12", "04-14" );
// only setup for 2024 right now...need to figure out how we want future events to run and maybe remove the year
static CDateBasedHoliday g_Holiday_Summer( "summer", "2024-07-01", "2024-09-16" );
// only setup for 2025 right now...need to figure out how we want future events to run and maybe remove the year
static CDateBasedHoliday g_Holiday_Summer( "summer", "2025-07-16", "2025-09-16" );
// ORDER NEEDS TO MATCH enum EHoliday
static IIsHolidayActive *s_HolidayChecks[] =
@@ -2817,7 +2817,6 @@ void CEconItemDescription::Generate_CollectionDesc( const CLocalizationProvider
if ( !pItemDef )
return;
// Adding a check for if the collection we are browsing contains cosmetics or decorated weapons.
// We can handle decorated weapons the same as cosmetics, since they have proper schema entries
bool bIsHatOrDecorated = false;
@@ -2829,8 +2828,10 @@ void CEconItemDescription::Generate_CollectionDesc( const CLocalizationProvider
if ( GetPaintKitDefIndex( pEconItem, &nPaintkitDefindex ) )
{
auto pPaintkitItemDef = GetItemSchema()->GetPaintKitItemDefinition( nPaintkitDefindex );
if (pPaintkitItemDef == NULL)
if ( pPaintkitItemDef == NULL )
{
bIsHatOrDecorated = true;
}
pItemDef = pPaintkitItemDef ? pPaintkitItemDef : pItemDef;
}
+1 -1
View File
@@ -64,7 +64,7 @@ COMPILE_TIME_ASSERT( ARRAYSIZE( g_QuestPointsDefs ) == EQuestPoints_ARRAYSIZE );
extern bool InitPerClassRandomChanceStringArray( KeyValues *pPerClassData, CRandomChanceString (&outputArray)[LOADOUT_COUNT], CUtlVector<CUtlString>* pVecErrors );
#ifdef CLIENT_DLL
CON_COMMAND( set_party_contract_progress_enabled, "Set whether or not you'd like your party memebers to be able to make progress on your Contracts along with you." )
CON_COMMAND( set_party_contract_progress_enabled, "Set whether or not you'd like your party members to be able to make progress on your Contracts along with you." )
{
if ( args.ArgC() != 2 )
{
@@ -946,7 +946,7 @@ void CTFSpellBook::TossJarThink( void )
}
Vector vecSrc = pPlayer->Weapon_ShootPosition();
// Make spell toss position at the hand
vecSrc = vecSrc + (vecUp * -9.0f) + (vecRight * fRight) + (vecForward * 3.0f);
vecSrc = vecSrc + ( vecUp * -9.0f ) + ( vecRight * fRight ) + ( vecForward * 3.0f );
Vector vecVelocity = GetVelocityVector( vecForward, vecRight, vecUp ) * pSpellData->m_flSpeedScale;
QAngle angForward = pPlayer->EyeAngles();
+44 -5
View File
@@ -417,7 +417,22 @@ static MapInfo_t s_CommunityMaps[] = {
{ "ctf_penguin_peak", "Penguin Peak", "#Gametype_CTF" },
{ "pl_patagonia", "Patagonia", "#Gametype_Escort" },
{ "plr_cutter", "Cutter", "#Gametype_EscortRace" },
{ "vsh_maul", " Maul", "#GameType_VSH" },
{ "vsh_maul", "Maul", "#GameType_VSH" },
{ "pl_citadel", "Citadel", "#Gametype_Escort" },
{ "pl_aquarius", "Aquarius", "#Gametype_Escort" },
{ "cp_fulgur", "Fulgur", "#TF_AttackDefend" },
{ "cp_cargo", "Cargo", "#TF_AttackDefend" },
{ "cp_conifer", "Conifer", "#TF_AttackDefend" },
{ "koth_boardwalk", "Boardwalk", "#Gametype_Koth" },
{ "koth_blowout", "Blowout", "#Gametype_Koth" },
{ "koth_mannhole", "Mannhole", "#Gametype_Koth" },
{ "koth_demolition", "Demolition", "#Gametype_Koth" },
{ "ctf_pressure", "Pressure", "#Gametype_CTF" },
{ "cp_cowerhouse", "Cowerhouse", "#Gametype_CP" },
{ "koth_dusker", "Dusker", "#Gametype_Koth" },
{ "arena_afterlife", "Afterlife", "#Gametype_Arena" },
{ "ctf_doublecross_event", "Devilcross", "#Gametype_CTF" },
{ "sd_marshlands", "Marshlands", "#GameType_HTF" },
};
/*
@@ -597,6 +612,25 @@ static FeaturedWorkshopMap_t s_FeaturedWorkshopMaps[] = {
{ "pl_patagonia", 3236427113 },
{ "plr_cutter", 3363801747 },
{ "vsh_maul", 3069796653 },
// Summer 2025
{ "pl_citadel", 3474587494 },
{ "pl_aquarius", 3478583193 },
{ "cp_fulgur", 2068252300 },
{ "cp_cargo", 3488669143 },
{ "cp_conifer", 1419048064 },
{ "koth_boardwalk", 3475789229 },
{ "koth_blowout", 3473248257 },
{ "koth_mannhole", 3478225408 },
{ "koth_demolition", 3473618662 },
{ "ctf_pressure", 3480634190 },
// Halloween 2025
{ "cp_cowerhouse", 3028277335 },
{ "koth_dusker", 3562630084 },
{ "arena_afterlife", 3557320996 },
{ "ctf_doublecross_event", 3024700002 },
{ "sd_marshlands", 3565681202 },
};
*/
@@ -705,7 +739,7 @@ ConVar tf_test_special_ducks( "tf_test_special_ducks", "1", FCVAR_DEVELOPMENTONL
ConVar tf_mm_abandoned_players_per_team_max( "tf_mm_abandoned_players_per_team_max", "1", FCVAR_DEVELOPMENTONLY );
#endif // GAME_DLL
ConVar tf_mm_next_map_vote_time( "tf_mm_next_map_vote_time", "30", FCVAR_REPLICATED );
ConVar tf_mm_next_map_vote_time( "tf_mm_next_map_vote_time", "15", FCVAR_REPLICATED );
static float g_fEternaweenAutodisableTime = 0.0f;
@@ -7412,9 +7446,10 @@ float CTFGameRules::ApplyOnDamageAliveModifyRules( const CTakeDamageInfo &info,
}
}
if ( pAttacker == pVictimBaseEntity &&
(info.GetDamageType() & DMG_BLAST || info.GetDamageCustom() == TF_DMG_CUSTOM_FLARE_EXPLOSION) &&
info.GetDamagedOtherPlayers() == 0 && (info.GetDamageCustom() != TF_DMG_CUSTOM_TAUNTATK_GRENADE) )
if ( ( pAttacker == pVictimBaseEntity ) &&
( ( info.GetDamageType() & DMG_BLAST ) || ( info.GetDamageCustom() == TF_DMG_CUSTOM_FLARE_EXPLOSION ) ) &&
( info.GetDamagedOtherPlayers() == 0 ) &&
( info.GetDamageCustom() != TF_DMG_CUSTOM_TAUNTATK_GRENADE ) )
{
// If we attacked ourselves, hurt no other players, and it is a blast,
// check the attribute that reduces rocket jump damage.
@@ -12402,6 +12437,10 @@ const char *CTFGameRules::GetKillingWeaponName( const CTakeDamageInfo &info, CTF
killer_weapon_name = "megaton";
}
}
else if ( info.GetDamageCustom() == TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT )
{
killer_weapon_name = "tf_weapon_taunt_trickshot";
}
else if ( pScorer && pInflictor && ( pInflictor == pScorer ) )
{
// If this is not a suicide
+1 -6
View File
@@ -36,8 +36,8 @@
// Client specific.
#ifdef CLIENT_DLL
#include "c_tf_player.h"
#include "c_baseviewmodel.h"
#include "c_tf_player.h"
#include "c_te_effect_dispatch.h"
#include "c_tf_fx.h"
#include "soundenvelope.h"
@@ -3136,11 +3136,6 @@ void CTFPlayerShared::ConditionThink( void )
#endif
}
}
else
{
// RocketPack not found, may have been unequipped, or we may be a Medic who inherited the cond
RemoveCond( TF_COND_ROCKETPACK );
}
}
}
+2
View File
@@ -915,6 +915,7 @@ const char *g_szSpecialDamageNames[] =
"TF_DMG_CUSTOM_AXTINGUISHER_BOOSTED",
"TF_DMG_CUSTOM_KRAMPUS_MELEE",
"TF_DMG_CUSTOM_KRAMPUS_RANGED",
"TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT",
};
COMPILE_TIME_ASSERT( ARRAYSIZE( g_szSpecialDamageNames ) == TF_DMG_CUSTOM_END );
@@ -1053,6 +1054,7 @@ static const char* taunt_attack_name[] =
"TAUNTATK_ALLCLASS_GUITAR_RIFF",
"TAUNTATK_MEDIC_HEROIC_TAUNT",
"TAUNTATK_PYRO_GASBLAST",
"TAUNTATK_ENGINEER_TRICKSHOT",
//
// INSERT NEW ITEMS HERE TO AVOID BREAKING DEMOS
+4 -1
View File
@@ -966,6 +966,7 @@ enum taunt_attack_t
TAUNTATK_ALLCLASS_GUITAR_RIFF,
TAUNTATK_MEDIC_HEROIC_TAUNT,
TAUNTATK_PYRO_GASBLAST,
TAUNTATK_ENGINEER_TRICKSHOT,
//
// INSERT NEW ITEMS HERE TO AVOID BREAKING DEMOS
@@ -1263,6 +1264,7 @@ enum ETFDmgCustom
TF_DMG_CUSTOM_AXTINGUISHER_BOOSTED,
TF_DMG_CUSTOM_KRAMPUS_MELEE,
TF_DMG_CUSTOM_KRAMPUS_RANGED,
TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT,
//
// INSERT NEW ITEMS HERE TO AVOID BREAKING DEMOS
//
@@ -1287,7 +1289,8 @@ inline bool IsTauntDmg( int iType )
iType == TF_DMG_CUSTOM_TAUNTATK_ARMAGEDDON ||
iType == TF_DMG_CUSTOM_TAUNTATK_ALLCLASS_GUITAR_RIFF ||
iType == TF_DMG_CUSTOM_TAUNTATK_ENGINEER_ARM_KILL ||
iType == TF_DMG_CUSTOM_TAUNTATK_GASBLAST );
iType == TF_DMG_CUSTOM_TAUNTATK_GASBLAST ||
iType == TF_DMG_CUSTOM_TAUNTATK_TRICKSHOT );
}
inline bool IsDOTDmg( int iType )
{
+1 -1
View File
@@ -209,7 +209,7 @@ void CTFJar::TossJarThink( void )
if ( pProjectile->ExplodesOnHit() )
{
Vector vecEnd = pProjectile->GetAbsOrigin() + ( vecVelocity.Normalized() * 32.0f );
UTIL_TraceHull( pProjectile->GetAbsOrigin(), vecEnd, -Vector(8, 8, 8), Vector(8, 8, 8), MASK_SOLID_BRUSHONLY, &traceFilter, &trace );
UTIL_TraceHull( pProjectile->GetAbsOrigin(), vecEnd, -Vector( 8, 8, 8 ), Vector( 8, 8, 8 ), MASK_SOLID_BRUSHONLY, &traceFilter, &trace );
if ( trace.fraction < 1.0 )
{
+1 -1
View File
@@ -70,7 +70,7 @@ ConVar tf_rocketpack_impact_push_min( "tf_rocketpack_impact_push_min", "100", FC
ConVar tf_rocketpack_impact_push_max( "tf_rocketpack_impact_push_max", "300", FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_HIDDEN );
ConVar tf_rocketpack_launch_push( "tf_rocketpack_launch_push", "250", FCVAR_REPLICATED | FCVAR_CHEAT | FCVAR_HIDDEN );
#ifdef GAME_DLL
#if defined( GAME_DLL ) || defined( STAGING_ONLY )
#define TF_ROCKETPACK_PASSENGER_DELAY_LAUNCH 0.2f
#endif // GAME_DLL
+3 -3
View File
@@ -2088,7 +2088,7 @@ void CTFWeaponBase::IncrementAmmo( void )
}
else if ( !CheckReloadMisfire() )
{
if ( pPlayer && pPlayer->GetAmmoCount( m_iPrimaryAmmoType ) > 0 && m_iClip1 < GetMaxClip1() )
if ( pPlayer && pPlayer->GetAmmoCount( m_iPrimaryAmmoType ) > 0 && ( m_iClip1 < GetMaxClip1() ) )
{
m_iClip1++;
pPlayer->RemoveAmmo( 1, m_iPrimaryAmmoType );
@@ -4969,7 +4969,7 @@ void CTFWeaponBase::ApplyOnHitAttributes( CBaseEntity *pVictimBaseEntity, CTFPla
if ( pVictim &&
pVictim->IsPlayerClass( TF_CLASS_SPY ) &&
pVictim->m_Shared.InCond( TF_COND_DISGUISED ) &&
(pVictim->m_Shared.GetDisguiseTeam() != pVictim->GetTeamNumber()) &&
( pVictim->m_Shared.GetDisguiseTeam() != pVictim->GetTeamNumber() ) &&
!( pVictim->m_Shared.IsStealthed() || pVictim->m_Shared.InCond( TF_COND_STEALTHED_BLINK ) ) )
{
flPercentage = 0.0f;
@@ -5031,7 +5031,7 @@ void CTFWeaponBase::ApplyOnHitAttributes( CBaseEntity *pVictimBaseEntity, CTFPla
}
// On hit attributes don't work when you shoot disguised spies
if ( pVictim->m_Shared.InCond( TF_COND_DISGUISED ) && pVictim->m_Shared.GetDisguiseTeam() != pVictim->GetTeamNumber() )
if ( pVictim->m_Shared.InCond( TF_COND_DISGUISED ) && ( pVictim->m_Shared.GetDisguiseTeam() != pVictim->GetTeamNumber() ) )
return;
}
+2 -2
View File
@@ -695,9 +695,9 @@ const char *GetCleanMapName( const char *pszUnCleanMapName, char (&pszTmp)[256]
inline bool MapHasPrefix( const char *pszUnCleanMapName, const char *prefix )
{
char maptmp[256];
char maptmp[ 256 ];
const char *pszCleanMapName = GetCleanMapName( pszUnCleanMapName, maptmp );
return StringHasPrefix(pszCleanMapName, prefix);
return StringHasPrefix( pszCleanMapName, prefix );
}
#endif // UTIL_SHARED_H
+1 -1
View File
@@ -378,7 +378,7 @@ void CVoiceStatus::UpdateServerState(bool bForce)
player_info_t pi;
if ( !engine->GetPlayerInfo( playerIndex+1, &pi ) )
if ( !engine->GetPlayerInfo( playerIndex + 1, &pi ) )
continue;
if ( m_BanMgr.GetPlayerBan( pi.guid ) )
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -786,6 +786,7 @@ struct dfaceid_t
};
// NOTE: Only 7-bits stored!!!
#define LEAF_FLAGS_SKY 0x01 // This leaf has 3D sky in its PVS
#define LEAF_FLAGS_RADIAL 0x02 // This leaf culled away some portals due to radial vis
+18 -5
View File
@@ -1771,18 +1771,27 @@ FORCEINLINE void StoreAligned3SIMD( VectorAligned * RESTRICT pSIMD, const fltx4
StoreAlignedSIMD( pSIMD->Base(),a );
}
FORCEINLINE fltx4 LoadAlignedSIMD( const void *pSIMD )
#define IS_FLOAT_TYPE(T) \
( sizeof( T ) == sizeof( float ) || sizeof ( T ) == sizeof( fltx4 ) )
template <typename T>
FORCEINLINE fltx4 LoadAlignedSIMD( const T *pSIMD )
{
static_assert( IS_FLOAT_TYPE(T), "You are doing something wrong." );
return _mm_load_ps( reinterpret_cast< const float *> ( pSIMD ) );
}
FORCEINLINE shortx8 LoadAlignedShortSIMD( const void *pSIMD )
template <typename T>
FORCEINLINE shortx8 LoadAlignedShortSIMD( const T *pSIMD )
{
static_assert( IS_FLOAT_TYPE(T), "You are doing something wrong." );
return _mm_load_si128( reinterpret_cast< const shortx8 *> ( pSIMD ) );
}
FORCEINLINE shortx8 LoadUnalignedShortSIMD( const void *pSIMD )
template <typename T>
FORCEINLINE shortx8 LoadUnalignedShortSIMD( const T *pSIMD )
{
static_assert( IS_FLOAT_TYPE(T), "You are doing something wrong." );
return _mm_loadu_si128( reinterpret_cast< const shortx8 *> ( pSIMD ) );
}
@@ -1819,13 +1828,17 @@ FORCEINLINE fltx4 LoadAlignedSIMD( const VectorAligned & pSIMD )
return SetWToZeroSIMD( LoadAlignedSIMD(pSIMD.Base()) );
}
NO_ASAN_FORCEINLINE fltx4 LoadUnalignedSIMD( const void *pSIMD )
template <typename T>
NO_ASAN_FORCEINLINE fltx4 LoadUnalignedSIMD( const T *pSIMD )
{
static_assert( IS_FLOAT_TYPE(T), "You are doing something wrong." );
return _mm_loadu_ps( reinterpret_cast<const float *>( pSIMD ) );
}
NO_ASAN_FORCEINLINE fltx4 LoadUnaligned3SIMD( const void *pSIMD )
template <typename T>
NO_ASAN_FORCEINLINE fltx4 LoadUnaligned3SIMD( const T *pSIMD )
{
static_assert( IS_FLOAT_TYPE(T), "You are doing something wrong." );
return _mm_loadu_ps( reinterpret_cast<const float *>( pSIMD ) );
}
+1
View File
@@ -854,6 +854,7 @@ public:
// dumps info about the object to Msg()
virtual void OutputDebugInfo() const = 0;
virtual float GetBuoyancyRatio( void ) const = 0;
};
+5
View File
@@ -218,6 +218,7 @@ BEGIN_BYTESWAP_DATADESC( dfaceid_t )
DEFINE_FIELD( hammerfaceid, FIELD_SHORT ),
END_BYTESWAP_DATADESC()
BEGIN_BYTESWAP_DATADESC( dbrush_t )
DEFINE_FIELD( firstside, FIELD_INTEGER ),
DEFINE_FIELD( numsides, FIELD_INTEGER ),
@@ -631,6 +632,7 @@ dface_t dfaces[MAX_MAP_FACES];
int numfaceids;
CUtlVector<dfaceid_t> dfaceids;
int numfaces_hdr;
dface_t dfaces_hdr[MAX_MAP_FACES];
@@ -2235,6 +2237,7 @@ void LoadBSPFile( const char *filename )
CopyOptionalLump( LUMP_FACEIDS, dfaceids );
g_numprimitives = CopyLump( LUMP_PRIMITIVES, g_primitives );
g_numprimverts = CopyLump( LUMP_PRIMVERTS, g_primverts );
g_numprimindices = CopyLump( FIELD_SHORT, LUMP_PRIMINDICES, g_primindices );
@@ -2365,6 +2368,7 @@ void UnloadBSPFile()
dfaceids.Purge();
g_numprimitives = 0;
g_numprimverts = 0;
g_numprimindices = 0;
@@ -2669,6 +2673,7 @@ void WriteBSPFile( const char *filename, char *pUnused )
AddLump( LUMP_FACES_HDR, dfaces_hdr, numfaces_hdr, LUMP_FACES_VERSION );
AddLump ( LUMP_FACEIDS, dfaceids, numfaceids );
AddLump( LUMP_ORIGINALFACES, dorigfaces, numorigfaces ); // original faces lump
AddLump( LUMP_BRUSHES, dbrushes, numbrushes );
AddLump( LUMP_BRUSHSIDES, dbrushsides, numbrushsides );
+1
View File
@@ -518,6 +518,7 @@ void SnapRemainingVertsToSurface( CCoreDispInfo **ppListBase, ddispinfo_t *pBSPD
void EmitDispLMAlphaAndNeighbors()
{
int i;
Msg( "Finding displacement neighbors...\n" );
+32 -17
View File
@@ -664,6 +664,7 @@ qboolean CMapFile::MakeBrushWindings (mapbrush_t *ob)
return true;
}
//-----------------------------------------------------------------------------
// Purpose: Takes all of the brushes from the current entity and adds them to the
// world's brush list. Used by func_detail and func_areaportal.
@@ -700,12 +701,16 @@ void CMapFile::MoveBrushesToWorld( entity_t *mapent )
memcpy (mapbrushes + worldbrushes, temp, sizeof(mapbrush_t) * newbrushes);
// fix up indexes
entities[0].numbrushes += newbrushes;
for (i=1 ; i<num_entities ; i++)
entities[i].firstbrush += newbrushes;
free (temp);
mapent->numbrushes = 0;
entities[ 0 ].numbrushes += newbrushes;
{
for ( i = 1; i < num_entities; i++ )
entities[ i ].firstbrush += newbrushes;
mapent->numbrushes = 0;
}
free(temp);
}
//-----------------------------------------------------------------------------
@@ -754,13 +759,17 @@ void CMapFile::MoveBrushesToWorldGeneral( entity_t *mapent )
// fix up indexes
entities[0].numbrushes += newbrushes;
for (i=1 ; i<num_entities ; i++)
{
if ( entities[ i ].firstbrush < mapent->firstbrush ) // if we use <=, then we'll remap the passed in ent, which we don't want to
for ( i = 1; i < num_entities; i++ )
{
entities[ i ].firstbrush += newbrushes;
if (entities[ i ].firstbrush < mapent->firstbrush ) // if we use <=, then we'll remap the passed in ent, which we don't want to
{
entities[ i ].firstbrush += newbrushes;
}
}
}
free (temp);
mapent->numbrushes = 0;
@@ -1581,11 +1590,12 @@ ChunkFileResult_t CMapFile::LoadEntityCallback(CChunkFile *pFile, int nParam)
if ( !strcmp( "func_detail", pClassName ) )
{
MoveBrushesToWorld (mapent);
mapent->numbrushes = 0;
MoveBrushesToWorld( mapent );
mapent->numbrushes = 0;
// clear out this entity
mapent->epairs = NULL;
// clear out this entity
mapent->epairs = NULL;
return(ChunkFile_Ok);
}
@@ -1971,6 +1981,7 @@ bool CMapFile::DeterminePath( const char *pszBaseFileName, const char *pszInstan
//-----------------------------------------------------------------------------
void CMapFile::CheckForInstances( const char *pszFileName )
{
if ( this != g_MainMap )
{ // all sub-instances will be appended to the main map master list as they are read in
// so the main loop below will naturally get to the appended ones.
@@ -2019,6 +2030,8 @@ void CMapFile::CheckForInstances( const char *pszFileName )
if ( !strcmp( pEntity, "func_instance" ) )
{
char *pInstanceFile = ValueForKey( &entities[ i ], "file" );
if ( pInstanceFile[ 0 ] )
{
char InstancePath[ MAX_PATH ];
@@ -2368,7 +2381,9 @@ void CMapFile::MergeEntities( entity_t *pInstanceEntity, CMapFile *Instance, Vec
entities[ num_entities + i ] = Instance->entities[ i ];
entity_t *entity = &entities[ num_entities + i ];
entity->firstbrush += ( nummapbrushes - Instance->nummapbrushes );
{
entity->firstbrush += ( nummapbrushes - Instance->nummapbrushes );
}
char *pID = ValueForKey( entity, "hammerid" );
if ( pID[ 0 ] )
@@ -2403,21 +2418,21 @@ void CMapFile::MergeEntities( entity_t *pInstanceEntity, CMapFile *Instance, Vec
GDclass *EntClass = GD.BeginInstanceRemap( pEntity, NameFixup, InstanceOrigin, InstanceAngle );
if ( EntClass )
{
for( int i = 0; i < EntClass->GetVariableCount(); i++ )
for( int j = 0; j < EntClass->GetVariableCount(); j++ )
{
GDinputvariable *EntVar = EntClass->GetVariableAt( i );
GDinputvariable *EntVar = EntClass->GetVariableAt( j );
char *pValue = ValueForKey( entity, ( char * )EntVar->GetName() );
if ( GD.RemapKeyValue( EntVar->GetName(), pValue, temp, FixupStyle ) )
{
#ifdef MERGE_INSTANCE_DEBUG_INFO
Msg( " %d. Remapped %s: from %s to %s\n", i, EntVar->GetName(), pValue, temp );
Msg( " %d. Remapped %s: from %s to %s\n", j, EntVar->GetName(), pValue, temp );
#endif // #ifdef MERGE_INSTANCE_DEBUG_INFO
SetKeyValue( entity, EntVar->GetName(), temp );
}
else
{
#ifdef MERGE_INSTANCE_DEBUG_INFO
Msg( " %d. Ignored %s: %s\n", i, EntVar->GetName(), pValue );
Msg( " %d. Ignored %s: %s\n", j, EntVar->GetName(), pValue );
#endif // #ifdef MERGE_INSTANCE_DEBUG_INFO
}
}
+4
View File
@@ -206,6 +206,7 @@ void OverlayTransition_AddFaceToLists( int iFace, side_t *pSide )
//-----------------------------------------------------------------------------
void Overlay_EmitOverlayFace( mapoverlay_t *pMapOverlay )
{
Assert( g_nOverlayCount < MAX_MAP_OVERLAYS );
if ( g_nOverlayCount >= MAX_MAP_OVERLAYS )
{
@@ -296,6 +297,7 @@ void Overlay_EmitOverlayFace( mapoverlay_t *pMapOverlay )
//-----------------------------------------------------------------------------
void OverlayTransition_EmitOverlayFace( mapoverlay_t *pMapOverlay )
{
Assert( g_nWaterOverlayCount < MAX_MAP_WATEROVERLAYS );
if ( g_nWaterOverlayCount >= MAX_MAP_WATEROVERLAYS )
{
@@ -378,6 +380,7 @@ void OverlayTransition_EmitOverlayFace( mapoverlay_t *pMapOverlay )
//-----------------------------------------------------------------------------
void Overlay_EmitOverlayFaces( void )
{
int nMapOverlayCount = g_aMapOverlays.Count();
for( int iMapOverlay = 0; iMapOverlay < nMapOverlayCount; ++iMapOverlay )
{
@@ -390,6 +393,7 @@ void Overlay_EmitOverlayFaces( void )
//-----------------------------------------------------------------------------
void OverlayTransition_EmitOverlayFaces( void )
{
int nMapOverlayCount = g_aMapWaterOverlays.Count();
for( int iMapOverlay = 0; iMapOverlay < nMapOverlayCount; ++iMapOverlay )
{
+1
View File
@@ -569,6 +569,7 @@ static void SetLumpData( )
void EmitStaticProps()
{
CreateInterfaceFn physicsFactory = GetPhysicsFactory();
if ( physicsFactory )
{
+30 -8
View File
@@ -84,6 +84,7 @@ int entity_num;
node_t *block_nodes[BLOCKS_SPACE+2][BLOCKS_SPACE+2];
//-----------------------------------------------------------------------------
// Assign occluder areas (must happen *after* the world model is processed)
//-----------------------------------------------------------------------------
@@ -201,8 +202,10 @@ ProcessWorldModel
============
*/
void SplitSubdividedFaces( node_t *headnode ); // garymcthack
void ProcessSubModel(); // fwd decl
void ProcessWorldModel (void)
{
entity_t *e;
tree_t *tree = NULL;
qboolean leaked;
@@ -392,32 +395,49 @@ void ProcessSubModel( )
mins[0] = mins[1] = mins[2] = MIN_COORD_INTEGER;
maxs[0] = maxs[1] = maxs[2] = MAX_COORD_INTEGER;
list = MakeBspBrushList (start, end, mins, maxs, FULL_DETAIL);
int nDetailScreen = FULL_DETAIL;
list = MakeBspBrushList( start, end, mins, maxs, nDetailScreen );
if (!nocsg)
list = ChopBrushes (list);
tree = BrushBSP (list, mins, maxs);
// This would wind up crashing the engine because we'd have a negative leaf index in dmodel_t::headnode.
if ( tree->headnode->planenum == PLANENUM_LEAF )
if ( ( tree->headnode->planenum == PLANENUM_LEAF )
)
{
const char *pClassName = ValueForKey( e, "classname" );
const char *pTargetName = ValueForKey( e, "targetname" );
Error( "bmodel %d has no head node (class '%s', targetname '%s')", entity_num, pClassName, pTargetName );
}
MakeTreePortals (tree);
{
MakeTreePortals(tree);
}
#if DEBUG_BRUSHMODEL
if ( entity_num == DEBUG_BRUSHMODEL )
WriteGLView( tree, "tree_all" );
#endif
MarkVisibleSides (tree, start, end, FULL_DETAIL);
MarkVisibleSides( tree, start, end, nDetailScreen );
MakeFaces (tree->headnode);
FixTjuncs( tree->headnode, NULL );
WriteBSP( tree->headnode, NULL );
if ( nDetailScreen == NO_DETAIL )
{
face_t* pLeafFaceList = NULL;
if ( !nodetail )
{
pLeafFaceList = MergeDetailTree( tree, start, end );
}
pLeafFaceList = FixTjuncs( tree->headnode, pLeafFaceList );
WriteBSP( tree->headnode, pLeafFaceList );
}
else
{
FixTjuncs( tree->headnode, NULL );
WriteBSP( tree->headnode, NULL );
}
#if DEBUG_BRUSHMODEL
if ( entity_num == DEBUG_BRUSHMODEL )
@@ -654,7 +674,9 @@ static void EmitOccluderBrushes()
occluderData.polycount = g_OccluderPolyData.Count() - occluderData.firstpoly;
// Mark this brush as not having brush geometry so it won't be re-emitted with a brush model
entities[entity_num].numbrushes = 0;
{
entities[ entity_num ].numbrushes = 0;
}
}
FreeTree( pOccluderTree );
@@ -759,7 +781,6 @@ void FixupOnlyEntsOccluderEntities()
}
}
void MarkNoDynamicShadowSides()
{
for ( int iSide=0; iSide < g_MainMap->nummapbrushsides; iSide++ )
@@ -837,6 +858,7 @@ void ProcessModels (void)
if ( !pEntity->numbrushes )
continue;
qprintf ("############### model %i ###############\n", nummodels);
BeginModel ();
+1
View File
@@ -638,6 +638,7 @@ struct mapoverlay_t
extern CUtlVector<mapoverlay_t> g_aMapOverlays;
extern CUtlVector<mapoverlay_t> g_aMapWaterOverlays;
int Overlay_GetFromEntity( entity_t *pMapEnt );
void Overlay_UpdateSideLists( int StartIndex );
void Overlay_AddFaceToLists( int iFace, side_t *pSide );
@@ -163,6 +163,7 @@ const char *GetShaderNameForTexInfo( int iTexInfo )
void WorldVertexTransitionFixup( void )
{
CUtlVector<entitySideList_t> sideList;
sideList.SetCount( g_MainMap->num_entities );
int i;
+9 -3
View File
@@ -406,6 +406,7 @@ int FindOrCreateOrigFace( face_t *f )
return index;
}
/*
==================
EmitFace
@@ -432,7 +433,8 @@ void EmitFace( face_t *f, qboolean onNode )
return;
// don't emit NODRAW faces for runtime
if ( texinfo[f->texinfo].flags & SURF_NODRAW )
if (
( texinfo[ f->texinfo ].flags & SURF_NODRAW ) )
{
// keep NODRAW terrain surfaces though
if ( f->dispinfo == -1 )
@@ -454,6 +456,7 @@ void EmitFace( face_t *f, qboolean onNode )
dfaceids.AddToTail();
dfaceids[numfaces].hammerfaceid = f->originalface->id;
numfaces++;
//
@@ -1256,8 +1259,10 @@ void EndBSPFile (void)
Overlay_EmitOverlayFaces();
OverlayTransition_EmitOverlayFaces();
// phys collision needs dispinfo to operate (needs to generate phys collision for displacement surfs)
EmitPhysCollision();
{
// phys collision needs dispinfo to operate (needs to generate phys collision for displacement surfs)
EmitPhysCollision();
}
// We can't calculate this properly until vvis (since we need vis to do this), so we set
// to zero everywhere by default.
@@ -1275,6 +1280,7 @@ void EndBSPFile (void)
// Make sure that we have a water lod control eneity if we have water in the map.
EnsurePresenceOfWaterLODControlEntity();
// Doing this here because stuff about may filter out entities
UnparseEntities ();