diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 47340f78b03..00000000000 --- a/.gitignore +++ /dev/null @@ -1,504 +0,0 @@ -# Files to ignore when considering what GIT should commit. - -# Visual Studio -*.suo -*.user -*.sln.docstates -*.obj -*.pch -*.tlog -*.log -*.scc -*.exp -*.ilk -*.lastbuildstate -vc100.pdb -ipch -*.sdf -*.opensdf -*.idb -*.vcxproj -*.sln - -# OSX/Linux build products -*.mak -*.mak.vpc_crc -*.xcodeproj/ -obj*/ -!devtools/*.mak -!utils/smdlexp/smdlexp.mak - -# Specific Source build products -client.pdb -client.dll -client.lib -server.pdb -server.dll -server.lib - -client.so -client.so.dbg -server.so -server.so.dbg -server_srv.so -server_srv.so.dbg - -client.dylib -client.dylib.dSYM/ -server.dylib -server.dylib.dSYM/ - -# files generated by running a mod -config.cfg - -# shader files -*.tmp - -# GCH -*.h.gch -*.h.gch.d - -*.sln -*.slnx -*.vcproj -*.vcxproj -*.vcxproj.* -*.obj -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates -*.userprefs -mono_crash.* -.vs/* -*.pdb -*.log -*.tlog -*.exp -*.FileListAbsolute.txt - -evntprov.h - -generated_proto_* -*.pb.cc -*.pb.hh - -*_Release/ -*_Debug/ -Release/x64/* -Debug/x64/* -Release_*/ -Debug_*/ -*.lastbuildstate -*.recipe - -*_nut.h # vscript autogen file - -*.vpc.sentinel -*.vpc_crc -*.vpc_cache - -*_nut.h - -__vpc__/ -_vpc_/ - -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.tlog -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio 6 auto-generated project file (contains which files were open etc.) -*.vbp - -# Visual Studio 6 workspace and project file (working project files containing files to include in project) -*.dsw -*.dsp - -# Visual Studio 6 technical files -*.ncb -*.aps - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# Visual Studio History (VSHistory) files -.vshistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - -# VS Code files for those working on multiple tools -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json -*.code-workspace - -# Local History for Visual Studio Code -.history/ - -# Windows Installer files from build outputs -*.cab -*.msi -*.msix -*.msm -*.msp - -# JetBrains Rider -*.sln.iml \ No newline at end of file diff --git a/src/game/server/tf/player_vs_environment/tf_tank_boss.cpp b/src/game/server/tf/player_vs_environment/tf_tank_boss.cpp index 57ab63cb363..d38db91c8da 100644 --- a/src/game/server/tf/player_vs_environment/tf_tank_boss.cpp +++ b/src/game/server/tf/player_vs_environment/tf_tank_boss.cpp @@ -185,6 +185,13 @@ BEGIN_DATADESC( CTFTankBoss ) DEFINE_INPUTFUNC( FIELD_INTEGER, "DestroyIfAtCapturePoint", InputDestroyIfAtCapturePoint ), DEFINE_INPUTFUNC( FIELD_STRING, "AddCaptureDestroyPostfix", InputAddCaptureDestroyPostfix ), + + DEFINE_INPUTFUNC( FIELD_STRING, "SetPath", InputSetPath ), + DEFINE_INPUTFUNC( FIELD_BOOLEAN, "CanDeploy", InputCanDeploy ), + DEFINE_INPUTFUNC( FIELD_VOID, "ForceDeploy", InputForceDeploy ), + + DEFINE_OUTPUT( m_outputOnBombDeployed, "OnBombDeployed" ), + END_DATADESC() //----------------------------------------------------------------------------------------------------- @@ -244,6 +251,7 @@ CTFTankBoss::CTFTankBoss() m_szDeathPostfix[ 0 ] = '\0'; m_flDroppingStart = 0.0f; m_flSpawnTime = 0.0f; + m_bCanDeploy = true; } @@ -340,7 +348,10 @@ void CTFTankBoss::Spawn( void ) SetModelIndexOverride( VISION_MODE_ROME, modelinfo->GetModelIndex( s_TankModelRome[ m_damageModelIndex ] ) ); m_lastHealth = GetMaxHealth(); - AddGlowEffect(); + if ( !HasSpawnFlags(SF_TANK_NOGLOW) ) + { + AddGlowEffect(); + } m_leftTracks = (CBaseAnimating *)CreateEntityByName( "prop_dynamic" ); if ( m_leftTracks ) @@ -517,6 +528,7 @@ void CTFTankBoss::Spawn( void ) //-------------------------------------------------------------------------------------- void CTFTankBoss::UpdateOnRemove( void ) { + StopSound( "MVM.TankDeploy" ); StopSound( "MVM.TankEngineLoop" ); if ( TFObjectiveResource() ) @@ -615,6 +627,82 @@ void CTFTankBoss::SetStartingPathTrackNode( char *name ) } +//-------------------------------------------------------------------------------------- +void CTFTankBoss::InputSetPath( inputdata_t &inputdata ) +{ + m_goalNode = dynamic_cast< CPathTrack * >( gEntList.FindEntityByName( NULL, inputdata.value.String() ) ); +} + + +//-------------------------------------------------------------------------------------- +void CTFTankBoss::InputCanDeploy( inputdata_t &inputdata ) +{ + m_bCanDeploy = inputdata.value.Bool(); +} + + +//-------------------------------------------------------------------------------------- +void CTFTankBoss::InputForceDeploy( inputdata_t &inputdata ) +{ + //Already Deploying? Ignore! + if ( m_isDroppingBomb ) + return; + + //No permission? No Deploy + if ( !m_bCanDeploy ) + return; + + m_goalNode = NULL; + + DeployBomb(); +} + + +//----------------------------------------------------------------------------------------------------- +void CTFTankBoss::DeployBomb(void) +{ + //DevMsg( "Tank's final position: %.2f %.2f %.2f", GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z ); + /*if ( TFGameRules() ) + { + TFGameRules()->SetBossNormalizedTravelDistance( 1.0f ); + }*/ + // reached end of track - deploy the bomb + int animSequence = m_bomb->LookupSequence( "deploy" ); + if ( animSequence ) + { + m_bomb->SetSequence( animSequence ); + m_bomb->SetPlaybackRate( 1.0f ); + m_bomb->SetCycle( 0 ); + m_bomb->ResetSequenceInfo(); + } + + animSequence = LookupSequence( "deploy" ); + if ( animSequence ) + { + SetSequence( animSequence ); + SetPlaybackRate( 1.0f ); + SetCycle( 0 ); + ResetSequenceInfo(); + } + + if ( m_flLastTankAlert + 5.0f < gpGlobals->curtime ) + { + TFGameRules()->PlayThrottledAlert( 255, "Announcer.MVM_Tank_Alert_Deploying", 5.0f ); + m_flLastTankAlert = gpGlobals->curtime; + m_bPlayedNearAlert = true; + } + + m_isDroppingBomb = true; + m_flDroppingStart = gpGlobals->curtime; + + StopSound( "MVM.TankEngineLoop" ); + + EmitSound( "MVM.TankDeploy" ); + + TFGameRules()->HaveAllPlayersSpeakConceptIfAllowed( MP_CONCEPT_MVM_TANK_DEPLOYING, TF_TEAM_PVE_DEFENDERS ); +} + + //----------------------------------------------------------------------------------------------------- void CTFTankBoss::TankBossThink( void ) { @@ -790,49 +878,9 @@ void CTFTankBoss::TankBossThink( void ) m_goalNode = m_goalNode->GetNext(); m_nNodeNumber++; - if ( m_goalNode == NULL && m_bomb ) + if ( m_goalNode == NULL && m_bomb && m_bCanDeploy ) { - //DevMsg( "Tank's final position: %.2f %.2f %.2f", GetAbsOrigin().x, GetAbsOrigin().y, GetAbsOrigin().z ); - - /*if ( TFGameRules() ) - { - TFGameRules()->SetBossNormalizedTravelDistance( 1.0f ); - }*/ - - // reached end of track - deploy the bomb - int animSequence = m_bomb->LookupSequence( "deploy" ); - if ( animSequence ) - { - m_bomb->SetSequence( animSequence ); - m_bomb->SetPlaybackRate( 1.0f ); - m_bomb->SetCycle( 0 ); - m_bomb->ResetSequenceInfo(); - } - - animSequence = LookupSequence( "deploy" ); - if ( animSequence ) - { - SetSequence( animSequence ); - SetPlaybackRate( 1.0f ); - SetCycle( 0 ); - ResetSequenceInfo(); - } - - if ( m_flLastTankAlert + 5.0f < gpGlobals->curtime ) - { - TFGameRules()->PlayThrottledAlert( 255, "Announcer.MVM_Tank_Alert_Deploying", 5.0f ); - m_flLastTankAlert = gpGlobals->curtime; - m_bPlayedNearAlert = true; - } - - m_isDroppingBomb = true; - m_flDroppingStart = gpGlobals->curtime; - - StopSound( "MVM.TankEngineLoop" ); - - EmitSound( "MVM.TankDeploy" ); - - TFGameRules()->HaveAllPlayersSpeakConceptIfAllowed( MP_CONCEPT_MVM_TANK_DEPLOYING, TF_TEAM_PVE_DEFENDERS ); + DeployBomb(); } } @@ -857,9 +905,13 @@ void CTFTankBoss::TankBossThink( void ) if ( m_isDroppingBomb && IsSequenceFinished() ) { FirePopFileEvent( &m_onBombDroppedEventInfo ); + m_outputOnBombDeployed.FireOutput( this, this ); m_isDroppingBomb = false; TFGameRules()->BroadcastSound( 255, "Announcer.MVM_Tank_Planted" ); + + // rabscootle - MVM Wave Win/Lose Responses + TFGameRules()->HaveAllPlayersSpeakConceptIfAllowed( MP_CONCEPT_MVM_WAVE_LOSE, TF_TEAM_PVE_DEFENDERS ); } // if the Tank is driving under something, shut off its smokestack @@ -980,6 +1032,7 @@ void CTFTankBoss::FirePopFileEvent( EventInfo *eventInfo ) void CTFTankBoss::Explode( void ) { + StopSound( "MVM.TankDeploy" ); StopSound( "MVM.TankEngineLoop" ); FirePopFileEvent( &m_onKilledEventInfo ); @@ -1074,4 +1127,3 @@ void CTFTankBoss::UpdatePingSound( void ) EmitSound( "MVM.TankPing"); } } - diff --git a/src/game/server/tf/player_vs_environment/tf_tank_boss.h b/src/game/server/tf/player_vs_environment/tf_tank_boss.h index 005a490d229..a958db6f840 100644 --- a/src/game/server/tf/player_vs_environment/tf_tank_boss.h +++ b/src/game/server/tf/player_vs_environment/tf_tank_boss.h @@ -10,6 +10,8 @@ //---------------------------------------------------------------------------- class CTFTankBoss : public CTFBaseBoss { + #define SF_TANK_NOGLOW 2 + public: DECLARE_CLASS( CTFTankBoss, CTFBaseBoss ); DECLARE_SERVERCLASS(); @@ -32,10 +34,15 @@ class CTFTankBoss : public CTFBaseBoss virtual void Event_Killed( const CTakeDamageInfo &info ); + void DeployBomb( void ); void TankBossThink( void ); void SetStartingPathTrackNode( char *name ); + void InputSetPath( inputdata_t &inputdata ); + void InputCanDeploy( inputdata_t &inputdata ); + void InputForceDeploy( inputdata_t &inputdata ); + void DefineOnKilledOutput( EventInfo *eventInfo ); void DefineOnBombDroppedOutput( EventInfo *eventInfo ); @@ -43,6 +50,9 @@ class CTFTankBoss : public CTFBaseBoss virtual int GetCurrencyValue( void ); + // Entity I/O - For Mappers + COutputEvent m_outputOnBombDeployed; + // Input handlers void InputDestroyIfAtCapturePoint( inputdata_t &inputdata ); void InputAddCaptureDestroyPostfix( inputdata_t &inputdata ); @@ -73,6 +83,7 @@ class CTFTankBoss : public CTFBaseBoss int m_exhaustAttachment; bool m_isSmoking; + bool m_bCanDeploy; bool m_bIsPlayerKilled; bool m_bPlayedHalfwayAlert; @@ -128,4 +139,4 @@ inline void CTFTankBoss::DefineOnBombDroppedOutput( EventInfo *eventInfo ) } } -#endif // TF_TANK_BOSS_H +#endif // TF_TANK_BOSS_H \ No newline at end of file diff --git a/src/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp b/src/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp index d3dd638b2d8..61f2529b6cf 100644 --- a/src/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp +++ b/src/game/server/tf/player_vs_environment/tf_tank_boss_body.cpp @@ -5,6 +5,7 @@ #include "tf_tank_boss.h" #include "tf_tank_boss_body.h" +ConVar bf_tank_boss_collisiontype("tf_mvm_tank_collisionmask", "1", FCVAR_NONE, "Collision mask to use for tanks \n 0 - CONTENTS_SOLID \n 1 - MASK_SOLID "); //------------------------------------------------------------------------------------------- CTFTankBossBody::CTFTankBossBody( INextBot *bot ) : IBody( bot ) @@ -51,8 +52,11 @@ void CTFTankBossBody::Update( void ) //--------------------------------------------------------------------------------------------- -// return the bot's collision mask (hack until we get a general hull trace abstraction here or in the locomotion interface) unsigned int CTFTankBossBody::GetSolidMask( void ) const { - return CONTENTS_SOLID; + //Convar for legacy maps support. + if ( bf_tank_boss_collisiontype.GetInt() ) + return MASK_SOLID; + else + return CONTENTS_SOLID; }