From 26cc1f08713598d0c23766ffccbe3d46fc5a12ec Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Fri, 4 Oct 2019 01:22:06 +0200 Subject: [PATCH 01/11] Fix crash on startup This crashes on Linux as pKeyValuesData is NULL when deleteThis() is invoked. This likely is caused by another issue, but fixing this here seems good regardless. --- mp/src/game/client/hud.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/mp/src/game/client/hud.cpp b/mp/src/game/client/hud.cpp index ac243724f32..f6540e3af7a 100644 --- a/mp/src/game/client/hud.cpp +++ b/mp/src/game/client/hud.cpp @@ -134,10 +134,13 @@ void LoadHudTextures( CUtlDict< CHudTexture *, int >& list, const char *szFilena pTemp = pTemp->GetNextKey(); } } - } - // Failed for some reason. Delete the Key data and abort. - pKeyValuesData->deleteThis(); + pKeyValuesData->deleteThis(); + } + else + { + Warning( "Unable to read script %s.\n", szFilenameWithoutExtension ); + } } //----------------------------------------------------------------------------- From 76985ee36861e683a4dfebe48fa42987f510d3ec Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Thu, 3 Oct 2019 16:07:16 +0200 Subject: [PATCH 02/11] Fix #includes casing This is important for case-sensitive filesystems/operating systems (i.e. Linux). --- .../game/client/fortress/CommanderOverlay.cpp | 2 +- .../game/client/fortress/CommanderOverlay.h | 2 +- .../client/fortress/ObjectControlPanel.cpp | 6 ++--- .../game/client/fortress/ObjectControlPanel.h | 2 +- mp/src/game/client/fortress/ProxyTFPlayer.cpp | 12 +++++----- .../client/fortress/RespawnWaveVGuiScreen.cpp | 4 ++-- .../client/fortress/VGuiScreenVehicleBay.cpp | 6 ++--- .../fortress/c_basecombatcharacter_tf2.cpp | 4 ++-- .../fortress/c_basefourwheelvehicle.cpp | 2 +- mp/src/game/client/fortress/c_baseobject.cpp | 6 ++--- mp/src/game/client/fortress/c_baseobject.h | 2 +- .../game/client/fortress/c_basetfplayer.cpp | 4 ++-- .../client/fortress/c_effect_shootingstar.cpp | 2 +- mp/src/game/client/fortress/c_env_meteor.cpp | 2 +- mp/src/game/client/fortress/c_func_resource.h | 2 +- .../game/client/fortress/c_gasoline_blob.cpp | 4 ++-- .../fortress/c_grenade_objectsapper.cpp | 2 +- .../game/client/fortress/c_maker_bughole.cpp | 4 ++-- .../client/fortress/c_obj_base_manned_gun.cpp | 2 +- .../client/fortress/c_obj_buff_station.cpp | 4 ++-- mp/src/game/client/fortress/c_obj_bunker.cpp | 2 +- .../client/fortress/c_obj_dragonsteeth.cpp | 2 +- .../game/client/fortress/c_obj_explosives.cpp | 2 +- mp/src/game/client/fortress/c_obj_mortar.cpp | 2 +- .../client/fortress/c_obj_resourcepump.cpp | 6 ++--- .../client/fortress/c_obj_respawn_station.cpp | 2 +- .../game/client/fortress/c_obj_resupply.cpp | 2 +- .../client/fortress/c_obj_sandbag_bunker.cpp | 2 +- .../game/client/fortress/c_obj_selfheal.cpp | 2 +- .../game/client/fortress/c_obj_sentrygun.cpp | 2 +- mp/src/game/client/fortress/c_obj_tower.cpp | 2 +- mp/src/game/client/fortress/c_obj_tunnel.cpp | 2 +- .../client/fortress/c_obj_vehicleboost.cpp | 2 +- mp/src/game/client/fortress/c_order.cpp | 2 +- mp/src/game/client/fortress/c_shield.cpp | 10 ++++----- mp/src/game/client/fortress/c_shield.h | 2 +- mp/src/game/client/fortress/c_shield_flat.cpp | 2 +- .../game/client/fortress/c_tf2rootpanel.cpp | 2 +- mp/src/game/client/fortress/c_tf2rootpanel.h | 2 +- mp/src/game/client/fortress/c_tf_basehint.cpp | 2 +- mp/src/game/client/fortress/c_tf_basehint.h | 2 +- .../game/client/fortress/c_tf_class_recon.h | 2 +- mp/src/game/client/fortress/c_tf_flare.cpp | 4 ++-- mp/src/game/client/fortress/c_tf_hints.cpp | 2 +- mp/src/game/client/fortress/c_tfcarrier.cpp | 2 +- .../fortress/c_vehicle_battering_ram.cpp | 2 +- .../game/client/fortress/c_vehicle_mortar.cpp | 2 +- .../client/fortress/c_vehicle_siege_tower.cpp | 2 +- .../game/client/fortress/c_vehicle_tank.cpp | 2 +- .../game/client/fortress/c_walker_strider.cpp | 2 +- .../game/client/fortress/c_weapon_builder.cpp | 4 ++-- .../fortress/c_weapon_chargeableplasma.cpp | 2 +- .../game/client/fortress/c_weapon_mortar.cpp | 2 +- .../client/fortress/commanderoverlaypanel.cpp | 12 +++++----- mp/src/game/client/fortress/fx_tf2_blood.cpp | 6 ++--- .../client/fortress/fx_tf2_buildeffects.cpp | 8 +++---- .../game/client/fortress/fx_tf2_impacts.cpp | 2 +- .../game/client/fortress/fx_tf2_tracers.cpp | 2 +- mp/src/game/client/fortress/ground_line.cpp | 2 +- mp/src/game/client/fortress/hintitembase.cpp | 2 +- .../fortress/hud_commander_statuspanel.cpp | 2 +- .../client/fortress/hud_damageindicator.cpp | 8 +++---- .../game/client/fortress/hud_deathnotice.cpp | 4 ++-- mp/src/game/client/fortress/hud_emp.cpp | 6 ++--- mp/src/game/client/fortress/hud_minimap.cpp | 2 +- mp/src/game/client/fortress/hud_minimap.h | 2 +- mp/src/game/client/fortress/hud_orders.cpp | 2 +- mp/src/game/client/fortress/hud_target_id.cpp | 4 ++-- .../client/fortress/hud_targetreticle.cpp | 4 ++-- .../game/client/fortress/hud_targetreticle.h | 2 +- .../game/client/fortress/hud_vehicle_role.cpp | 2 +- .../fortress/infiltratorcamomaterialproxy.cpp | 6 ++--- mp/src/game/client/fortress/mapdata.cpp | 6 ++--- mp/src/game/client/fortress/mapdata.h | 2 +- .../game/client/fortress/minimap_players.cpp | 4 ++-- mp/src/game/client/fortress/minimap_trace.cpp | 4 ++-- mp/src/game/client/fortress/minimap_trace.h | 2 +- .../client/fortress/objectbuildalphaproxy.cpp | 6 ++--- mp/src/game/client/fortress/paneleffect.cpp | 2 +- .../fortress/playerandobjectenumerator.h | 4 ++-- mp/src/game/client/fortress/playeroverlay.cpp | 2 +- .../client/fortress/playeroverlayclass.cpp | 4 ++-- .../game/client/fortress/playeroverlayclass.h | 2 +- .../client/fortress/playeroverlayhealth.h | 2 +- .../client/fortress/playeroverlayname.cpp | 2 +- .../client/fortress/playeroverlayselected.cpp | 2 +- .../client/fortress/playeroverlayselected.h | 2 +- .../client/fortress/playeroverlaysquad.cpp | 4 ++-- .../game/client/fortress/proxy_objpower.cpp | 10 ++++----- mp/src/game/client/fortress/proxy_shield.cpp | 14 ++++++------ mp/src/game/client/fortress/proxy_sunroof.cpp | 14 ++++++------ .../client/fortress/resourcezoneoverlay.cpp | 8 +++---- .../client/fortress/teammaterialproxy.cpp | 4 ++-- .../game/client/fortress/vgui_classmenu.cpp | 2 +- .../game/client/fortress/vgui_healthbar.cpp | 2 +- mp/src/game/client/fortress/vgui_teammenu.cpp | 2 +- .../client/fortress/ztestmaterialproxy.cpp | 4 ++-- mp/src/game/client/fx_tf2_tracers.cpp | 2 +- mp/src/game/client/vgui_entityimagepanel.cpp | 2 +- mp/src/game/client/vgui_entityimagepanel.h | 2 +- mp/src/game/client/vgui_entitypanel.cpp | 4 ++-- mp/src/game/client/vgui_imagehealthpanel.cpp | 2 +- mp/src/game/client/vgui_imagehealthpanel.h | 2 +- mp/src/game/server/fortress/controlzone.cpp | 2 +- mp/src/game/server/fortress/env_meteor.cpp | 6 ++--- mp/src/game/server/fortress/env_meteor.h | 6 ++--- mp/src/game/server/fortress/info_act.cpp | 4 ++-- .../server/fortress/info_add_resources.cpp | 4 ++-- .../game/server/fortress/info_buildpoint.cpp | 4 ++-- .../game/server/fortress/info_customtech.cpp | 4 ++-- .../server/fortress/info_input_playsound.cpp | 6 ++--- .../server/fortress/info_input_resetbanks.cpp | 4 ++-- .../fortress/info_input_resetobjects.cpp | 4 ++-- .../fortress/info_input_respawnplayers.cpp | 4 ++-- .../server/fortress/info_minimappulse.cpp | 4 ++-- .../game/server/fortress/info_output_team.cpp | 4 ++-- .../game/server/fortress/info_vehicle_bay.cpp | 4 ++-- mp/src/game/server/fortress/mortar_round.cpp | 2 +- .../game/server/fortress/npc_bug_builder.cpp | 18 +++++++-------- mp/src/game/server/fortress/npc_bug_builder.h | 2 +- mp/src/game/server/fortress/npc_bug_hole.cpp | 16 +++++++------- .../game/server/fortress/npc_bug_warrior.cpp | 22 +++++++++---------- mp/src/game/server/fortress/npc_bug_warrior.h | 2 +- .../game/server/fortress/sensor_tf_team.cpp | 4 ++-- mp/src/game/server/fortress/team_messages.h | 2 +- mp/src/game/server/fortress/tf2_eventlog.cpp | 4 ++-- .../server/fortress/tf_class_commando.cpp | 2 +- .../game/server/fortress/tf_class_commando.h | 2 +- .../game/server/fortress/tf_class_defender.h | 2 +- mp/src/game/server/fortress/tf_class_escort.h | 2 +- .../server/fortress/tf_class_infiltrator.cpp | 2 +- .../server/fortress/tf_class_infiltrator.h | 2 +- mp/src/game/server/fortress/tf_class_medic.h | 2 +- mp/src/game/server/fortress/tf_class_pyro.h | 2 +- mp/src/game/server/fortress/tf_class_recon.h | 2 +- mp/src/game/server/fortress/tf_class_sapper.h | 2 +- mp/src/game/server/fortress/tf_class_sniper.h | 2 +- .../game/server/fortress/tf_class_support.h | 2 +- mp/src/game/server/fortress/tf_client.cpp | 2 +- mp/src/game/server/fortress/tf_filters.cpp | 2 +- .../server/fortress/tf_func_mass_teleport.cpp | 2 +- .../game/server/fortress/tf_func_no_build.cpp | 2 +- .../game/server/fortress/tf_func_resource.cpp | 4 ++-- mp/src/game/server/fortress/tf_obj.cpp | 2 +- .../server/fortress/tf_obj_barbed_wire.cpp | 2 +- .../server/fortress/tf_obj_buff_station.cpp | 2 +- .../tf_obj_manned_missilelauncher.cpp | 2 +- .../game/server/fortress/tf_obj_powerpack.cpp | 2 +- .../server/fortress/tf_obj_resourcepump.cpp | 2 +- .../game/server/fortress/tf_obj_resupply.cpp | 2 +- .../game/server/fortress/tf_obj_sentrygun.cpp | 2 +- .../server/fortress/tf_obj_shieldwall.cpp | 2 +- mp/src/game/server/fortress/tf_player.cpp | 4 ++-- .../game/server/fortress/tf_player_death.cpp | 2 +- mp/src/game/server/fortress/tf_playermove.cpp | 2 +- mp/src/game/server/fortress/tf_shield.h | 2 +- mp/src/game/server/fortress/tf_shield_flat.h | 2 +- .../game/server/fortress/tf_shieldgrenade.cpp | 4 ++-- mp/src/game/server/fortress/tf_stats.cpp | 2 +- .../game/server/fortress/tf_teamspawnpoint.h | 2 +- .../fortress/tf_vehicle_battering_ram.cpp | 2 +- .../server/fortress/tf_vehicle_flatbed.cpp | 2 +- .../server/fortress/tf_vehicle_mortar.cpp | 2 +- .../server/fortress/tf_vehicle_motorcycle.cpp | 2 +- .../fortress/tf_vehicle_siege_tower.cpp | 2 +- .../game/server/fortress/tf_vehicle_tank.cpp | 2 +- .../fortress/tf_vehicle_teleport_station.cpp | 4 ++-- .../fortress/tf_vehicle_teleport_station.h | 2 +- .../game/server/fortress/tf_vehicle_wagon.cpp | 2 +- .../server/fortress/tf_walker_strider.cpp | 2 +- .../game/server/fortress/trigger_skybox.cpp | 2 +- mp/src/game/server/hl2/npc_bullsquid.cpp | 14 ++++++------ mp/src/game/server/hl2/npc_houndeye.cpp | 2 +- mp/src/game/server/hl2/weapon_ar1.cpp | 2 +- mp/src/game/server/hl2/weapon_smg2.cpp | 2 +- mp/src/game/server/hl2/weapon_thumper.cpp | 2 +- mp/src/game/server/mapdata_server.cpp | 2 +- .../fortress/basetfcombatweapon_shared.cpp | 2 +- mp/src/game/shared/fortress/basetfvehicle.h | 4 ++-- .../shared/fortress/tf_gamemovement_chooser.h | 4 ++-- mp/src/game/shared/fortress/tf_gamerules.cpp | 2 +- mp/src/game/shared/fortress/tf_gamerules.h | 2 +- .../game/shared/fortress/tf_shield_shared.cpp | 2 +- mp/src/game/shared/fortress/tf_shieldshared.h | 6 ++--- .../game/shared/fortress/tf_tacticalmap.cpp | 2 +- .../game/shared/fortress/tfclassdata_shared.h | 1 + .../game/shared/fortress/weapon_arcwelder.cpp | 2 +- .../game/shared/fortress/weapon_builder.cpp | 2 +- .../fortress/weapon_combat_burstrifle.cpp | 2 +- .../fortress/weapon_combat_grenade_emp.cpp | 2 +- .../fortress/weapon_combat_plasmarifle.cpp | 2 +- .../game/shared/fortress/weapon_drainbeam.cpp | 2 +- .../shared/fortress/weapon_flame_thrower.cpp | 2 +- .../fortress/weapon_laserdesignator.cpp | 2 +- .../shared/fortress/weapon_laserrifle.cpp | 2 +- .../game/shared/fortress/weapon_repairgun.cpp | 2 +- 196 files changed, 329 insertions(+), 328 deletions(-) diff --git a/mp/src/game/client/fortress/CommanderOverlay.cpp b/mp/src/game/client/fortress/CommanderOverlay.cpp index b767f784edd..69f02c01fe3 100644 --- a/mp/src/game/client/fortress/CommanderOverlay.cpp +++ b/mp/src/game/client/fortress/CommanderOverlay.cpp @@ -1,6 +1,6 @@ #include "cbase.h" #include "CommanderOverlay.h" -#include "UtlSymbol.h" +#include "utlsymbol.h" //----------------------------------------------------------------------------- // Purpose: Singleton class responsible for managing overlay elements diff --git a/mp/src/game/client/fortress/CommanderOverlay.h b/mp/src/game/client/fortress/CommanderOverlay.h index 8aae4371d1a..a0ad72b1123 100644 --- a/mp/src/game/client/fortress/CommanderOverlay.h +++ b/mp/src/game/client/fortress/CommanderOverlay.h @@ -18,7 +18,7 @@ #pragma once #endif -#include "PanelMetaClassMgr.h" +#include "panelmetaclassmgr.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/ObjectControlPanel.cpp b/mp/src/game/client/fortress/ObjectControlPanel.cpp index befc4b49db5..30ee433c2eb 100644 --- a/mp/src/game/client/fortress/ObjectControlPanel.cpp +++ b/mp/src/game/client/fortress/ObjectControlPanel.cpp @@ -8,10 +8,10 @@ #include "ObjectControlPanel.h" #include #include -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" #include -#include -#include "C_BaseTFPlayer.h" +#include +#include "c_basetfplayer.h" #include "clientmode_tfbase.h" #include #include diff --git a/mp/src/game/client/fortress/ObjectControlPanel.h b/mp/src/game/client/fortress/ObjectControlPanel.h index 2f2bf12cc1d..196be05a772 100644 --- a/mp/src/game/client/fortress/ObjectControlPanel.h +++ b/mp/src/game/client/fortress/ObjectControlPanel.h @@ -12,7 +12,7 @@ #pragma once #endif -#include "C_VGuiScreen.h" +#include "c_vguiscreen.h" namespace vgui { diff --git a/mp/src/game/client/fortress/ProxyTFPlayer.cpp b/mp/src/game/client/fortress/ProxyTFPlayer.cpp index 89cf2d279fe..657e7a47df2 100644 --- a/mp/src/game/client/fortress/ProxyTFPlayer.cpp +++ b/mp/src/game/client/fortress/ProxyTFPlayer.cpp @@ -5,13 +5,13 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialSystem.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialsystem.h" #include -#include "materialsystem/IMaterialVar.h" -#include "C_BaseTFPlayer.h" -#include "FunctionProxy.h" -#include "C_PlayerResource.h" +#include "materialsystem/imaterialvar.h" +#include "c_basetfplayer.h" +#include "functionproxy.h" +#include "c_playerresource.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/RespawnWaveVGuiScreen.cpp b/mp/src/game/client/fortress/RespawnWaveVGuiScreen.cpp index ef1a60fa45d..bb2957bd253 100644 --- a/mp/src/game/client/fortress/RespawnWaveVGuiScreen.cpp +++ b/mp/src/game/client/fortress/RespawnWaveVGuiScreen.cpp @@ -5,9 +5,9 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "C_VGuiScreen.h" +#include "c_vguiscreen.h" #include "clientmode_tfbase.h" -#include +#include #include #include #include "c_info_act.h" diff --git a/mp/src/game/client/fortress/VGuiScreenVehicleBay.cpp b/mp/src/game/client/fortress/VGuiScreenVehicleBay.cpp index d879ca5aaeb..8c5e26123e3 100644 --- a/mp/src/game/client/fortress/VGuiScreenVehicleBay.cpp +++ b/mp/src/game/client/fortress/VGuiScreenVehicleBay.cpp @@ -5,12 +5,12 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "C_VGuiScreen.h" +#include "c_vguiscreen.h" #include "clientmode_tfbase.h" -#include +#include #include #include -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" #include "c_info_act.h" #include "tf_shareddefs.h" #include "c_basetfplayer.h" diff --git a/mp/src/game/client/fortress/c_basecombatcharacter_tf2.cpp b/mp/src/game/client/fortress/c_basecombatcharacter_tf2.cpp index 2de19934613..67efc015467 100644 --- a/mp/src/game/client/fortress/c_basecombatcharacter_tf2.cpp +++ b/mp/src/game/client/fortress/c_basecombatcharacter_tf2.cpp @@ -5,8 +5,8 @@ #include "c_basecombatcharacter.h" #include "tf_shareddefs.h" #include "particles_simple.h" -#include "FunctionProxy.h" -#include "ieffects.h" +#include "functionproxy.h" +#include "IEffects.h" #include "weapon_combatshield.h" void C_BaseCombatCharacter::Release( void ) diff --git a/mp/src/game/client/fortress/c_basefourwheelvehicle.cpp b/mp/src/game/client/fortress/c_basefourwheelvehicle.cpp index 444ec6d1fcd..d2ae2a82c40 100644 --- a/mp/src/game/client/fortress/c_basefourwheelvehicle.cpp +++ b/mp/src/game/client/fortress/c_basefourwheelvehicle.cpp @@ -5,7 +5,7 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "C_BaseFourWheelVehicle.h" +#include "c_basefourwheelvehicle.h" IMPLEMENT_CLIENTCLASS_DT(C_BaseTFFourWheelVehicle, DT_BaseTFFourWheelVehicle, CBaseTFFourWheelVehicle) RecvPropFloat( RECVINFO( m_flDeployFinishTime ) ), diff --git a/mp/src/game/client/fortress/c_baseobject.cpp b/mp/src/game/client/fortress/c_baseobject.cpp index 77b89a16223..7787bd5a8f6 100644 --- a/mp/src/game/client/fortress/c_baseobject.cpp +++ b/mp/src/game/client/fortress/c_baseobject.cpp @@ -5,8 +5,8 @@ #include "c_tfteam.h" #include "engine/IEngineSound.h" #include "particles_simple.h" -#include "FunctionProxy.h" -#include "ieffects.h" +#include "functionproxy.h" +#include "IEffects.h" #include "c_hint_events.h" #include "model_types.h" #include "particlemgr.h" @@ -14,7 +14,7 @@ #include "env_objecteffects.h" #include "basetfvehicle.h" #include "weapon_builder.h" -#include "IVRenderView.h" +#include "ivrenderview.h" #include "ObjectControlPanel.h" #include "engine/ivmodelinfo.h" #include "c_te_effect_dispatch.h" diff --git a/mp/src/game/client/fortress/c_baseobject.h b/mp/src/game/client/fortress/c_baseobject.h index a442299a59d..a1b619238a8 100644 --- a/mp/src/game/client/fortress/c_baseobject.h +++ b/mp/src/game/client/fortress/c_baseobject.h @@ -8,7 +8,7 @@ #include #include #include "vgui_healthbar.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "hud_minimap.h" #include "particlemgr.h" #include "particle_prototype.h" diff --git a/mp/src/game/client/fortress/c_basetfplayer.cpp b/mp/src/game/client/fortress/c_basetfplayer.cpp index 8d451a1f700..dae936e6e70 100644 --- a/mp/src/game/client/fortress/c_basetfplayer.cpp +++ b/mp/src/game/client/fortress/c_basetfplayer.cpp @@ -12,7 +12,7 @@ Copyright (C) 2014-2016 TalonBrave.info #include "ivieweffects.h" #include "c_tfteam.h" #include "view.h" -#include "UserCmd.h" +#include "usercmd.h" #include "ivrenderview.h" #include "model_types.h" #include "view_shared.h" @@ -20,7 +20,7 @@ Copyright (C) 2014-2016 TalonBrave.info #include "weapon_twohandedcontainer.h" #include "particles_simple.h" #include "playerandobjectenumerator.h" -#include "IClientVehicle.h" +#include "iclientvehicle.h" #include "input.h" #include "basetfvehicle.h" #include "c_vehicle_teleport_station.h" diff --git a/mp/src/game/client/fortress/c_effect_shootingstar.cpp b/mp/src/game/client/fortress/c_effect_shootingstar.cpp index d08d3eb981d..8ff49935853 100644 --- a/mp/src/game/client/fortress/c_effect_shootingstar.cpp +++ b/mp/src/game/client/fortress/c_effect_shootingstar.cpp @@ -6,7 +6,7 @@ //============================================================================= #include "cbase.h" #include "c_effect_shootingstar.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" //============================================================================= // diff --git a/mp/src/game/client/fortress/c_env_meteor.cpp b/mp/src/game/client/fortress/c_env_meteor.cpp index 655f8e41e60..566b6fe9484 100644 --- a/mp/src/game/client/fortress/c_env_meteor.cpp +++ b/mp/src/game/client/fortress/c_env_meteor.cpp @@ -5,7 +5,7 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "C_Env_Meteor.h" +#include "c_env_meteor.h" #include "fx_explosion.h" #include "tempentity.h" #include "c_tracer.h" diff --git a/mp/src/game/client/fortress/c_func_resource.h b/mp/src/game/client/fortress/c_func_resource.h index 00514ddc2bb..0befa87bb4b 100644 --- a/mp/src/game/client/fortress/c_func_resource.h +++ b/mp/src/game/client/fortress/c_func_resource.h @@ -1,7 +1,7 @@ #ifndef C_FUNC_RESOURCE_H #define C_FUNC_RESOURCE_H -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "hud_minimap.h" diff --git a/mp/src/game/client/fortress/c_gasoline_blob.cpp b/mp/src/game/client/fortress/c_gasoline_blob.cpp index 09dd940960c..0da7f4836ad 100644 --- a/mp/src/game/client/fortress/c_gasoline_blob.cpp +++ b/mp/src/game/client/fortress/c_gasoline_blob.cpp @@ -7,8 +7,8 @@ #include "cbase.h" #include "c_gasoline_blob.h" #include "gasoline_shared.h" -#include "engine/ienginesound.h" -#include "ClientEffectPrecacheSystem.h" +#include "engine/IEngineSound.h" +#include "clienteffectprecachesystem.h" static CUtlLinkedList g_GasolineBlobs; diff --git a/mp/src/game/client/fortress/c_grenade_objectsapper.cpp b/mp/src/game/client/fortress/c_grenade_objectsapper.cpp index 6f7f023398a..a6e0c8a4789 100644 --- a/mp/src/game/client/fortress/c_grenade_objectsapper.cpp +++ b/mp/src/game/client/fortress/c_grenade_objectsapper.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "hud.h" #include "basegrenade_shared.h" -#include "ieffects.h" +#include "IEffects.h" #include "c_baseplayer.h" extern ConVar lod_effect_distance; diff --git a/mp/src/game/client/fortress/c_maker_bughole.cpp b/mp/src/game/client/fortress/c_maker_bughole.cpp index 2853cfcda8e..32e0c83e3d7 100644 --- a/mp/src/game/client/fortress/c_maker_bughole.cpp +++ b/mp/src/game/client/fortress/c_maker_bughole.cpp @@ -6,8 +6,8 @@ //=============================================================================// #include "cbase.h" #include "hud.h" -#include "c_AI_BaseNPC.h" -#include "ieffects.h" +#include "c_ai_basenpc.h" +#include "IEffects.h" #include "particles_simple.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/c_obj_base_manned_gun.cpp b/mp/src/game/client/fortress/c_obj_base_manned_gun.cpp index f5e2dc575e5..60096d0d3aa 100644 --- a/mp/src/game/client/fortress/c_obj_base_manned_gun.cpp +++ b/mp/src/game/client/fortress/c_obj_base_manned_gun.cpp @@ -10,7 +10,7 @@ #include "tf_movedata.h" #include "bone_setup.h" #include "hud_ammo.h" -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" extern ConVar mannedgun_usethirdperson; diff --git a/mp/src/game/client/fortress/c_obj_buff_station.cpp b/mp/src/game/client/fortress/c_obj_buff_station.cpp index 4915478d30c..e0f39e5de4d 100644 --- a/mp/src/game/client/fortress/c_obj_buff_station.cpp +++ b/mp/src/game/client/fortress/c_obj_buff_station.cpp @@ -7,9 +7,9 @@ #include "cbase.h" #include "c_baseobject.h" #include "tf_shareddefs.h" -#include "C_BaseTFPlayer.h" +#include "c_basetfplayer.h" #include "ObjectControlPanel.h" -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/client/fortress/c_obj_bunker.cpp b/mp/src/game/client/fortress/c_obj_bunker.cpp index 097b017d3c9..f4581dbcae1 100644 --- a/mp/src/game/client/fortress/c_obj_bunker.cpp +++ b/mp/src/game/client/fortress/c_obj_bunker.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "c_baseobject.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/c_obj_dragonsteeth.cpp b/mp/src/game/client/fortress/c_obj_dragonsteeth.cpp index 31f7ddc2dc5..77705be7fca 100644 --- a/mp/src/game/client/fortress/c_obj_dragonsteeth.cpp +++ b/mp/src/game/client/fortress/c_obj_dragonsteeth.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "c_baseobject.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/c_obj_explosives.cpp b/mp/src/game/client/fortress/c_obj_explosives.cpp index 4cf2fb106c6..8cc78b5b423 100644 --- a/mp/src/game/client/fortress/c_obj_explosives.cpp +++ b/mp/src/game/client/fortress/c_obj_explosives.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "tf_obj_baseupgrade_shared.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/c_obj_mortar.cpp b/mp/src/game/client/fortress/c_obj_mortar.cpp index f115a594e40..adf56ed533b 100644 --- a/mp/src/game/client/fortress/c_obj_mortar.cpp +++ b/mp/src/game/client/fortress/c_obj_mortar.cpp @@ -15,7 +15,7 @@ #include #include "vgui_rotation_slider.h" #include -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" #include "vgui_bitmapimage.h" #include "iusesmortarpanel.h" diff --git a/mp/src/game/client/fortress/c_obj_resourcepump.cpp b/mp/src/game/client/fortress/c_obj_resourcepump.cpp index 6e33c6c90cf..68302076991 100644 --- a/mp/src/game/client/fortress/c_obj_resourcepump.cpp +++ b/mp/src/game/client/fortress/c_obj_resourcepump.cpp @@ -1,12 +1,12 @@ #include "cbase.h" #include "hud.h" #include "c_obj_resourcepump.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "vgui_healthbar.h" #include "ObjectControlPanel.h" #include "tf_shareddefs.h" -#include "VGUI_BitmapButton.h" -#include "C_Func_Resource.h" +#include "vgui_bitmapbutton.h" +#include "c_func_resource.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/client/fortress/c_obj_respawn_station.cpp b/mp/src/game/client/fortress/c_obj_respawn_station.cpp index bfb98e71937..7e3223a1b4c 100644 --- a/mp/src/game/client/fortress/c_obj_respawn_station.cpp +++ b/mp/src/game/client/fortress/c_obj_respawn_station.cpp @@ -9,7 +9,7 @@ #include "CommanderOverlay.h" #include "c_baseobject.h" #include "c_obj_respawn_station.h" -#include "C_BaseTFPlayer.h" +#include "c_basetfplayer.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/client/fortress/c_obj_resupply.cpp b/mp/src/game/client/fortress/c_obj_resupply.cpp index bdb39b68c6f..404ee7aa1c5 100644 --- a/mp/src/game/client/fortress/c_obj_resupply.cpp +++ b/mp/src/game/client/fortress/c_obj_resupply.cpp @@ -2,7 +2,7 @@ #include "c_baseobject.h" #include "c_basetfplayer.h" #include "ObjectControlPanel.h" -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/client/fortress/c_obj_sandbag_bunker.cpp b/mp/src/game/client/fortress/c_obj_sandbag_bunker.cpp index f95589543a2..ea608ea5025 100644 --- a/mp/src/game/client/fortress/c_obj_sandbag_bunker.cpp +++ b/mp/src/game/client/fortress/c_obj_sandbag_bunker.cpp @@ -1,6 +1,6 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "c_baseobject.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/c_obj_selfheal.cpp b/mp/src/game/client/fortress/c_obj_selfheal.cpp index 9be1e9ba9ba..04631d0bef2 100644 --- a/mp/src/game/client/fortress/c_obj_selfheal.cpp +++ b/mp/src/game/client/fortress/c_obj_selfheal.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "tf_obj_baseupgrade_shared.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/c_obj_sentrygun.cpp b/mp/src/game/client/fortress/c_obj_sentrygun.cpp index b37ba8e0633..73ee87188ac 100644 --- a/mp/src/game/client/fortress/c_obj_sentrygun.cpp +++ b/mp/src/game/client/fortress/c_obj_sentrygun.cpp @@ -8,7 +8,7 @@ #include "bone_setup.h" #include "CommanderOverlay.h" #include "c_baseobject.h" -#include "C_Obj_SentryGun.h" +#include "c_obj_sentrygun.h" #include "tf_shareddefs.h" #include "c_basetfplayer.h" #include "ObjectControlPanel.h" diff --git a/mp/src/game/client/fortress/c_obj_tower.cpp b/mp/src/game/client/fortress/c_obj_tower.cpp index ae39202d635..dbfe3ddc7ba 100644 --- a/mp/src/game/client/fortress/c_obj_tower.cpp +++ b/mp/src/game/client/fortress/c_obj_tower.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "c_baseobject.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/c_obj_tunnel.cpp b/mp/src/game/client/fortress/c_obj_tunnel.cpp index b6cc78f300e..caa72aec776 100644 --- a/mp/src/game/client/fortress/c_obj_tunnel.cpp +++ b/mp/src/game/client/fortress/c_obj_tunnel.cpp @@ -10,7 +10,7 @@ #include "c_obj_mapdefined.h" #include "minimap_trace.h" #include -#include "vguimatsurface/IMatSystemSurface.h" +#include "VGuiMatSurface/IMatSystemSurface.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/client/fortress/c_obj_vehicleboost.cpp b/mp/src/game/client/fortress/c_obj_vehicleboost.cpp index 8e0b8845e70..930ee5d9af5 100644 --- a/mp/src/game/client/fortress/c_obj_vehicleboost.cpp +++ b/mp/src/game/client/fortress/c_obj_vehicleboost.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "hud.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "tf_obj_baseupgrade_shared.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/c_order.cpp b/mp/src/game/client/fortress/c_order.cpp index bb93f35c111..667ddb75756 100644 --- a/mp/src/game/client/fortress/c_order.cpp +++ b/mp/src/game/client/fortress/c_order.cpp @@ -10,7 +10,7 @@ #include #include #include "minimap_trace.h" -#include "vguimatsurface/IMatSystemSurface.h" +#include "VGuiMatSurface/IMatSystemSurface.h" #include "c_func_resource.h" #include "tf_shareddefs.h" #include "c_baseobject.h" diff --git a/mp/src/game/client/fortress/c_shield.cpp b/mp/src/game/client/fortress/c_shield.cpp index c32e8ddae85..99b3a56dac5 100644 --- a/mp/src/game/client/fortress/c_shield.cpp +++ b/mp/src/game/client/fortress/c_shield.cpp @@ -6,15 +6,15 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "C_Shield.h" -#include "ClientEffectPrecacheSystem.h" +#include "c_shield.h" +#include "clienteffectprecachesystem.h" #include "clientmode.h" -#include "materialsystem/IMesh.h" +#include "materialsystem/imesh.h" #include "mapdata.h" -#include "IVRenderView.h" +#include "ivrenderview.h" #include "tf_shareddefs.h" #include "collisionutils.h" -#include "FunctionProxy.h" +#include "functionproxy.h" // Precache the effects CLIENTEFFECT_REGISTER_BEGIN( Shield ) diff --git a/mp/src/game/client/fortress/c_shield.h b/mp/src/game/client/fortress/c_shield.h index 27178f17d57..38066c9cceb 100644 --- a/mp/src/game/client/fortress/c_shield.h +++ b/mp/src/game/client/fortress/c_shield.h @@ -14,7 +14,7 @@ #pragma once #endif -#include "SplinePatch.h" +#include "splinepatch.h" //----------------------------------------------------------------------------- // Shield: diff --git a/mp/src/game/client/fortress/c_shield_flat.cpp b/mp/src/game/client/fortress/c_shield_flat.cpp index efd420121dd..0081b42778b 100644 --- a/mp/src/game/client/fortress/c_shield_flat.cpp +++ b/mp/src/game/client/fortress/c_shield_flat.cpp @@ -12,7 +12,7 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "C_Shield.h" +#include "c_shield.h" #include "tf_shieldshared.h" #include "c_basetfplayer.h" diff --git a/mp/src/game/client/fortress/c_tf2rootpanel.cpp b/mp/src/game/client/fortress/c_tf2rootpanel.cpp index cbc3380c41c..06cda896a1b 100644 --- a/mp/src/game/client/fortress/c_tf2rootpanel.cpp +++ b/mp/src/game/client/fortress/c_tf2rootpanel.cpp @@ -1,7 +1,7 @@ #include "cbase.h" #include "c_tf2rootpanel.h" #include -#include +#include #include "paneleffect.h" #include "itfhintitem.h" #include "clientmode_commander.h" diff --git a/mp/src/game/client/fortress/c_tf2rootpanel.h b/mp/src/game/client/fortress/c_tf2rootpanel.h index 1b9daaf42a7..1381b45392f 100644 --- a/mp/src/game/client/fortress/c_tf2rootpanel.h +++ b/mp/src/game/client/fortress/c_tf2rootpanel.h @@ -6,7 +6,7 @@ #include #include -#include "UtlVector.h" +#include "utlvector.h" class CPanelEffect; class ITFHintItem; diff --git a/mp/src/game/client/fortress/c_tf_basehint.cpp b/mp/src/game/client/fortress/c_tf_basehint.cpp index 9e98da10eab..56307215071 100644 --- a/mp/src/game/client/fortress/c_tf_basehint.cpp +++ b/mp/src/game/client/fortress/c_tf_basehint.cpp @@ -9,7 +9,7 @@ #include "tf_hints.h" #include "itfhintitem.h" #include -#include +#include #include #include #include diff --git a/mp/src/game/client/fortress/c_tf_basehint.h b/mp/src/game/client/fortress/c_tf_basehint.h index b97c0a278ec..c7d80c08741 100644 --- a/mp/src/game/client/fortress/c_tf_basehint.h +++ b/mp/src/game/client/fortress/c_tf_basehint.h @@ -13,7 +13,7 @@ #include #include -#include "UtlVector.h" +#include "utlvector.h" class C_BaseTFPlayer; class C_BaseEntity; diff --git a/mp/src/game/client/fortress/c_tf_class_recon.h b/mp/src/game/client/fortress/c_tf_class_recon.h index fd3c151980d..d3e5d538d64 100644 --- a/mp/src/game/client/fortress/c_tf_class_recon.h +++ b/mp/src/game/client/fortress/c_tf_class_recon.h @@ -12,7 +12,7 @@ #endif #include "c_tf_playerclass.h" -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" #include "dt_recv.h" class C_PlayerClassRecon : public C_PlayerClass diff --git a/mp/src/game/client/fortress/c_tf_flare.cpp b/mp/src/game/client/fortress/c_tf_flare.cpp index a74361207c2..abe4741034d 100644 --- a/mp/src/game/client/fortress/c_tf_flare.cpp +++ b/mp/src/game/client/fortress/c_tf_flare.cpp @@ -9,10 +9,10 @@ #include "cmodel.h" #include "view.h" #include "clientsideeffects.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #include "particles_simple.h" #include "particlemgr.h" -#include "IEFx.h" +#include "iefx.h" //Precahce the effects CLIENTEFFECT_REGISTER_BEGIN( PrecacheEffectFlares ) diff --git a/mp/src/game/client/fortress/c_tf_hints.cpp b/mp/src/game/client/fortress/c_tf_hints.cpp index 5a83e68bb82..32fc354dbe4 100644 --- a/mp/src/game/client/fortress/c_tf_hints.cpp +++ b/mp/src/game/client/fortress/c_tf_hints.cpp @@ -13,7 +13,7 @@ #include "weapon_selection.h" #include #include "weapon_builder.h" -#include "vguimatsurface/IMatSystemSurface.h" +#include "VGuiMatSurface/IMatSystemSurface.h" #include "c_tf_hints.h" #include "c_hint_events.h" #include "c_tf_hintmanager.h" diff --git a/mp/src/game/client/fortress/c_tfcarrier.cpp b/mp/src/game/client/fortress/c_tfcarrier.cpp index 9705eb1cc60..97a6ef8c4f9 100644 --- a/mp/src/game/client/fortress/c_tfcarrier.cpp +++ b/mp/src/game/client/fortress/c_tfcarrier.cpp @@ -7,7 +7,7 @@ #include "c_base.h #include "bone_setup.h" #include "CommanderOverlay.h" -#include "c_AI_BaseNPC.h" +#include "c_ai_basenpc.h" #include "c_tfcarrier.h" IMPLEMENT_CLIENTCLASS_DT(C_TFCarrier, DT_TFCarrier, CTFCarrier) diff --git a/mp/src/game/client/fortress/c_vehicle_battering_ram.cpp b/mp/src/game/client/fortress/c_vehicle_battering_ram.cpp index bc95c1b648b..5b95d0aba85 100644 --- a/mp/src/game/client/fortress/c_vehicle_battering_ram.cpp +++ b/mp/src/game/client/fortress/c_vehicle_battering_ram.cpp @@ -9,7 +9,7 @@ #include "tf_movedata.h" #include "ObjectControlPanel.h" #include -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/c_vehicle_mortar.cpp b/mp/src/game/client/fortress/c_vehicle_mortar.cpp index 501a9c40752..fde80843ab5 100644 --- a/mp/src/game/client/fortress/c_vehicle_mortar.cpp +++ b/mp/src/game/client/fortress/c_vehicle_mortar.cpp @@ -13,7 +13,7 @@ #include "vehicle_mortar_shared.h" #include "vgui_rotation_slider.h" #include -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" #include "ground_line.h" #include "hud_minimap.h" #include "vgui_bitmapimage.h" diff --git a/mp/src/game/client/fortress/c_vehicle_siege_tower.cpp b/mp/src/game/client/fortress/c_vehicle_siege_tower.cpp index c2e04505569..f10e8b312bb 100644 --- a/mp/src/game/client/fortress/c_vehicle_siege_tower.cpp +++ b/mp/src/game/client/fortress/c_vehicle_siege_tower.cpp @@ -9,7 +9,7 @@ #include "tf_movedata.h" #include "ObjectControlPanel.h" #include -#include "VGUI_BitmapButton.h" +#include "vgui_bitmapbutton.h" //----------------------------------------------------------------------------- // Purpose: diff --git a/mp/src/game/client/fortress/c_vehicle_tank.cpp b/mp/src/game/client/fortress/c_vehicle_tank.cpp index 60bfde02539..5894030d841 100644 --- a/mp/src/game/client/fortress/c_vehicle_tank.cpp +++ b/mp/src/game/client/fortress/c_vehicle_tank.cpp @@ -12,7 +12,7 @@ #include #include "vgui_rotation_slider.h" #include -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" #include "ground_line.h" #include "hud_minimap.h" #include "vgui_bitmapimage.h" diff --git a/mp/src/game/client/fortress/c_walker_strider.cpp b/mp/src/game/client/fortress/c_walker_strider.cpp index eec8aa1c4f8..d06b7f72b5d 100644 --- a/mp/src/game/client/fortress/c_walker_strider.cpp +++ b/mp/src/game/client/fortress/c_walker_strider.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "c_walker_strider.h" #include "beamdraw.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" extern ConVar vehicle_free_pitch, vehicle_free_roll; diff --git a/mp/src/game/client/fortress/c_weapon_builder.cpp b/mp/src/game/client/fortress/c_weapon_builder.cpp index ec445fc7ce6..d50d09b9e9c 100644 --- a/mp/src/game/client/fortress/c_weapon_builder.cpp +++ b/mp/src/game/client/fortress/c_weapon_builder.cpp @@ -11,10 +11,10 @@ #include "c_weapon__stubs.h" #include "iinput.h" #include "ObjectControlPanel.h" -#include +#include #include "vgui_bitmapimage.h" -#include "vgui_BitmapPanel.h" +#include "vgui_bitmappanel.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/fortress/c_weapon_chargeableplasma.cpp b/mp/src/game/client/fortress/c_weapon_chargeableplasma.cpp index fc0e7366adc..ce8673462e2 100644 --- a/mp/src/game/client/fortress/c_weapon_chargeableplasma.cpp +++ b/mp/src/game/client/fortress/c_weapon_chargeableplasma.cpp @@ -10,7 +10,7 @@ #include "engine/IEngineSound.h" #include "view.h" #include "beamdraw.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #include "weapon_combat_usedwithshieldbase.h" #include "c_weapon__stubs.h" #include diff --git a/mp/src/game/client/fortress/c_weapon_mortar.cpp b/mp/src/game/client/fortress/c_weapon_mortar.cpp index cae2255edf8..348449f39b8 100644 --- a/mp/src/game/client/fortress/c_weapon_mortar.cpp +++ b/mp/src/game/client/fortress/c_weapon_mortar.cpp @@ -12,7 +12,7 @@ #include "in_buttons.h" #include "ground_line.h" #include "clientmode_tfnormal.h" -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" #include "c_tf_basecombatweapon.h" #include "engine/IEngineSound.h" #include "iinput.h" diff --git a/mp/src/game/client/fortress/commanderoverlaypanel.cpp b/mp/src/game/client/fortress/commanderoverlaypanel.cpp index 8bbfb4b61af..bbf684c79a3 100644 --- a/mp/src/game/client/fortress/commanderoverlaypanel.cpp +++ b/mp/src/game/client/fortress/commanderoverlaypanel.cpp @@ -19,16 +19,16 @@ #include "view.h" #include "view_shared.h" #include "CommanderOverlay.h" -#include "C_TfTeam.h" -#include +#include "c_tfteam.h" +#include #include #include #include "commanderoverlaypanel.h" -#include "PixelWriter.h" -#include "materialsystem/IMaterialVar.h" -#include "materialsystem/ITexture.h" +#include "pixelwriter.h" +#include "materialsystem/imaterialvar.h" +#include "materialsystem/itexture.h" #include "vtf/vtf.h" -#include "engine/IVDebugOverlay.h" +#include "engine/ivdebugoverlay.h" static inline int AlphaMapIndex(int x, int y) diff --git a/mp/src/game/client/fortress/fx_tf2_blood.cpp b/mp/src/game/client/fortress/fx_tf2_blood.cpp index d3b6abb822f..64f89f6e680 100644 --- a/mp/src/game/client/fortress/fx_tf2_blood.cpp +++ b/mp/src/game/client/fortress/fx_tf2_blood.cpp @@ -2,15 +2,15 @@ // Purpose: A blood spray effect to expose successful hits. #include "cbase.h" -#include "ClientEffectPrecacheSystem.h" -#include "FX_Sparks.h" +#include "clienteffectprecachesystem.h" +#include "fx_sparks.h" #include "iefx.h" #include "c_te_effect_dispatch.h" #include "particles_ez.h" #include "decals.h" #include "engine/IEngineSound.h" #include "fx_quad.h" -#include "engine/IVDebugOverlay.h" +#include "engine/ivdebugoverlay.h" #include "shareddefs.h" #include "fx_blood.h" #include "tf_shareddefs.h" diff --git a/mp/src/game/client/fortress/fx_tf2_buildeffects.cpp b/mp/src/game/client/fortress/fx_tf2_buildeffects.cpp index ecc80011d1e..995ac25da84 100644 --- a/mp/src/game/client/fortress/fx_tf2_buildeffects.cpp +++ b/mp/src/game/client/fortress/fx_tf2_buildeffects.cpp @@ -5,22 +5,22 @@ //============================================================================= #include "cbase.h" -#include "ClientEffectPrecacheSystem.h" -#include "FX_Sparks.h" +#include "clienteffectprecachesystem.h" +#include "fx_sparks.h" #include "iefx.h" #include "c_te_effect_dispatch.h" #include "particles_ez.h" #include "decals.h" #include "engine/IEngineSound.h" #include "fx_quad.h" -#include "engine/IVDebugOverlay.h" +#include "engine/ivdebugoverlay.h" #include "shareddefs.h" #include "tf_shareddefs.h" #include "c_impact_effects.h" #include "fx.h" #include "iviewrender_beams.h" #include "view.h" -#include "ieffects.h" +#include "IEffects.h" #include "c_tracer.h" CLIENTEFFECT_REGISTER_BEGIN( PrecacheEffectBuild ) diff --git a/mp/src/game/client/fortress/fx_tf2_impacts.cpp b/mp/src/game/client/fortress/fx_tf2_impacts.cpp index 4838ac4b526..23e21d3a188 100644 --- a/mp/src/game/client/fortress/fx_tf2_impacts.cpp +++ b/mp/src/game/client/fortress/fx_tf2_impacts.cpp @@ -4,7 +4,7 @@ #include "cbase.h" #include "fx_impact.h" #include "decals.h" -#include "ieffects.h" +#include "IEffects.h" #include "c_breakableprop.h" #include "tempent.h" #include "c_te_legacytempents.h" diff --git a/mp/src/game/client/fortress/fx_tf2_tracers.cpp b/mp/src/game/client/fortress/fx_tf2_tracers.cpp index 4dbd6461c11..a3635796823 100644 --- a/mp/src/game/client/fortress/fx_tf2_tracers.cpp +++ b/mp/src/game/client/fortress/fx_tf2_tracers.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "fx.h" #include "c_te_effect_dispatch.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #include "clientsideeffects.h" // Precache the effects diff --git a/mp/src/game/client/fortress/ground_line.cpp b/mp/src/game/client/fortress/ground_line.cpp index 533d180150b..b115dfbe745 100644 --- a/mp/src/game/client/fortress/ground_line.cpp +++ b/mp/src/game/client/fortress/ground_line.cpp @@ -12,7 +12,7 @@ #include "clientmode_tfnormal.h" #include #include -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #include "tier0/vprof.h" #define MAX_DOWN_DIST 300 diff --git a/mp/src/game/client/fortress/hintitembase.cpp b/mp/src/game/client/fortress/hintitembase.cpp index 1fd70834a2b..49678ac1233 100644 --- a/mp/src/game/client/fortress/hintitembase.cpp +++ b/mp/src/game/client/fortress/hintitembase.cpp @@ -12,7 +12,7 @@ Copyright (C) 2014-2017 TalonBrave.info #include #include #include -#include "PanelEffect.h" +#include "paneleffect.h" //----------------------------------------------------------------------------- // Purpose: Constructor diff --git a/mp/src/game/client/fortress/hud_commander_statuspanel.cpp b/mp/src/game/client/fortress/hud_commander_statuspanel.cpp index 35c7ed47c81..3d11da6579c 100644 --- a/mp/src/game/client/fortress/hud_commander_statuspanel.cpp +++ b/mp/src/game/client/fortress/hud_commander_statuspanel.cpp @@ -3,7 +3,7 @@ #include "hud_commander_statuspanel.h" #include "techtree.h" #include -#include "vguimatsurface/imatsystemsurface.h" +#include "VGuiMatSurface/IMatSystemSurface.h" #include #include #include diff --git a/mp/src/game/client/fortress/hud_damageindicator.cpp b/mp/src/game/client/fortress/hud_damageindicator.cpp index eb062e3b94c..02b38469522 100644 --- a/mp/src/game/client/fortress/hud_damageindicator.cpp +++ b/mp/src/game/client/fortress/hud_damageindicator.cpp @@ -12,11 +12,11 @@ #include #include #include -#include "vguimatsurface/IMatSystemSurface.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMesh.h" +#include "VGuiMatSurface/IMatSystemSurface.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imesh.h" #include "materialsystem/imaterialvar.h" -#include "ieffects.h" +#include "IEffects.h" #include "hudelement.h" using namespace vgui; diff --git a/mp/src/game/client/fortress/hud_deathnotice.cpp b/mp/src/game/client/fortress/hud_deathnotice.cpp index ddcdce15e48..2e37b3b7915 100644 --- a/mp/src/game/client/fortress/hud_deathnotice.cpp +++ b/mp/src/game/client/fortress/hud_deathnotice.cpp @@ -9,8 +9,8 @@ #include "hudelement.h" #include "c_playerresource.h" #include "iclientmode.h" -#include -#include +#include +#include #include #include #include diff --git a/mp/src/game/client/fortress/hud_emp.cpp b/mp/src/game/client/fortress/hud_emp.cpp index 249e966ab07..3390d118986 100644 --- a/mp/src/game/client/fortress/hud_emp.cpp +++ b/mp/src/game/client/fortress/hud_emp.cpp @@ -12,12 +12,12 @@ #include "tf_shareddefs.h" #include "iclientmode.h" #include "clientmode_tfnormal.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMesh.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imesh.h" #include "materialsystem/imaterialvar.h" #include #include -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" // EMP level positions #define HUDEMP_LEFT ((ScreenWidth() / 2)- XRES(40)) diff --git a/mp/src/game/client/fortress/hud_minimap.cpp b/mp/src/game/client/fortress/hud_minimap.cpp index a34145abdf4..fc5608acc97 100644 --- a/mp/src/game/client/fortress/hud_minimap.cpp +++ b/mp/src/game/client/fortress/hud_minimap.cpp @@ -10,7 +10,7 @@ Copyright (C) 2014-2016 TalonBrave.info #include #include #include -#include "vgui_BitmapImage.h" +#include "vgui_bitmapimage.h" #include "clientmode_tfbase.h" #include "clientmode_tfnormal.h" #include "hud.h" diff --git a/mp/src/game/client/fortress/hud_minimap.h b/mp/src/game/client/fortress/hud_minimap.h index 20d646a48a2..908c8feb303 100644 --- a/mp/src/game/client/fortress/hud_minimap.h +++ b/mp/src/game/client/fortress/hud_minimap.h @@ -22,7 +22,7 @@ #include "hudelement.h" #include "utllinkedlist.h" #include "CommanderOverlay.h" -#include "MapData.h" +#include "mapdata.h" class BitmapImage; class CTextHelpPanel; diff --git a/mp/src/game/client/fortress/hud_orders.cpp b/mp/src/game/client/fortress/hud_orders.cpp index 38b91990350..4d9a783e56b 100644 --- a/mp/src/game/client/fortress/hud_orders.cpp +++ b/mp/src/game/client/fortress/hud_orders.cpp @@ -9,7 +9,7 @@ #include "hud.h" #include "c_basetfplayer.h" #include "clientmode_tfnormal.h" -#include "VGUI_BasePanel.h" +#include "vgui_basepanel.h" #include // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/hud_target_id.cpp b/mp/src/game/client/fortress/hud_target_id.cpp index 7addbc57ee1..50a1d1f3a45 100644 --- a/mp/src/game/client/fortress/hud_target_id.cpp +++ b/mp/src/game/client/fortress/hud_target_id.cpp @@ -10,9 +10,9 @@ #include "imessagechars.h" #include "c_basetfplayer.h" #include "c_playerresource.h" -#include "vgui_EntityPanel.h" +#include "vgui_entitypanel.h" #include "vgui_healthbar.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "c_baseobject.h" #include "iclientmode.h" diff --git a/mp/src/game/client/fortress/hud_targetreticle.cpp b/mp/src/game/client/fortress/hud_targetreticle.cpp index 6ee41ea20e9..0a8a3ebb3c6 100644 --- a/mp/src/game/client/fortress/hud_targetreticle.cpp +++ b/mp/src/game/client/fortress/hud_targetreticle.cpp @@ -7,8 +7,8 @@ #include "tf_shareddefs.h" #include "iclientmode.h" #include "clientmode_tfnormal.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMesh.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imesh.h" #include "hud_targetreticle.h" #include "model_types.h" #include "view_scene.h" diff --git a/mp/src/game/client/fortress/hud_targetreticle.h b/mp/src/game/client/fortress/hud_targetreticle.h index dff0f6531c5..7d8322b201d 100644 --- a/mp/src/game/client/fortress/hud_targetreticle.h +++ b/mp/src/game/client/fortress/hud_targetreticle.h @@ -13,7 +13,7 @@ #include #include -#include +#include class IMaterial; diff --git a/mp/src/game/client/fortress/hud_vehicle_role.cpp b/mp/src/game/client/fortress/hud_vehicle_role.cpp index 5dc286f14f3..c833a5c834e 100644 --- a/mp/src/game/client/fortress/hud_vehicle_role.cpp +++ b/mp/src/game/client/fortress/hud_vehicle_role.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "hud_vehicle_role.h" #include "iclientmode.h" -#include +#include #include #include diff --git a/mp/src/game/client/fortress/infiltratorcamomaterialproxy.cpp b/mp/src/game/client/fortress/infiltratorcamomaterialproxy.cpp index 2defbb56a25..8f49a1233c0 100644 --- a/mp/src/game/client/fortress/infiltratorcamomaterialproxy.cpp +++ b/mp/src/game/client/fortress/infiltratorcamomaterialproxy.cpp @@ -6,9 +6,9 @@ //=============================================================================// #include "cbase.h" #include "ProxyEntity.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialVar.h" -#include "materialsystem/IMaterialSystem.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialvar.h" +#include "materialsystem/imaterialsystem.h" #include "c_basetfplayer.h" #include "c_tf_basecombatweapon.h" diff --git a/mp/src/game/client/fortress/mapdata.cpp b/mp/src/game/client/fortress/mapdata.cpp index 8d1085952ca..235d2f7de49 100644 --- a/mp/src/game/client/fortress/mapdata.cpp +++ b/mp/src/game/client/fortress/mapdata.cpp @@ -6,13 +6,13 @@ #include "playeroverlay.h" #include "iclientmode.h" #include "hud_technologytreedoc.h" -#include "C_World.h" +#include "c_world.h" #include "c_basetfplayer.h" #include "c_team.h" #include "c_tfteam.h" #include "c_func_resource.h" -#include "vgui_BitmapImage.h" -#include "C_Shield.h" +#include "vgui_bitmapimage.h" +#include "c_shield.h" #include "c_obj_respawn_station.h" bool IsEntityVisibleToTactical( int iLocalTeamNumber, int iLocalTeamPlayers, diff --git a/mp/src/game/client/fortress/mapdata.h b/mp/src/game/client/fortress/mapdata.h index 1b0e1ec342a..b1dc33c650c 100644 --- a/mp/src/game/client/fortress/mapdata.h +++ b/mp/src/game/client/fortress/mapdata.h @@ -21,7 +21,7 @@ #include "maxplayers.h" #include "mathlib/vector.h" #include "mapdata_shared.h" -#include "sharedinterface.h" +#include "sharedInterface.h" #define MAX_ZONES 32 #define MAX_CLASSES 32 diff --git a/mp/src/game/client/fortress/minimap_players.cpp b/mp/src/game/client/fortress/minimap_players.cpp index 86bc5ca55a2..c739e83d96c 100644 --- a/mp/src/game/client/fortress/minimap_players.cpp +++ b/mp/src/game/client/fortress/minimap_players.cpp @@ -12,10 +12,10 @@ #include #include "vgui_bitmapimage.h" #include "ViewConeImage.h" -#include "vguimatsurface/IMatSystemSurface.h" +#include "VGuiMatSurface/IMatSystemSurface.h" #include "shareddefs.h" #include "voice_status.h" -#include "IClientVehicle.h" +#include "iclientvehicle.h" //----------------------------------------------------------------------------- // Minimap panel representing players diff --git a/mp/src/game/client/fortress/minimap_trace.cpp b/mp/src/game/client/fortress/minimap_trace.cpp index c7e273a0519..9c98c97f5a1 100644 --- a/mp/src/game/client/fortress/minimap_trace.cpp +++ b/mp/src/game/client/fortress/minimap_trace.cpp @@ -12,9 +12,9 @@ #include "model_types.h" #include "clientmode_tfnormal.h" #include -#include "VGui_BitmapImage.h" +#include "vgui_bitmapimage.h" #include -#include "vguimatsurface/IMatSystemSurface.h" +#include "VGuiMatSurface/IMatSystemSurface.h" #include "shareddefs.h" #include "engine/ivmodelinfo.h" diff --git a/mp/src/game/client/fortress/minimap_trace.h b/mp/src/game/client/fortress/minimap_trace.h index f820afff7fa..eb8e71e50bc 100644 --- a/mp/src/game/client/fortress/minimap_trace.h +++ b/mp/src/game/client/fortress/minimap_trace.h @@ -14,7 +14,7 @@ #include "hud_minimap.h" #include "TeamBitmapImage.h" -#include "VGUI_BitmapImage.h" +#include "vgui_bitmapimage.h" #include diff --git a/mp/src/game/client/fortress/objectbuildalphaproxy.cpp b/mp/src/game/client/fortress/objectbuildalphaproxy.cpp index aabd7c27bb5..3c2f35ecc28 100644 --- a/mp/src/game/client/fortress/objectbuildalphaproxy.cpp +++ b/mp/src/game/client/fortress/objectbuildalphaproxy.cpp @@ -5,9 +5,9 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "ProxyEntity.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialVar.h" +#include "proxyentity.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialvar.h" #include "c_baseobject.h" #include diff --git a/mp/src/game/client/fortress/paneleffect.cpp b/mp/src/game/client/fortress/paneleffect.cpp index 9285804433f..609810001b5 100644 --- a/mp/src/game/client/fortress/paneleffect.cpp +++ b/mp/src/game/client/fortress/paneleffect.cpp @@ -1,5 +1,5 @@ #include "cbase.h" -#include "PanelEffect.h" +#include "paneleffect.h" #include "vgui_int.h" #include #include diff --git a/mp/src/game/client/fortress/playerandobjectenumerator.h b/mp/src/game/client/fortress/playerandobjectenumerator.h index 73cea2d5c43..824578fb710 100644 --- a/mp/src/game/client/fortress/playerandobjectenumerator.h +++ b/mp/src/game/client/fortress/playerandobjectenumerator.h @@ -11,9 +11,9 @@ #pragma once #endif -#include "UtlVector.h" +#include "utlvector.h" #include "ehandle.h" -#include "ISpatialPartition.h" +#include "ispatialpartition.h" class C_BaseEntity; class C_BasePlayer; diff --git a/mp/src/game/client/fortress/playeroverlay.cpp b/mp/src/game/client/fortress/playeroverlay.cpp index 3e3b8e06f65..5a91d166017 100644 --- a/mp/src/game/client/fortress/playeroverlay.cpp +++ b/mp/src/game/client/fortress/playeroverlay.cpp @@ -10,7 +10,7 @@ #include "mapdata.h" #include "c_playerresource.h" #include "c_team.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include #include diff --git a/mp/src/game/client/fortress/playeroverlayclass.cpp b/mp/src/game/client/fortress/playeroverlayclass.cpp index c6181952046..a6c0b97a617 100644 --- a/mp/src/game/client/fortress/playeroverlayclass.cpp +++ b/mp/src/game/client/fortress/playeroverlayclass.cpp @@ -15,11 +15,11 @@ #include "playeroverlayclass.h" #include "playeroverlay.h" #include -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "clientmode_tfnormal.h" #include "tf_shareddefs.h" #include "hud_commander_statuspanel.h" -#include "vgui_BitmapImage.h" +#include "vgui_bitmapimage.h" #include "igamesystem.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/playeroverlayclass.h b/mp/src/game/client/fortress/playeroverlayclass.h index 42010159653..db1cec02f9b 100644 --- a/mp/src/game/client/fortress/playeroverlayclass.h +++ b/mp/src/game/client/fortress/playeroverlayclass.h @@ -18,7 +18,7 @@ #pragma once #endif -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" class BitmapImage; class KeyValues; diff --git a/mp/src/game/client/fortress/playeroverlayhealth.h b/mp/src/game/client/fortress/playeroverlayhealth.h index e992c7732d6..ad35342ee99 100644 --- a/mp/src/game/client/fortress/playeroverlayhealth.h +++ b/mp/src/game/client/fortress/playeroverlayhealth.h @@ -17,7 +17,7 @@ #pragma once #endif -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" class KeyValues; diff --git a/mp/src/game/client/fortress/playeroverlayname.cpp b/mp/src/game/client/fortress/playeroverlayname.cpp index 8b89c40458c..390c47f3091 100644 --- a/mp/src/game/client/fortress/playeroverlayname.cpp +++ b/mp/src/game/client/fortress/playeroverlayname.cpp @@ -20,7 +20,7 @@ #include "playeroverlay.h" #include "playeroverlayname.h" #include -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "hud_commander_statuspanel.h" #include #include diff --git a/mp/src/game/client/fortress/playeroverlayselected.cpp b/mp/src/game/client/fortress/playeroverlayselected.cpp index 72665b8c79c..8153511f4d9 100644 --- a/mp/src/game/client/fortress/playeroverlayselected.cpp +++ b/mp/src/game/client/fortress/playeroverlayselected.cpp @@ -19,7 +19,7 @@ #include "playeroverlay.h" #include "playeroverlayselected.h" #include -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "hud_commander_statuspanel.h" //----------------------------------------------------------------------------- // Purpose: diff --git a/mp/src/game/client/fortress/playeroverlayselected.h b/mp/src/game/client/fortress/playeroverlayselected.h index 3e8b8f860b7..f20d0888401 100644 --- a/mp/src/game/client/fortress/playeroverlayselected.h +++ b/mp/src/game/client/fortress/playeroverlayselected.h @@ -17,7 +17,7 @@ #pragma once #endif -#include "vgui_BasePanel.h" +#include "vgui_basepanel.h" class BitmapImage; class KeyValues; diff --git a/mp/src/game/client/fortress/playeroverlaysquad.cpp b/mp/src/game/client/fortress/playeroverlaysquad.cpp index 2f78231b458..06a3f3af137 100644 --- a/mp/src/game/client/fortress/playeroverlaysquad.cpp +++ b/mp/src/game/client/fortress/playeroverlaysquad.cpp @@ -15,10 +15,10 @@ #include "playeroverlay.h" #include "playeroverlaysquad.h" #include -#include "PanelMetaClassMgr.h" +#include "panelmetaclassmgr.h" #include "hud_commander_statuspanel.h" #include -#include +#include //----------------------------------------------------------------------------- // Purpose: diff --git a/mp/src/game/client/fortress/proxy_objpower.cpp b/mp/src/game/client/fortress/proxy_objpower.cpp index c8ce86bff8f..0784f9bf305 100644 --- a/mp/src/game/client/fortress/proxy_objpower.cpp +++ b/mp/src/game/client/fortress/proxy_objpower.cpp @@ -5,12 +5,12 @@ //=============================================================================// #include "cbase.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialSystem.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialsystem.h" #include -#include "materialsystem/IMaterialVar.h" -#include "C_BaseTFPlayer.h" -#include "FunctionProxy.h" +#include "materialsystem/imaterialvar.h" +#include "c_basetfplayer.h" +#include "functionproxy.h" #include "c_baseobject.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/proxy_shield.cpp b/mp/src/game/client/fortress/proxy_shield.cpp index bbaeffa66b5..52be96fc72d 100644 --- a/mp/src/game/client/fortress/proxy_shield.cpp +++ b/mp/src/game/client/fortress/proxy_shield.cpp @@ -5,14 +5,14 @@ //============================================================================= #include "cbase.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialSystem.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialsystem.h" #include -#include "materialsystem/IMaterialVar.h" -#include "C_BaseTFPlayer.h" -#include "FunctionProxy.h" -#include "C_PlayerResource.h" -#include "Weapon_CombatShield.h" +#include "materialsystem/imaterialvar.h" +#include "c_basetfplayer.h" +#include "functionproxy.h" +#include "c_playerresource.h" +#include "weapon_combatshield.h" // for the 2/5/03 demo #include "c_demo_entities.h" diff --git a/mp/src/game/client/fortress/proxy_sunroof.cpp b/mp/src/game/client/fortress/proxy_sunroof.cpp index 12cd829ff2f..2798c7d9c7b 100644 --- a/mp/src/game/client/fortress/proxy_sunroof.cpp +++ b/mp/src/game/client/fortress/proxy_sunroof.cpp @@ -5,14 +5,14 @@ //=============================================================================// #include "cbase.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialSystem.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialsystem.h" #include -#include "materialsystem/IMaterialVar.h" -#include "C_BaseTFPlayer.h" -#include "FunctionProxy.h" -#include "C_PlayerResource.h" -#include "Weapon_CombatShield.h" +#include "materialsystem/imaterialvar.h" +#include "c_basetfplayer.h" +#include "functionproxy.h" +#include "c_playerresource.h" +#include "weapon_combatshield.h" // for the 2/5/03 demo #include "c_demo_entities.h" diff --git a/mp/src/game/client/fortress/resourcezoneoverlay.cpp b/mp/src/game/client/fortress/resourcezoneoverlay.cpp index 07f760a0156..4c9411fc0cc 100644 --- a/mp/src/game/client/fortress/resourcezoneoverlay.cpp +++ b/mp/src/game/client/fortress/resourcezoneoverlay.cpp @@ -1,15 +1,15 @@ #include "cbase.h" -#include +#include #include -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include "clientmode_tfnormal.h" #include "tf_shareddefs.h" #include "shareddefs.h" #include "c_func_resource.h" #include "techtree.h" #include "c_basetfplayer.h" -#include "vgui_HealthBar.h" -#include "vgui_BitmapImage.h" +#include "vgui_healthbar.h" +#include "vgui_bitmapimage.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/client/fortress/teammaterialproxy.cpp b/mp/src/game/client/fortress/teammaterialproxy.cpp index debebcde985..01795f5477a 100644 --- a/mp/src/game/client/fortress/teammaterialproxy.cpp +++ b/mp/src/game/client/fortress/teammaterialproxy.cpp @@ -6,8 +6,8 @@ //=============================================================================// #include "cbase.h" #include "proxyentity.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialVar.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialvar.h" #include "c_team.h" // memdbgon must be the last include file in a .cpp file!!! diff --git a/mp/src/game/client/fortress/vgui_classmenu.cpp b/mp/src/game/client/fortress/vgui_classmenu.cpp index fabe0482170..228aeb5e123 100644 --- a/mp/src/game/client/fortress/vgui_classmenu.cpp +++ b/mp/src/game/client/fortress/vgui_classmenu.cpp @@ -2,7 +2,7 @@ #include "vgui_classmenu.h" -#include +#include #include diff --git a/mp/src/game/client/fortress/vgui_healthbar.cpp b/mp/src/game/client/fortress/vgui_healthbar.cpp index 72d0fee7ae4..62d6c5f9737 100644 --- a/mp/src/game/client/fortress/vgui_healthbar.cpp +++ b/mp/src/game/client/fortress/vgui_healthbar.cpp @@ -1,5 +1,5 @@ #include "cbase.h" -#include "vgui_HealthBar.h" +#include "vgui_healthbar.h" #include "CommanderOverlay.h" #include #include diff --git a/mp/src/game/client/fortress/vgui_teammenu.cpp b/mp/src/game/client/fortress/vgui_teammenu.cpp index 00b93d7ecee..68006b19d52 100644 --- a/mp/src/game/client/fortress/vgui_teammenu.cpp +++ b/mp/src/game/client/fortress/vgui_teammenu.cpp @@ -2,7 +2,7 @@ #include "vgui_teammenu.h" -#include +#include #include diff --git a/mp/src/game/client/fortress/ztestmaterialproxy.cpp b/mp/src/game/client/fortress/ztestmaterialproxy.cpp index 299d1967fca..fb2fa8a09e1 100644 --- a/mp/src/game/client/fortress/ztestmaterialproxy.cpp +++ b/mp/src/game/client/fortress/ztestmaterialproxy.cpp @@ -6,8 +6,8 @@ //=============================================================================// #include "cbase.h" #include "materialsystem/IMaterialProxy.h" -#include "materialsystem/IMaterial.h" -#include "materialsystem/IMaterialVar.h" +#include "materialsystem/imaterial.h" +#include "materialsystem/imaterialvar.h" // $sineVar : name of variable that controls the alpha level (float) class CzTestMaterialProxy : public IMaterialProxy diff --git a/mp/src/game/client/fx_tf2_tracers.cpp b/mp/src/game/client/fx_tf2_tracers.cpp index 4dbd6461c11..a3635796823 100644 --- a/mp/src/game/client/fx_tf2_tracers.cpp +++ b/mp/src/game/client/fx_tf2_tracers.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "fx.h" #include "c_te_effect_dispatch.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #include "clientsideeffects.h" // Precache the effects diff --git a/mp/src/game/client/vgui_entityimagepanel.cpp b/mp/src/game/client/vgui_entityimagepanel.cpp index 1c5b2765461..7e8070606d2 100644 --- a/mp/src/game/client/vgui_entityimagepanel.cpp +++ b/mp/src/game/client/vgui_entityimagepanel.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "vgui_entityimagepanel.h" #include -#include "c_BaseTFPlayer.h" +#include "c_basetfplayer.h" #include #include "vgui_bitmapimage.h" diff --git a/mp/src/game/client/vgui_entityimagepanel.h b/mp/src/game/client/vgui_entityimagepanel.h index bb5452568d5..1fe427b24f3 100644 --- a/mp/src/game/client/vgui_entityimagepanel.h +++ b/mp/src/game/client/vgui_entityimagepanel.h @@ -9,7 +9,7 @@ #ifndef VGUI_ENTITYIMAGEPANEL_H #define VGUI_ENTITYIMAGEPANEL_H -#include "vgui_EntityPanel.h" +#include "vgui_entitypanel.h" #include "shareddefs.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/client/vgui_entitypanel.cpp b/mp/src/game/client/vgui_entitypanel.cpp index c833ec0f882..31cad95cf6d 100644 --- a/mp/src/game/client/vgui_entitypanel.cpp +++ b/mp/src/game/client/vgui_entitypanel.cpp @@ -6,9 +6,9 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "vgui_EntityPanel.h" +#include "vgui_entitypanel.h" #include "ienginevgui.h" -#include "c_BaseTFPlayer.h" +#include "c_basetfplayer.h" #include "clientmode_tfnormal.h" #include "hud_commander_statuspanel.h" #include diff --git a/mp/src/game/client/vgui_imagehealthpanel.cpp b/mp/src/game/client/vgui_imagehealthpanel.cpp index 69119cb2c1a..739c21cc923 100644 --- a/mp/src/game/client/vgui_imagehealthpanel.cpp +++ b/mp/src/game/client/vgui_imagehealthpanel.cpp @@ -7,7 +7,7 @@ //=============================================================================// #include "cbase.h" #include "vgui_imagehealthpanel.h" -#include "commanderoverlay.h" +#include "CommanderOverlay.h" #include #include "mapdata.h" diff --git a/mp/src/game/client/vgui_imagehealthpanel.h b/mp/src/game/client/vgui_imagehealthpanel.h index ce45a1affd6..9664cd1a207 100644 --- a/mp/src/game/client/vgui_imagehealthpanel.h +++ b/mp/src/game/client/vgui_imagehealthpanel.h @@ -9,7 +9,7 @@ #ifndef VGUI_IMAGEHEALTHPANEL_H #define VGUI_IMAGEHEALTHPANEL_H -#include "vgui_EntityPanel.h" +#include "vgui_entitypanel.h" #include "vgui_EntityImagePanel.h" #include "vgui_HealthBar.h" #include "vgui_bitmappanel.h" diff --git a/mp/src/game/server/fortress/controlzone.cpp b/mp/src/game/server/fortress/controlzone.cpp index 86fd3f97ca6..c9837d88dca 100644 --- a/mp/src/game/server/fortress/controlzone.cpp +++ b/mp/src/game/server/fortress/controlzone.cpp @@ -7,7 +7,7 @@ #include "tf_shareddefs.h" #include "cbase.h" -#include "EntityOutput.h" +#include "entityoutput.h" #include "tf_player.h" #include "controlzone.h" #include "team.h" diff --git a/mp/src/game/server/fortress/env_meteor.cpp b/mp/src/game/server/fortress/env_meteor.cpp index 7fe32e5c0a1..9817e21d4a6 100644 --- a/mp/src/game/server/fortress/env_meteor.cpp +++ b/mp/src/game/server/fortress/env_meteor.cpp @@ -8,13 +8,13 @@ #include "cbase.h" #include "tf_player.h" -#include "Env_Meteor.h" +#include "env_meteor.h" #include "entitylist.h" #include "vphysics_interface.h" #include "tier1/strtools.h" #include "mapdata_shared.h" -#include "sharedinterface.h" -#include "skycamera.h" +#include "sharedInterface.h" +#include "SkyCamera.h" #include "ispatialpartition.h" #include "gameinterface.h" #include "props.h" diff --git a/mp/src/game/server/fortress/env_meteor.h b/mp/src/game/server/fortress/env_meteor.h index bda9cf61cb2..5c537b18b5b 100644 --- a/mp/src/game/server/fortress/env_meteor.h +++ b/mp/src/game/server/fortress/env_meteor.h @@ -9,9 +9,9 @@ #define ENV_METEOR_H #pragma once -#include "BaseEntity.h" -#include "BaseAnimating.h" -#include "Env_Meteor_Shared.h" +#include "baseentity.h" +#include "baseanimating.h" +#include "env_meteor_shared.h" #include "utlvector.h" //============================================================================= diff --git a/mp/src/game/server/fortress/info_act.cpp b/mp/src/game/server/fortress/info_act.cpp index 950fb4fd7fd..72154f3218b 100644 --- a/mp/src/game/server/fortress/info_act.cpp +++ b/mp/src/game/server/fortress/info_act.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" #include "tf_shareddefs.h" diff --git a/mp/src/game/server/fortress/info_add_resources.cpp b/mp/src/game/server/fortress/info_add_resources.cpp index 0441c4b2d39..7f225b8470b 100644 --- a/mp/src/game/server/fortress/info_add_resources.cpp +++ b/mp/src/game/server/fortress/info_add_resources.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" #include "tf_stats.h" diff --git a/mp/src/game/server/fortress/info_buildpoint.cpp b/mp/src/game/server/fortress/info_buildpoint.cpp index 0d41e550dc2..3ae2a6ffe2b 100644 --- a/mp/src/game/server/fortress/info_buildpoint.cpp +++ b/mp/src/game/server/fortress/info_buildpoint.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" #include "info_buildpoint.h" diff --git a/mp/src/game/server/fortress/info_customtech.cpp b/mp/src/game/server/fortress/info_customtech.cpp index 1b685a91a4d..73b1c09a18c 100644 --- a/mp/src/game/server/fortress/info_customtech.cpp +++ b/mp/src/game/server/fortress/info_customtech.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "techtree.h" #include "info_customtech.h" diff --git a/mp/src/game/server/fortress/info_input_playsound.cpp b/mp/src/game/server/fortress/info_input_playsound.cpp index 01198455c22..d26c33f8d71 100644 --- a/mp/src/game/server/fortress/info_input_playsound.cpp +++ b/mp/src/game/server/fortress/info_input_playsound.cpp @@ -5,11 +5,11 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" -#include "engine/ienginesound.h" +#include "engine/IEngineSound.h" #include "triggers.h" // Spawnflags diff --git a/mp/src/game/server/fortress/info_input_resetbanks.cpp b/mp/src/game/server/fortress/info_input_resetbanks.cpp index d53c00e54ba..1adda3c6eaa 100644 --- a/mp/src/game/server/fortress/info_input_resetbanks.cpp +++ b/mp/src/game/server/fortress/info_input_resetbanks.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" diff --git a/mp/src/game/server/fortress/info_input_resetobjects.cpp b/mp/src/game/server/fortress/info_input_resetobjects.cpp index 05ddece4a1a..5be2c95c5ec 100644 --- a/mp/src/game/server/fortress/info_input_resetobjects.cpp +++ b/mp/src/game/server/fortress/info_input_resetobjects.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" diff --git a/mp/src/game/server/fortress/info_input_respawnplayers.cpp b/mp/src/game/server/fortress/info_input_respawnplayers.cpp index 27831a499f5..7229d69076a 100644 --- a/mp/src/game/server/fortress/info_input_respawnplayers.cpp +++ b/mp/src/game/server/fortress/info_input_respawnplayers.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //============================================================================= #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" #include "tf_player.h" diff --git a/mp/src/game/server/fortress/info_minimappulse.cpp b/mp/src/game/server/fortress/info_minimappulse.cpp index 9e3a669151a..3c428ed8cdb 100644 --- a/mp/src/game/server/fortress/info_minimappulse.cpp +++ b/mp/src/game/server/fortress/info_minimappulse.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" diff --git a/mp/src/game/server/fortress/info_output_team.cpp b/mp/src/game/server/fortress/info_output_team.cpp index 1a78faa2632..1313295496a 100644 --- a/mp/src/game/server/fortress/info_output_team.cpp +++ b/mp/src/game/server/fortress/info_output_team.cpp @@ -5,8 +5,8 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_team.h" #include "baseentity.h" diff --git a/mp/src/game/server/fortress/info_vehicle_bay.cpp b/mp/src/game/server/fortress/info_vehicle_bay.cpp index 02b3b22a2bc..dda31e8ea9d 100644 --- a/mp/src/game/server/fortress/info_vehicle_bay.cpp +++ b/mp/src/game/server/fortress/info_vehicle_bay.cpp @@ -1,6 +1,6 @@ #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_obj.h" #include "info_vehicle_bay.h" #include "tf_player.h" diff --git a/mp/src/game/server/fortress/mortar_round.cpp b/mp/src/game/server/fortress/mortar_round.cpp index 1153e312e4f..5d5215c4948 100644 --- a/mp/src/game/server/fortress/mortar_round.cpp +++ b/mp/src/game/server/fortress/mortar_round.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "mortar_round.h" -#include "engine/ienginesound.h" +#include "engine/IEngineSound.h" #include "tf_gamerules.h" #include "tf_team.h" diff --git a/mp/src/game/server/fortress/npc_bug_builder.cpp b/mp/src/game/server/fortress/npc_bug_builder.cpp index f49f5c5263c..b0fd6b18208 100644 --- a/mp/src/game/server/fortress/npc_bug_builder.cpp +++ b/mp/src/game/server/fortress/npc_bug_builder.cpp @@ -5,18 +5,18 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "AI_Task.h" -#include "AI_Default.h" -#include "AI_Schedule.h" -#include "AI_Hull.h" -#include "AI_Hint.h" -#include "AI_Navigator.h" +#include "ai_task.h" +#include "ai_default.h" +#include "ai_schedule.h" +#include "ai_hull.h" +#include "ai_hint.h" +#include "ai_navigator.h" #include "activitylist.h" #include "soundent.h" #include "game.h" -#include "NPCEvent.h" +#include "npcevent.h" #include "tf_player.h" -#include "EntityList.h" +#include "entitylist.h" #include "ndebugoverlay.h" #include "shake.h" #include "monstermaker.h" @@ -24,7 +24,7 @@ #include "vstdlib/random.h" #include "tf_obj.h" #include "engine/IEngineSound.h" -#include "ieffects.h" +#include "IEffects.h" #include "npc_bug_builder.h" #include "npc_bug_hole.h" diff --git a/mp/src/game/server/fortress/npc_bug_builder.h b/mp/src/game/server/fortress/npc_bug_builder.h index ffeaac84cfe..597b28ddb47 100644 --- a/mp/src/game/server/fortress/npc_bug_builder.h +++ b/mp/src/game/server/fortress/npc_bug_builder.h @@ -11,7 +11,7 @@ #pragma once #endif -#include "AI_BaseNPC.h" +#include "ai_basenpc.h" #define BUG_BUILDER_MODEL "models/npcs/bugs/bug_builder.mdl" diff --git a/mp/src/game/server/fortress/npc_bug_hole.cpp b/mp/src/game/server/fortress/npc_bug_hole.cpp index f4a5e4edf04..c96ed96a3cc 100644 --- a/mp/src/game/server/fortress/npc_bug_hole.cpp +++ b/mp/src/game/server/fortress/npc_bug_hole.cpp @@ -5,17 +5,17 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "AI_Task.h" -#include "AI_Default.h" -#include "AI_Schedule.h" -#include "AI_Hull.h" -#include "AI_Hint.h" +#include "ai_task.h" +#include "ai_default.h" +#include "ai_schedule.h" +#include "ai_hull.h" +#include "ai_hint.h" #include "activitylist.h" #include "soundent.h" #include "game.h" -#include "NPCEvent.h" +#include "npcevent.h" #include "tf_player.h" -#include "EntityList.h" +#include "entitylist.h" #include "ndebugoverlay.h" #include "shake.h" #include "monstermaker.h" @@ -23,7 +23,7 @@ #include "vstdlib/random.h" #include "tf_obj.h" #include "engine/IEngineSound.h" -#include "ieffects.h" +#include "IEffects.h" #include "npc_bug_warrior.h" #include "npc_bug_builder.h" #include "npc_bug_hole.h" diff --git a/mp/src/game/server/fortress/npc_bug_warrior.cpp b/mp/src/game/server/fortress/npc_bug_warrior.cpp index cb62264e0df..ccde8cd9ccf 100644 --- a/mp/src/game/server/fortress/npc_bug_warrior.cpp +++ b/mp/src/game/server/fortress/npc_bug_warrior.cpp @@ -5,20 +5,20 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "AI_Task.h" -#include "AI_Default.h" -#include "AI_Schedule.h" -#include "AI_Hull.h" -#include "AI_Hint.h" -#include "AI_Navigator.h" -#include "AI_Memory.h" -#include "AI_Squad.h" +#include "ai_task.h" +#include "ai_default.h" +#include "ai_schedule.h" +#include "ai_hull.h" +#include "ai_hint.h" +#include "ai_navigator.h" +#include "ai_memory.h" +#include "ai_squad.h" #include "activitylist.h" #include "soundent.h" #include "game.h" -#include "NPCEvent.h" +#include "npcevent.h" #include "tf_player.h" -#include "EntityList.h" +#include "entitylist.h" #include "ndebugoverlay.h" #include "shake.h" #include "monstermaker.h" @@ -26,7 +26,7 @@ #include "vstdlib/random.h" #include "tf_obj.h" #include "engine/IEngineSound.h" -#include "ieffects.h" +#include "IEffects.h" #include "npc_bug_warrior.h" #include "npc_bug_hole.h" diff --git a/mp/src/game/server/fortress/npc_bug_warrior.h b/mp/src/game/server/fortress/npc_bug_warrior.h index 0fffca1800b..febb22c8f00 100644 --- a/mp/src/game/server/fortress/npc_bug_warrior.h +++ b/mp/src/game/server/fortress/npc_bug_warrior.h @@ -11,7 +11,7 @@ #pragma once #endif -#include "AI_BaseNPC.h" +#include "ai_basenpc.h" // Animation events #define BUG_WARRIOR_AE_MELEE_SOUND1 11 // Start attack sound diff --git a/mp/src/game/server/fortress/sensor_tf_team.cpp b/mp/src/game/server/fortress/sensor_tf_team.cpp index ebbe3a15165..c66b2d84ed0 100644 --- a/mp/src/game/server/fortress/sensor_tf_team.cpp +++ b/mp/src/game/server/fortress/sensor_tf_team.cpp @@ -6,8 +6,8 @@ //============================================================================= #include "cbase.h" -#include "EntityInput.h" -#include "EntityOutput.h" +#include "entityinput.h" +#include "entityoutput.h" #include "tf_team.h" #include "tf_obj.h" diff --git a/mp/src/game/server/fortress/team_messages.h b/mp/src/game/server/fortress/team_messages.h index d8530f21da9..a6f12f9ba9e 100644 --- a/mp/src/game/server/fortress/team_messages.h +++ b/mp/src/game/server/fortress/team_messages.h @@ -4,7 +4,7 @@ #pragma once #endif -#include "UtlSymbol.h" +#include "utlsymbol.h" // Message IDs enum diff --git a/mp/src/game/server/fortress/tf2_eventlog.cpp b/mp/src/game/server/fortress/tf2_eventlog.cpp index 6dd6d5bf990..357a7c95ae5 100644 --- a/mp/src/game/server/fortress/tf2_eventlog.cpp +++ b/mp/src/game/server/fortress/tf2_eventlog.cpp @@ -1,6 +1,6 @@ #include "cbase.h" -#include "../eventlog.h" -#include +#include "../EventLog.h" +#include class CTF2EventLog : public CEventLog { diff --git a/mp/src/game/server/fortress/tf_class_commando.cpp b/mp/src/game/server/fortress/tf_class_commando.cpp index b7a5faa1e05..116213b9509 100644 --- a/mp/src/game/server/fortress/tf_class_commando.cpp +++ b/mp/src/game/server/fortress/tf_class_commando.cpp @@ -2,7 +2,7 @@ #include "tf_player.h" #include "tf_class_commando.h" #include "tf_vehicle_teleport_station.h" -#include "EntityList.h" +#include "entitylist.h" #include "basecombatweapon.h" #include "weapon_builder.h" #include "tf_obj.h" diff --git a/mp/src/game/server/fortress/tf_class_commando.h b/mp/src/game/server/fortress/tf_class_commando.h index a7d0d16b595..7e6e38c65ff 100644 --- a/mp/src/game/server/fortress/tf_class_commando.h +++ b/mp/src/game/server/fortress/tf_class_commando.h @@ -13,7 +13,7 @@ #endif #include "tf_playerclass.h" -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" #include "basetfcombatweapon_shared.h" //===================================================================== diff --git a/mp/src/game/server/fortress/tf_class_defender.h b/mp/src/game/server/fortress/tf_class_defender.h index 72e6c8f272f..123759fddb7 100644 --- a/mp/src/game/server/fortress/tf_class_defender.h +++ b/mp/src/game/server/fortress/tf_class_defender.h @@ -9,7 +9,7 @@ #define TF_CLASS_DEFENDER_H #pragma once -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" //===================================================================== // Defender diff --git a/mp/src/game/server/fortress/tf_class_escort.h b/mp/src/game/server/fortress/tf_class_escort.h index fb1ec92dcb3..c07bb790a5a 100644 --- a/mp/src/game/server/fortress/tf_class_escort.h +++ b/mp/src/game/server/fortress/tf_class_escort.h @@ -14,7 +14,7 @@ #include "tf_playerclass.h" -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" #include "tf_shieldshared.h" class CShield; diff --git a/mp/src/game/server/fortress/tf_class_infiltrator.cpp b/mp/src/game/server/fortress/tf_class_infiltrator.cpp index f52c85c4741..8a6864f1bcf 100644 --- a/mp/src/game/server/fortress/tf_class_infiltrator.cpp +++ b/mp/src/game/server/fortress/tf_class_infiltrator.cpp @@ -15,7 +15,7 @@ #include "orders.h" #include "tf_player.h" #include "tf_class_infiltrator.h" -#include "EntityList.h" +#include "entitylist.h" #include "basecombatweapon.h" #include "tf_obj.h" #include "tf_team.h" diff --git a/mp/src/game/server/fortress/tf_class_infiltrator.h b/mp/src/game/server/fortress/tf_class_infiltrator.h index 78952345b2e..7a99a037ef9 100644 --- a/mp/src/game/server/fortress/tf_class_infiltrator.h +++ b/mp/src/game/server/fortress/tf_class_infiltrator.h @@ -20,7 +20,7 @@ // Time after spawning that the infilitrator's camo kicks in #define INFILTRATOR_CAMOTIME_AFTER_SPAWN 3.0 -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" class CLootableCorpse; diff --git a/mp/src/game/server/fortress/tf_class_medic.h b/mp/src/game/server/fortress/tf_class_medic.h index 1801257b925..5ab9a573320 100644 --- a/mp/src/game/server/fortress/tf_class_medic.h +++ b/mp/src/game/server/fortress/tf_class_medic.h @@ -13,7 +13,7 @@ #endif -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" //===================================================================== // Medic diff --git a/mp/src/game/server/fortress/tf_class_pyro.h b/mp/src/game/server/fortress/tf_class_pyro.h index 4245c6273f7..3f8896c3b17 100644 --- a/mp/src/game/server/fortress/tf_class_pyro.h +++ b/mp/src/game/server/fortress/tf_class_pyro.h @@ -12,7 +12,7 @@ #endif -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" class CWeaponFlameThrower; diff --git a/mp/src/game/server/fortress/tf_class_recon.h b/mp/src/game/server/fortress/tf_class_recon.h index 445cce673ef..848fa9bd4ba 100644 --- a/mp/src/game/server/fortress/tf_class_recon.h +++ b/mp/src/game/server/fortress/tf_class_recon.h @@ -9,7 +9,7 @@ #define TF_CLASS_RECON_H #pragma once -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" #include "tf_playerclass.h" class CTFJetpackSteam; diff --git a/mp/src/game/server/fortress/tf_class_sapper.h b/mp/src/game/server/fortress/tf_class_sapper.h index 5c0ee673070..18dea54b6ea 100644 --- a/mp/src/game/server/fortress/tf_class_sapper.h +++ b/mp/src/game/server/fortress/tf_class_sapper.h @@ -11,7 +11,7 @@ #pragma once #endif -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" #include "damagemodifier.h" class CEMPPulseStatus; diff --git a/mp/src/game/server/fortress/tf_class_sniper.h b/mp/src/game/server/fortress/tf_class_sniper.h index 380dca02000..5963dd20ee5 100644 --- a/mp/src/game/server/fortress/tf_class_sniper.h +++ b/mp/src/game/server/fortress/tf_class_sniper.h @@ -9,7 +9,7 @@ #define TF_CLASS_SNIPER_H #pragma once -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" //===================================================================== diff --git a/mp/src/game/server/fortress/tf_class_support.h b/mp/src/game/server/fortress/tf_class_support.h index b3c88fa7f06..e79df7d3810 100644 --- a/mp/src/game/server/fortress/tf_class_support.h +++ b/mp/src/game/server/fortress/tf_class_support.h @@ -11,7 +11,7 @@ #endif #include "tf_basecombatweapon.h" -#include "TFClassData_Shared.h" +#include "tfclassdata_shared.h" //===================================================================== // Support diff --git a/mp/src/game/server/fortress/tf_client.cpp b/mp/src/game/server/fortress/tf_client.cpp index 57627e3155b..7161c0aacdb 100644 --- a/mp/src/game/server/fortress/tf_client.cpp +++ b/mp/src/game/server/fortress/tf_client.cpp @@ -8,7 +8,7 @@ Copyright (C) 2014-2019 TalonBrave.info #include "gamerules.h" #include "teamplay_gamerules.h" #include "tf_gamerules.h" -#include "EntityList.h" +#include "entitylist.h" #include "physics.h" #include "game.h" #include "ai_network.h" diff --git a/mp/src/game/server/fortress/tf_filters.cpp b/mp/src/game/server/fortress/tf_filters.cpp index df4f4ba2f48..02ceb168ade 100644 --- a/mp/src/game/server/fortress/tf_filters.cpp +++ b/mp/src/game/server/fortress/tf_filters.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "filters.h" -#include "EntityList.h" +#include "entitylist.h" #include "info_act.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/server/fortress/tf_func_mass_teleport.cpp b/mp/src/game/server/fortress/tf_func_mass_teleport.cpp index ee36bedf4af..6ed3c922e88 100644 --- a/mp/src/game/server/fortress/tf_func_mass_teleport.cpp +++ b/mp/src/game/server/fortress/tf_func_mass_teleport.cpp @@ -10,7 +10,7 @@ #include "tf_team.h" #include "basetfvehicle.h" #include "team_spawnpoint.h" -#include "NDebugOverlay.h" +#include "ndebugoverlay.h" #include "tf_vehicle_teleport_station.h" #include "tf_gamerules.h" diff --git a/mp/src/game/server/fortress/tf_func_no_build.cpp b/mp/src/game/server/fortress/tf_func_no_build.cpp index 1eafa29d029..7fcb1100ced 100644 --- a/mp/src/game/server/fortress/tf_func_no_build.cpp +++ b/mp/src/game/server/fortress/tf_func_no_build.cpp @@ -10,7 +10,7 @@ #include "cbase.h" #include "tf_func_no_build.h" #include "tf_team.h" -#include "NDebugOverlay.h" +#include "ndebugoverlay.h" #include "tf_obj.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/server/fortress/tf_func_resource.cpp b/mp/src/game/server/fortress/tf_func_resource.cpp index dfc077db959..0e5e6b89968 100644 --- a/mp/src/game/server/fortress/tf_func_resource.cpp +++ b/mp/src/game/server/fortress/tf_func_resource.cpp @@ -2,8 +2,8 @@ // Purpose: Resource collection area #include "cbase.h" -#include "EntityOutput.h" -#include "EntityList.h" +#include "entityoutput.h" +#include "entitylist.h" #include "tf_player.h" #include "tf_func_resource.h" #include "tf_team.h" diff --git a/mp/src/game/server/fortress/tf_obj.cpp b/mp/src/game/server/fortress/tf_obj.cpp index 82d716b84f2..5add93678e7 100644 --- a/mp/src/game/server/fortress/tf_obj.cpp +++ b/mp/src/game/server/fortress/tf_obj.cpp @@ -27,7 +27,7 @@ Copyright (C) 2014-2016 TalonBrave.info #include "tf_obj_sentrygun.h" #include "tf_obj_powerpack.h" #include "tf_shareddefs.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "resource_chunk.h" #include "hierarchy.h" #include "tf_func_construction_yard.h" diff --git a/mp/src/game/server/fortress/tf_obj_barbed_wire.cpp b/mp/src/game/server/fortress/tf_obj_barbed_wire.cpp index fed18ced91d..9be11fb1986 100644 --- a/mp/src/game/server/fortress/tf_obj_barbed_wire.cpp +++ b/mp/src/game/server/fortress/tf_obj_barbed_wire.cpp @@ -8,7 +8,7 @@ #include "tf_obj_barbed_wire.h" #include "tf_player.h" #include "basetfvehicle.h" -#include "engine/ienginesound.h" +#include "engine/IEngineSound.h" #include "te_effect_dispatch.h" #include "ndebugoverlay.h" diff --git a/mp/src/game/server/fortress/tf_obj_buff_station.cpp b/mp/src/game/server/fortress/tf_obj_buff_station.cpp index c409beb05bc..ae15f5fa687 100644 --- a/mp/src/game/server/fortress/tf_obj_buff_station.cpp +++ b/mp/src/game/server/fortress/tf_obj_buff_station.cpp @@ -10,7 +10,7 @@ #include "rope.h" #include "rope_shared.h" #include "entitylist.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "engine/IEngineSound.h" #include "tf_team.h" diff --git a/mp/src/game/server/fortress/tf_obj_manned_missilelauncher.cpp b/mp/src/game/server/fortress/tf_obj_manned_missilelauncher.cpp index 00482194a6f..a917505db51 100644 --- a/mp/src/game/server/fortress/tf_obj_manned_missilelauncher.cpp +++ b/mp/src/game/server/fortress/tf_obj_manned_missilelauncher.cpp @@ -18,7 +18,7 @@ #include "tf_gamerules.h" #include "plasmaprojectile.h" #include "tf_movedata.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "weapon_grenade_rocket.h" #include "tf_obj_manned_missilelauncher.h" diff --git a/mp/src/game/server/fortress/tf_obj_powerpack.cpp b/mp/src/game/server/fortress/tf_obj_powerpack.cpp index c99882c8083..b12de5bf77b 100644 --- a/mp/src/game/server/fortress/tf_obj_powerpack.cpp +++ b/mp/src/game/server/fortress/tf_obj_powerpack.cpp @@ -18,7 +18,7 @@ Copyright (C) 2014-2016 TalonBrave.info #include "tf_stats.h" #include "rope.h" #include "tf_shareddefs.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "hierarchy.h" IMPLEMENT_SERVERCLASS_ST( CObjectPowerPack, DT_ObjectPowerPack ) diff --git a/mp/src/game/server/fortress/tf_obj_resourcepump.cpp b/mp/src/game/server/fortress/tf_obj_resourcepump.cpp index fffadbf6272..2c72abe2a99 100644 --- a/mp/src/game/server/fortress/tf_obj_resourcepump.cpp +++ b/mp/src/game/server/fortress/tf_obj_resourcepump.cpp @@ -16,7 +16,7 @@ Copyright (C) 2014-2016 TalonBrave.info #include "sendproxy.h" #include "vstdlib/random.h" #include "tf_stats.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "engine/IEngineSound.h" BEGIN_DATADESC( CObjectResourcePump ) diff --git a/mp/src/game/server/fortress/tf_obj_resupply.cpp b/mp/src/game/server/fortress/tf_obj_resupply.cpp index 0e3f9c2c033..b06f44a37f3 100644 --- a/mp/src/game/server/fortress/tf_obj_resupply.cpp +++ b/mp/src/game/server/fortress/tf_obj_resupply.cpp @@ -10,7 +10,7 @@ #include "engine/IEngineSound.h" #include "tf_player.h" #include "tf_team.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "world.h" #define RESUPPLY_HEAL_AMT 100 diff --git a/mp/src/game/server/fortress/tf_obj_sentrygun.cpp b/mp/src/game/server/fortress/tf_obj_sentrygun.cpp index bb7ca196153..4f54a3a9f85 100644 --- a/mp/src/game/server/fortress/tf_obj_sentrygun.cpp +++ b/mp/src/game/server/fortress/tf_obj_sentrygun.cpp @@ -23,7 +23,7 @@ #include "vstdlib/random.h" #include "engine/IEngineSound.h" #include "grenade_rocket.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" extern short g_sModelIndexFireball; diff --git a/mp/src/game/server/fortress/tf_obj_shieldwall.cpp b/mp/src/game/server/fortress/tf_obj_shieldwall.cpp index 4a8db6d2ca3..36b25ec0bc3 100644 --- a/mp/src/game/server/fortress/tf_obj_shieldwall.cpp +++ b/mp/src/game/server/fortress/tf_obj_shieldwall.cpp @@ -11,7 +11,7 @@ #include "tf_team.h" #include "techtree.h" #include "tf_shield.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" //----------------------------------------------------------------------------- // Shield wall defines diff --git a/mp/src/game/server/fortress/tf_player.cpp b/mp/src/game/server/fortress/tf_player.cpp index 5fef12955eb..3f0a860a6ba 100644 --- a/mp/src/game/server/fortress/tf_player.cpp +++ b/mp/src/game/server/fortress/tf_player.cpp @@ -8,7 +8,7 @@ #include "basecombatweapon.h" #include "controlzone.h" #include "tf_shareddefs.h" -#include "AmmoDef.h" +#include "ammodef.h" #include "techtree.h" #include "in_buttons.h" #include "tf_team.h" @@ -41,7 +41,7 @@ #include "bone_setup.h" #include "weapon_combatshield.h" #include "weapon_twohandedcontainer.h" -#include "NDebugOverlay.h" +#include "ndebugoverlay.h" #include "tier1/strtools.h" #include "IEffects.h" #include "info_act.h" diff --git a/mp/src/game/server/fortress/tf_player_death.cpp b/mp/src/game/server/fortress/tf_player_death.cpp index 6ce23fd8263..7db78ade795 100644 --- a/mp/src/game/server/fortress/tf_player_death.cpp +++ b/mp/src/game/server/fortress/tf_player_death.cpp @@ -6,7 +6,7 @@ #include "tf_player.h" #include "gamerules.h" #include "basecombatweapon.h" -#include "EntityList.h" +#include "entitylist.h" #include "tf_shareddefs.h" #include "tf_team.h" #include "baseviewmodel.h" diff --git a/mp/src/game/server/fortress/tf_playermove.cpp b/mp/src/game/server/fortress/tf_playermove.cpp index e9d227cc013..d2aa680b5a5 100644 --- a/mp/src/game/server/fortress/tf_playermove.cpp +++ b/mp/src/game/server/fortress/tf_playermove.cpp @@ -7,7 +7,7 @@ #include "tf_movedata.h" #include "tf_class_recon.h" #include "tf_reconvars.h" -#include "IserverVehicle.h" +#include "iservervehicle.h" #include "tf_class_commando.h" #include "ipredictionsystem.h" diff --git a/mp/src/game/server/fortress/tf_shield.h b/mp/src/game/server/fortress/tf_shield.h index 46d51daa525..4dfe6531805 100644 --- a/mp/src/game/server/fortress/tf_shield.h +++ b/mp/src/game/server/fortress/tf_shield.h @@ -13,7 +13,7 @@ #endif #include "baseentity.h" -#include "UtlVector.h" +#include "utlvector.h" //----------------------------------------------------------------------------- diff --git a/mp/src/game/server/fortress/tf_shield_flat.h b/mp/src/game/server/fortress/tf_shield_flat.h index 7bc33b867a2..48ebeb60cf6 100644 --- a/mp/src/game/server/fortress/tf_shield_flat.h +++ b/mp/src/game/server/fortress/tf_shield_flat.h @@ -9,7 +9,7 @@ #define TF_SHIELD_FLAT_H #include "tf_shield.h" -#include "mathlib/Vector.h" +#include "mathlib/vector.h" //----------------------------------------------------------------------------- // diff --git a/mp/src/game/server/fortress/tf_shieldgrenade.cpp b/mp/src/game/server/fortress/tf_shieldgrenade.cpp index 22c294e3e75..aa2f622209d 100644 --- a/mp/src/game/server/fortress/tf_shieldgrenade.cpp +++ b/mp/src/game/server/fortress/tf_shieldgrenade.cpp @@ -6,13 +6,13 @@ //=============================================================================// #include "cbase.h" -#include "BaseAnimating.h" +#include "baseanimating.h" #include "tf_shieldgrenade.h" #include "tf_shieldshared.h" #include "tf_shield_flat.h" #include "tf_player.h" #include "engine/IEngineSound.h" -#include "sprite.h" +#include "Sprite.h" #define SHIELD_GRENADE_FUSE_TIME 2.25f diff --git a/mp/src/game/server/fortress/tf_stats.cpp b/mp/src/game/server/fortress/tf_stats.cpp index 110ea833851..13f2a821ed6 100644 --- a/mp/src/game/server/fortress/tf_stats.cpp +++ b/mp/src/game/server/fortress/tf_stats.cpp @@ -12,7 +12,7 @@ #include "tf_player.h" #include "utlbuffer.h" #include "filesystem.h" -#include "IGameSystem.h" +#include "igamesystem.h" #include "textstatsmgr.h" #include "info_act.h" diff --git a/mp/src/game/server/fortress/tf_teamspawnpoint.h b/mp/src/game/server/fortress/tf_teamspawnpoint.h index e535ea32fdd..dcb67ee587e 100644 --- a/mp/src/game/server/fortress/tf_teamspawnpoint.h +++ b/mp/src/game/server/fortress/tf_teamspawnpoint.h @@ -10,7 +10,7 @@ #pragma once #include "baseentity.h" -#include "EntityOutput.h" +#include "entityoutput.h" class CTeam; diff --git a/mp/src/game/server/fortress/tf_vehicle_battering_ram.cpp b/mp/src/game/server/fortress/tf_vehicle_battering_ram.cpp index 93e2a11a186..6995d936984 100644 --- a/mp/src/game/server/fortress/tf_vehicle_battering_ram.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_battering_ram.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "tf_vehicle_battering_ram.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "ammodef.h" #include "in_buttons.h" #include "shake.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_flatbed.cpp b/mp/src/game/server/fortress/tf_vehicle_flatbed.cpp index 8a87adcbd60..7cd0f9487c0 100644 --- a/mp/src/game/server/fortress/tf_vehicle_flatbed.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_flatbed.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "tf_vehicle_flatbed.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "ammodef.h" #include "in_buttons.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_mortar.cpp b/mp/src/game/server/fortress/tf_vehicle_mortar.cpp index 03fce2fb20c..291e55f9871 100644 --- a/mp/src/game/server/fortress/tf_vehicle_mortar.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_mortar.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "tf_vehicle_mortar.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "ammodef.h" #include "in_buttons.h" #include "vehicle_mortar_shared.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_motorcycle.cpp b/mp/src/game/server/fortress/tf_vehicle_motorcycle.cpp index 533ba13467e..253af919f2c 100644 --- a/mp/src/game/server/fortress/tf_vehicle_motorcycle.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_motorcycle.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "tf_basefourwheelvehicle.h" #include "vphysics/vehicles.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp b/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp index 88879cd94d1..5ccfe006343 100644 --- a/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "tf_vehicle_siege_tower.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "ammodef.h" #include "in_buttons.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_tank.cpp b/mp/src/game/server/fortress/tf_vehicle_tank.cpp index d83639475b8..fb2eefa9be1 100644 --- a/mp/src/game/server/fortress/tf_vehicle_tank.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_tank.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "tf_vehicle_tank.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "ammodef.h" #include "in_buttons.h" #include "vehicle_mortar_shared.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_teleport_station.cpp b/mp/src/game/server/fortress/tf_vehicle_teleport_station.cpp index cb09626d6d5..926f7c652c7 100644 --- a/mp/src/game/server/fortress/tf_vehicle_teleport_station.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_teleport_station.cpp @@ -7,11 +7,11 @@ #include "cbase.h" #include "tf_vehicle_teleport_station.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #include "ammodef.h" #include "in_buttons.h" #include "ndebugoverlay.h" -#include "ieffects.h" +#include "IEffects.h" #include "info_act.h" #include "tf_obj_mcv_selection_panel.h" #include "info_vehicle_bay.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_teleport_station.h b/mp/src/game/server/fortress/tf_vehicle_teleport_station.h index 8036c15e964..acd862dd2e5 100644 --- a/mp/src/game/server/fortress/tf_vehicle_teleport_station.h +++ b/mp/src/game/server/fortress/tf_vehicle_teleport_station.h @@ -12,7 +12,7 @@ #include "tf_basefourwheelvehicle.h" #include "vphysics/vehicles.h" -#include "sprite.h" +#include "Sprite.h" #include "tf_func_mass_teleport.h" diff --git a/mp/src/game/server/fortress/tf_vehicle_wagon.cpp b/mp/src/game/server/fortress/tf_vehicle_wagon.cpp index 2a1348adcf2..f3d6ef3c5b8 100644 --- a/mp/src/game/server/fortress/tf_vehicle_wagon.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_wagon.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "tf_vehicle_wagon.h" #include "engine/IEngineSound.h" -#include "VGuiScreen.h" +#include "vguiscreen.h" #define WAGON_MINS Vector(-30, -50, -10) diff --git a/mp/src/game/server/fortress/tf_walker_strider.cpp b/mp/src/game/server/fortress/tf_walker_strider.cpp index c9babdbb676..2e2ea7eab98 100644 --- a/mp/src/game/server/fortress/tf_walker_strider.cpp +++ b/mp/src/game/server/fortress/tf_walker_strider.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "tf_walker_strider.h" #include "npcevent.h" -#include "engine/ienginesound.h" +#include "engine/IEngineSound.h" #include "tf_gamerules.h" #include "shake.h" #include "in_buttons.h" diff --git a/mp/src/game/server/fortress/trigger_skybox.cpp b/mp/src/game/server/fortress/trigger_skybox.cpp index 15d8799ebc4..f001e9446de 100644 --- a/mp/src/game/server/fortress/trigger_skybox.cpp +++ b/mp/src/game/server/fortress/trigger_skybox.cpp @@ -7,7 +7,7 @@ #include "cbase.h" #include "triggers.h" -#include "env_meteor.h " +#include "env_meteor.h" //----------------------------------------------------------------------------- // 3DSkybox to World Transition Trigger Class diff --git a/mp/src/game/server/hl2/npc_bullsquid.cpp b/mp/src/game/server/hl2/npc_bullsquid.cpp index 2c0706da692..954ea8689a3 100644 --- a/mp/src/game/server/hl2/npc_bullsquid.cpp +++ b/mp/src/game/server/hl2/npc_bullsquid.cpp @@ -7,11 +7,11 @@ #include "cbase.h" #include "game.h" -#include "AI_Default.h" -#include "AI_Schedule.h" -#include "AI_Hull.h" -#include "AI_Navigator.h" -#include "AI_Motor.h" +#include "ai_default.h" +#include "ai_schedule.h" +#include "ai_hull.h" +#include "ai_navigator.h" +#include "ai_motor.h" #include "ai_squad.h" #include "npc_bullsquid.h" #include "npcevent.h" @@ -30,8 +30,8 @@ #include "engine/IEngineSound.h" #include "movevars_shared.h" -#include "AI_Hint.h" -#include "AI_Senses.h" +#include "ai_hint.h" +#include "ai_senses.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" diff --git a/mp/src/game/server/hl2/npc_houndeye.cpp b/mp/src/game/server/hl2/npc_houndeye.cpp index c121d11ae98..1af615eeaed 100644 --- a/mp/src/game/server/hl2/npc_houndeye.cpp +++ b/mp/src/game/server/hl2/npc_houndeye.cpp @@ -15,7 +15,7 @@ #include "ai_squad.h" #include "AI_TacticalServices.h" #include "soundent.h" -#include "EntityList.h" +#include "entitylist.h" #include "game.h" #include "activitylist.h" #include "hl2_shareddefs.h" diff --git a/mp/src/game/server/hl2/weapon_ar1.cpp b/mp/src/game/server/hl2/weapon_ar1.cpp index 994cdabbb0c..4610bab69ae 100644 --- a/mp/src/game/server/hl2/weapon_ar1.cpp +++ b/mp/src/game/server/hl2/weapon_ar1.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "basehlcombatweapon.h" -#include "NPCevent.h" +#include "npcevent.h" #include "basecombatcharacter.h" #include "ai_basenpc.h" #include "player.h" diff --git a/mp/src/game/server/hl2/weapon_smg2.cpp b/mp/src/game/server/hl2/weapon_smg2.cpp index 498faddd0e5..9b9786549bc 100644 --- a/mp/src/game/server/hl2/weapon_smg2.cpp +++ b/mp/src/game/server/hl2/weapon_smg2.cpp @@ -6,7 +6,7 @@ #include "cbase.h" #include "basehlcombatweapon.h" -#include "NPCevent.h" +#include "npcevent.h" #include "basecombatcharacter.h" #include "ai_basenpc.h" #include "player.h" diff --git a/mp/src/game/server/hl2/weapon_thumper.cpp b/mp/src/game/server/hl2/weapon_thumper.cpp index 00275a08af5..f2d984a0da6 100644 --- a/mp/src/game/server/hl2/weapon_thumper.cpp +++ b/mp/src/game/server/hl2/weapon_thumper.cpp @@ -8,7 +8,7 @@ #include "cbase.h" #include "basehlcombatweapon.h" -#include "NPCevent.h" +#include "npcevent.h" #include "basecombatcharacter.h" #include "ai_basenpc.h" #include "player.h" diff --git a/mp/src/game/server/mapdata_server.cpp b/mp/src/game/server/mapdata_server.cpp index fe1dcfc4017..06c4e64dbc2 100644 --- a/mp/src/game/server/mapdata_server.cpp +++ b/mp/src/game/server/mapdata_server.cpp @@ -1,7 +1,7 @@ #include "cbase.h" #include "mapdata_shared.h" -#include "sharedinterface.h" +#include "sharedInterface.h" #include "baseentity.h" #include "world.h" #include "player.h" diff --git a/mp/src/game/shared/fortress/basetfcombatweapon_shared.cpp b/mp/src/game/shared/fortress/basetfcombatweapon_shared.cpp index f4f57b9e61c..12d379163b4 100644 --- a/mp/src/game/shared/fortress/basetfcombatweapon_shared.cpp +++ b/mp/src/game/shared/fortress/basetfcombatweapon_shared.cpp @@ -6,7 +6,7 @@ #if !defined( CLIENT_DLL ) #include "soundent.h" #else -#include "FunctionProxy.h" +#include "functionproxy.h" #include "ivrenderview.h" #include "cl_animevent.h" #include "fx.h" diff --git a/mp/src/game/shared/fortress/basetfvehicle.h b/mp/src/game/shared/fortress/basetfvehicle.h index d575a19f116..9cbc5b5d27e 100644 --- a/mp/src/game/shared/fortress/basetfvehicle.h +++ b/mp/src/game/shared/fortress/basetfvehicle.h @@ -16,9 +16,9 @@ #include "tf_obj_basedrivergun_shared.h" #if defined( CLIENT_DLL ) -#include "IClientVehicle.h" +#include "iclientvehicle.h" #else -#include "IServerVehicle.h" +#include "iservervehicle.h" #endif diff --git a/mp/src/game/shared/fortress/tf_gamemovement_chooser.h b/mp/src/game/shared/fortress/tf_gamemovement_chooser.h index e648fef1675..37f97cde68f 100644 --- a/mp/src/game/shared/fortress/tf_gamemovement_chooser.h +++ b/mp/src/game/shared/fortress/tf_gamemovement_chooser.h @@ -4,8 +4,8 @@ #pragma once #endif -#include "UtlVector.h" -#include "IGameMovement.h" +#include "utlvector.h" +#include "igamemovement.h" #include "tf_gamemovement.h" #include "tf_gamemovement_recon.h" #include "tf_gamemovement_commando.h" diff --git a/mp/src/game/shared/fortress/tf_gamerules.cpp b/mp/src/game/shared/fortress/tf_gamerules.cpp index 3402994b073..d4daffea7d0 100644 --- a/mp/src/game/shared/fortress/tf_gamerules.cpp +++ b/mp/src/game/shared/fortress/tf_gamerules.cpp @@ -33,7 +33,7 @@ #include "igamesystem.h" #include "filesystem.h" #include "info_vehicle_bay.h" - #include "IserverVehicle.h" + #include "iservervehicle.h" #include "weapon_builder.h" #include "weapon_objectselection.h" #include "ndebugoverlay.h" diff --git a/mp/src/game/shared/fortress/tf_gamerules.h b/mp/src/game/shared/fortress/tf_gamerules.h index b6a375c6a45..2d7b83eaf11 100644 --- a/mp/src/game/shared/fortress/tf_gamerules.h +++ b/mp/src/game/shared/fortress/tf_gamerules.h @@ -6,7 +6,7 @@ #endif -#include "Teamplay_GameRules.h" +#include "teamplay_gamerules.h" #include "takedamageinfo.h" diff --git a/mp/src/game/shared/fortress/tf_shield_shared.cpp b/mp/src/game/shared/fortress/tf_shield_shared.cpp index 2ca295fa303..616741654a2 100644 --- a/mp/src/game/shared/fortress/tf_shield_shared.cpp +++ b/mp/src/game/shared/fortress/tf_shield_shared.cpp @@ -15,7 +15,7 @@ #include "tf_shieldshared.h" #include "edict.h" -#include "mathlib/VMatrix.h" +#include "mathlib/vmatrix.h" #include "engine/IEngineTrace.h" #ifdef CLIENT_DLL diff --git a/mp/src/game/shared/fortress/tf_shieldshared.h b/mp/src/game/shared/fortress/tf_shieldshared.h index 5ece86c72f1..74ff3f6ef78 100644 --- a/mp/src/game/shared/fortress/tf_shieldshared.h +++ b/mp/src/game/shared/fortress/tf_shieldshared.h @@ -13,9 +13,9 @@ #include "mathlib/mathlib.h" #include "mathlib/vector.h" -#include "mathlib/VMatrix.h" -#include "UtlVector.h" -#include "SheetSimulator.h" +#include "mathlib/vmatrix.h" +#include "utlvector.h" +#include "sheetsimulator.h" #include "predictable_entity.h" diff --git a/mp/src/game/shared/fortress/tf_tacticalmap.cpp b/mp/src/game/shared/fortress/tf_tacticalmap.cpp index 24dbb5a769c..f044b90c1ec 100644 --- a/mp/src/game/shared/fortress/tf_tacticalmap.cpp +++ b/mp/src/game/shared/fortress/tf_tacticalmap.cpp @@ -11,7 +11,7 @@ #include "c_team.h" #include "c_tfteam.h" #include "c_basetfplayer.h" -#include "C_BaseObject.h" +#include "c_baseobject.h" static inline bool IsPlayerCamoed( int iEntIndex ) { diff --git a/mp/src/game/shared/fortress/tfclassdata_shared.h b/mp/src/game/shared/fortress/tfclassdata_shared.h index 68e480bad97..ed0c881dc83 100644 --- a/mp/src/game/shared/fortress/tfclassdata_shared.h +++ b/mp/src/game/shared/fortress/tfclassdata_shared.h @@ -4,6 +4,7 @@ #pragma once #endif +#include "cbase.h" #include "mathlib/vector.h" diff --git a/mp/src/game/shared/fortress/weapon_arcwelder.cpp b/mp/src/game/shared/fortress/weapon_arcwelder.cpp index 5bef1ab6a39..86f811e84e9 100644 --- a/mp/src/game/shared/fortress/weapon_arcwelder.cpp +++ b/mp/src/game/shared/fortress/weapon_arcwelder.cpp @@ -15,7 +15,7 @@ #include "particles_simple.h" #include "fx.h" #include "fx_quad.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #define CWeaponArcWelder C_WeaponArcWelder #else diff --git a/mp/src/game/shared/fortress/weapon_builder.cpp b/mp/src/game/shared/fortress/weapon_builder.cpp index 4eecffc7095..962829967a0 100644 --- a/mp/src/game/shared/fortress/weapon_builder.cpp +++ b/mp/src/game/shared/fortress/weapon_builder.cpp @@ -9,7 +9,7 @@ Copyright (C) 2014-2017 TalonBrave.info #if !defined(CLIENT_DLL) #include "tf_player.h" #include "tf_basecombatweapon.h" -#include "EntityList.h" +#include "entitylist.h" #endif #include "in_buttons.h" #include "weapon_builder.h" diff --git a/mp/src/game/shared/fortress/weapon_combat_burstrifle.cpp b/mp/src/game/shared/fortress/weapon_combat_burstrifle.cpp index 4e6071dbb66..8f95e677bc8 100644 --- a/mp/src/game/shared/fortress/weapon_combat_burstrifle.cpp +++ b/mp/src/game/shared/fortress/weapon_combat_burstrifle.cpp @@ -10,7 +10,7 @@ #include "weapon_combat_usedwithshieldbase.h" #include "in_buttons.h" #include "plasmaprojectile.h" -#include "ieffects.h" +#include "IEffects.h" #if defined( CLIENT_DLL ) #include "fx.h" diff --git a/mp/src/game/shared/fortress/weapon_combat_grenade_emp.cpp b/mp/src/game/shared/fortress/weapon_combat_grenade_emp.cpp index 0a5de8f8e58..00897056f3d 100644 --- a/mp/src/game/shared/fortress/weapon_combat_grenade_emp.cpp +++ b/mp/src/game/shared/fortress/weapon_combat_grenade_emp.cpp @@ -5,7 +5,7 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "sprite.h" +#include "Sprite.h" #include "basetfplayer_shared.h" #include "weapon_combat_usedwithshieldbase.h" #include "weapon_combat_basegrenade.h" diff --git a/mp/src/game/shared/fortress/weapon_combat_plasmarifle.cpp b/mp/src/game/shared/fortress/weapon_combat_plasmarifle.cpp index 4cce61a2e13..80b15d7f45a 100644 --- a/mp/src/game/shared/fortress/weapon_combat_plasmarifle.cpp +++ b/mp/src/game/shared/fortress/weapon_combat_plasmarifle.cpp @@ -17,7 +17,7 @@ #include "iefx.h" #include "dlight.h" -#include "ClientEffectPrecacheSystem.h" +#include "clienteffectprecachesystem.h" #include "beamdraw.h" #define CWeaponCombatPlasmaRifle C_WeaponCombatPlasmaRifle diff --git a/mp/src/game/shared/fortress/weapon_drainbeam.cpp b/mp/src/game/shared/fortress/weapon_drainbeam.cpp index 5e80bfebf41..2a6eacc6d60 100644 --- a/mp/src/game/shared/fortress/weapon_drainbeam.cpp +++ b/mp/src/game/shared/fortress/weapon_drainbeam.cpp @@ -8,7 +8,7 @@ #include "basetfplayer_shared.h" #include "in_buttons.h" #include "weapon_combatshield.h" -#include "engine/ienginesound.h" +#include "engine/IEngineSound.h" #include "grenade_base_empable.h" #if defined( CLIENT_DLL ) diff --git a/mp/src/game/shared/fortress/weapon_flame_thrower.cpp b/mp/src/game/shared/fortress/weapon_flame_thrower.cpp index a39caeb579c..55f7de20d66 100644 --- a/mp/src/game/shared/fortress/weapon_flame_thrower.cpp +++ b/mp/src/game/shared/fortress/weapon_flame_thrower.cpp @@ -32,7 +32,7 @@ #if defined( CLIENT_DLL ) #include "vstdlib/random.h" - #include "engine/ienginesound.h" + #include "engine/IEngineSound.h" #define FLAMETHROWER_PARTICLES_PER_SEC 100 diff --git a/mp/src/game/shared/fortress/weapon_laserdesignator.cpp b/mp/src/game/shared/fortress/weapon_laserdesignator.cpp index 72259e70476..7837bbe7bf5 100644 --- a/mp/src/game/shared/fortress/weapon_laserdesignator.cpp +++ b/mp/src/game/shared/fortress/weapon_laserdesignator.cpp @@ -5,7 +5,7 @@ // $NoKeywords: $ //=============================================================================// #include "cbase.h" -#include "NPCEvent.h" +#include "npcevent.h" #include "tf_basecombatweapon.h" #include "smoke_trail.h" #include "tf_player.h" diff --git a/mp/src/game/shared/fortress/weapon_laserrifle.cpp b/mp/src/game/shared/fortress/weapon_laserrifle.cpp index be3f5256695..5cf9fe0a270 100644 --- a/mp/src/game/shared/fortress/weapon_laserrifle.cpp +++ b/mp/src/game/shared/fortress/weapon_laserrifle.cpp @@ -8,7 +8,7 @@ //=============================================================================// #include "cbase.h" -#include "NPCEvent.h" +#include "npcevent.h" #include "tf_basecombatweapon.h" #include "basecombatcharacter.h" #include "smoke_trail.h" diff --git a/mp/src/game/shared/fortress/weapon_repairgun.cpp b/mp/src/game/shared/fortress/weapon_repairgun.cpp index 06072209efb..7497c794160 100644 --- a/mp/src/game/shared/fortress/weapon_repairgun.cpp +++ b/mp/src/game/shared/fortress/weapon_repairgun.cpp @@ -11,7 +11,7 @@ #include "basetfplayer_shared.h" #include "in_buttons.h" #include "weapon_combatshield.h" -#include "engine/ienginesound.h" +#include "engine/IEngineSound.h" #include "grenade_base_empable.h" #include "basetfvehicle.h" #include "tf_gamerules.h" From 3f3b04913ce4b6821c7a8fc9dee740adfc403b3a Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Wed, 26 Feb 2020 16:04:20 +0100 Subject: [PATCH 03/11] Get rid of some unnecessary temporary buffers --- mp/src/game/client/fortress/c_tfteam.cpp | 9 ++------- mp/src/game/client/fortress/hud_ammo.cpp | 6 +++--- mp/src/game/server/baseentity.cpp | 11 +---------- mp/src/game/server/util.cpp | 7 +------ 4 files changed, 7 insertions(+), 26 deletions(-) diff --git a/mp/src/game/client/fortress/c_tfteam.cpp b/mp/src/game/client/fortress/c_tfteam.cpp index 3cf4cd17aa0..3b1c5a8fbce 100644 --- a/mp/src/game/client/fortress/c_tfteam.cpp +++ b/mp/src/game/client/fortress/c_tfteam.cpp @@ -177,17 +177,12 @@ void C_TFTeam::ReceiveMessage( int classID, bf_read &msg ) char sResourceString[256]; if ( GetLocalTeam() == this ) { - itoa(iAmount, sResourceString, 10 ); - Q_strncat( sResourceString, " RESOURCES HARVESTED!", sizeof(sResourceString) ); + V_snprintf( sResourceString, sizeof(sResourceString), "%d RESOURCES HARVESTED!", iAmount ); iYPos = ScreenHeight() / 4; } else { - char sAmount[256]; - itoa(iAmount, sAmount, 10 ); - Q_strncpy( sResourceString, "ENEMY TEAM HAS HARVESTED ", sizeof(sResourceString) ); - Q_strncat( sResourceString, sAmount, sizeof(sResourceString) ); - Q_strncat( sResourceString, " RESOURCES!", sizeof(sResourceString) ); + V_snprintf( sResourceString, sizeof(sResourceString), "ENEMY TEAM HAS HARVESTED %d RESOURCES!", iAmount ); iYPos = (ScreenHeight() / 4) + 32; } diff --git a/mp/src/game/client/fortress/hud_ammo.cpp b/mp/src/game/client/fortress/hud_ammo.cpp index 6854caec7b1..779b6a37046 100644 --- a/mp/src/game/client/fortress/hud_ammo.cpp +++ b/mp/src/game/client/fortress/hud_ammo.cpp @@ -159,10 +159,10 @@ class CHudAmmoPrimaryClip : public CHudNumeric virtual bool _GetValue( char *val, int maxlen ) { - Q_snprintf( val, maxlen, "" ); - - if ( !GetHudAmmo()->ShouldShowPrimaryClip() ) + if ( !GetHudAmmo()->ShouldShowPrimaryClip() ) { + Q_snprintf( val, maxlen, "" ); return false; + } int count = GetHudAmmo()->m_nTotalAmmo1; Q_snprintf( val, maxlen, "%i", count ); diff --git a/mp/src/game/server/baseentity.cpp b/mp/src/game/server/baseentity.cpp index c72f3c23a12..59db3cb9838 100644 --- a/mp/src/game/server/baseentity.cpp +++ b/mp/src/game/server/baseentity.cpp @@ -3871,17 +3871,8 @@ bool CBaseEntity::AcceptInput( const char *szInputName, CBaseEntity *pActivator, { // found a match - char szBuffer[256]; // mapper debug message - if (pCaller != NULL) - { - Q_snprintf( szBuffer, sizeof(szBuffer), "(%0.2f) input %s: %s.%s(%s)\n", gpGlobals->curtime, STRING(pCaller->m_iName), GetDebugName(), szInputName, Value.String() ); - } - else - { - Q_snprintf( szBuffer, sizeof(szBuffer), "(%0.2f) input : %s.%s(%s)\n", gpGlobals->curtime, GetDebugName(), szInputName, Value.String() ); - } - DevMsg( 2, "%s", szBuffer ); + DevMsg( 2, "(%0.2f) input %s: %s.%s(%s)\n", gpGlobals->curtime, pCaller ? STRING(pCaller->m_iName) : "", GetDebugName(), szInputName, Value.String() ); ADD_DEBUG_HISTORY( HISTORY_ENTITY_IO, szBuffer ); if (m_debugOverlays & OVERLAY_MESSAGE_BIT) diff --git a/mp/src/game/server/util.cpp b/mp/src/game/server/util.cpp index 1f2451148d9..0bab0cb01ec 100644 --- a/mp/src/game/server/util.cpp +++ b/mp/src/game/server/util.cpp @@ -49,12 +49,7 @@ void DBG_AssertFunction( bool fExpr, const char *szExpr, const char *szFile, int { if (fExpr) return; - char szOut[512]; - if (szMessage != NULL) - Q_snprintf(szOut,sizeof(szOut), "ASSERT FAILED:\n %s \n(%s@%d)\n%s", szExpr, szFile, szLine, szMessage); - else - Q_snprintf(szOut,sizeof(szOut), "ASSERT FAILED:\n %s \n(%s@%d)\n", szExpr, szFile, szLine); - Warning( "%s", szOut); + Warning("ASSERT FAILED:\n %s \n(%s@%d)\n%s", szExpr, szFile, szLine, szMessage ? szMessage : ""); } #endif // DEBUG From 2470a9b350115dfa70cfed6cfca703a9708ca5ce Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sat, 30 Jan 2021 13:38:29 +0100 Subject: [PATCH 04/11] Add missing Msg() parameter --- mp/src/game/server/fortress/tf_team.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mp/src/game/server/fortress/tf_team.cpp b/mp/src/game/server/fortress/tf_team.cpp index 4754ae9f5c2..fc2ed8a2285 100644 --- a/mp/src/game/server/fortress/tf_team.cpp +++ b/mp/src/game/server/fortress/tf_team.cpp @@ -529,7 +529,7 @@ void CTFTeam::RecomputePreferences( void ) if ( preferred < 0 || preferred >= MAX_TECHNOLOGIES ) { - Msg( "Player %s tried to set preference to out of range tech %i\n", preferred ); + Msg( "Player %s tried to set preference to out of range tech %i\n", STRING( pPlayer->pl.netname ), preferred ); continue; } @@ -539,7 +539,7 @@ void CTFTeam::RecomputePreferences( void ) if ( !technology ) continue; - // Msg( "player %s prefers %s\n", STRING( pPlayer->pl->netname ), technology->GetPrintName() ); + // Msg( "player %s prefers %s\n", STRING( pPlayer->pl.netname ), technology->GetPrintName() ); // Add one vote technology->IncrementPreferences(); From 2738c9cdd46edd4655b16fe850a645ad13d5a026 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sat, 30 Jan 2021 13:31:52 +0100 Subject: [PATCH 05/11] Prevent using "plain" strings as format strings Print them using "%s" instead, so their contents are not accidentally interpreted as format specifiers. --- mp/src/game/client/fortress/c_tf_hints.cpp | 2 +- mp/src/game/client/fortress/hud_deathnotice.cpp | 2 +- mp/src/game/client/fortress/hud_weaponselection.cpp | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/mp/src/game/client/fortress/c_tf_hints.cpp b/mp/src/game/client/fortress/c_tf_hints.cpp index 32fc354dbe4..f630836286e 100644 --- a/mp/src/game/client/fortress/c_tf_hints.cpp +++ b/mp/src/game/client/fortress/c_tf_hints.cpp @@ -321,7 +321,7 @@ const char *CHintDeployWeapon::GetKeyName( void ) if ( !stricmp( weapon->GetName(), GetWeaponType() ) ) { - Q_snprintf( keyname, 128, GetKeyNameForBinding( VarArgs( "slot%i", slot + 1 ) ) ); + Q_snprintf( keyname, 128, "%s", GetKeyNameForBinding( VarArgs( "slot%i", slot + 1 ) ) ); break; } } diff --git a/mp/src/game/client/fortress/hud_deathnotice.cpp b/mp/src/game/client/fortress/hud_deathnotice.cpp index 2e37b3b7915..96e1d77eeae 100644 --- a/mp/src/game/client/fortress/hud_deathnotice.cpp +++ b/mp/src/game/client/fortress/hud_deathnotice.cpp @@ -317,7 +317,7 @@ void CHudDeathNotice::FireGameEvent( IGameEvent *event ) { Q_strncat( sDeathMsg, VarArgs( " with %s.\n", fullkilledwith + 2 ), sizeof( sDeathMsg ), COPY_ALL_CHARACTERS ); } - Msg( sDeathMsg ); + Msg( "%s", sDeathMsg ); } diff --git a/mp/src/game/client/fortress/hud_weaponselection.cpp b/mp/src/game/client/fortress/hud_weaponselection.cpp index 7380491aabc..2c3bd4f4533 100644 --- a/mp/src/game/client/fortress/hud_weaponselection.cpp +++ b/mp/src/game/client/fortress/hud_weaponselection.cpp @@ -740,7 +740,7 @@ void CHudWeaponSelection::GetSlotInfo(const CWeaponMenuItem *w, C_BaseCombatWeap info.icon = gHUD.GetIcon(GetBuildMenuMaterial(w->openbuildmenu)); info.drawAmmo = false; info.ammoCaution = false; - Q_snprintf(info.printname, sizeof(info.printname), GetBuildMenuName(w->openbuildmenu)); + Q_snprintf(info.printname, sizeof(info.printname), "%s", GetBuildMenuName(w->openbuildmenu)); info.weapon = NULL; } else if (!w->weapon) @@ -750,13 +750,12 @@ void CHudWeaponSelection::GetSlotInfo(const CWeaponMenuItem *w, C_BaseCombatWeap info.icon = NULL; info.drawAmmo = false; info.ammoCaution = false; - Q_snprintf(info.printname, sizeof(info.printname), ""); + Q_snprintf(info.printname, sizeof(info.printname), "%s", GetBuildMenuName(w->openbuildmenu)); info.weapon = NULL; } else { C_BaseCombatWeapon *pWeapon = w->weapon; - Assert(pWeapon); info.active = active == pWeapon; info.valid = pWeapon->CanBeSelected(); From 4e9ae46132ca30a75dff4fe71aafd19fab7b6533 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sat, 30 Jan 2021 13:20:47 +0100 Subject: [PATCH 06/11] Remove duplicate sources from project files --- mp/src/game/client/client_hl2mp.vpc | 12 ++++-------- mp/src/game/server/server_hl2mp.vpc | 7 ++----- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/mp/src/game/client/client_hl2mp.vpc b/mp/src/game/client/client_hl2mp.vpc index 63a3bbeec77..151d5e06fa7 100644 --- a/mp/src/game/client/client_hl2mp.vpc +++ b/mp/src/game/client/client_hl2mp.vpc @@ -42,16 +42,13 @@ $Project "Client" $File "vgui_entityimagepanel.cpp" $File "vgui_entitypanel.cpp" - $File "teambitmapimage.cpp" + $File "TeamBitmapImage.cpp" $File "hl2mp\hl2mp_hud_chat.cpp" $Folder "Invasion" { $Folder "Shared" { - $File $SRCDIR\game\shared\fortress\weapon_repairgun.cpp - $File $SRCDIR\game\shared\fortress\weapon_repairgun.h - $File $SRCDIR\game\shared\fortress\baseobject_shared.cpp $File $SRCDIR\game\shared\fortress\baseobject_shared.h $File $SRCDIR\game\shared\fortress\basetfcombatweapon_shared.cpp @@ -63,8 +60,8 @@ $Project "Client" $File $SRCDIR\game\shared\fortress\env_meteor_shared.cpp // Grenades - $File $SRCDIR\game\shared\fortress\grenade_base_empable.cpp - $File $SRCDIR\game\shared\fortress\grenade_base_empable.h + //$File $SRCDIR\game\shared\fortress\grenade_base_empable.cpp + //$File $SRCDIR\game\shared\fortress\grenade_base_empable.h //$File $SRCDIR\game\shared\fortress\grenade_objectsapper.cpp //$File $SRCDIR\game\shared\fortress\grenade_objectsapper.h //$File $SRCDIR\game\shared\fortress\grenade_limpetmine.cpp @@ -166,6 +163,7 @@ $Project "Client" $File $SRCDIR\game\shared\fortress\weapon_combat_grenade_emp.cpp $File $SRCDIR\game\shared\fortress\grenade_base_empable.cpp + $File $SRCDIR\game\shared\fortress\grenade_base_empable.h $File $SRCDIR\game\shared\fortress\grenade_emp.cpp } @@ -320,8 +318,6 @@ $Project "Client" $File fortress/c_basetfplayer.h $File fortress/c_controlzone.cpp $File fortress/c_controlzone.h - $File fortress/c_vehicle_tank.cpp - $File fortress/c_vehicle_tank.h $File fortress/c_demo_entities.cpp $File fortress/c_demo_entities.h $File fortress/c_effect_shootingstar.cpp diff --git a/mp/src/game/server/server_hl2mp.vpc b/mp/src/game/server/server_hl2mp.vpc index 22e395bec78..c2ee26d1b20 100644 --- a/mp/src/game/server/server_hl2mp.vpc +++ b/mp/src/game/server/server_hl2mp.vpc @@ -70,8 +70,6 @@ $Project "Server" { $Folder "Shared" { - $File $SRCDIR\game\shared\fortress\grenade_base_empable.cpp - $File $SRCDIR\game\shared\fortress\grenade_base_empable.h $File $SRCDIR\game\shared\fortress\baseobject_shared.cpp $File $SRCDIR\game\shared\fortress\baseobject_shared.h $File $SRCDIR\game\shared\fortress\basetfcombatweapon_shared.cpp @@ -85,6 +83,7 @@ $Project "Server" // Grenades $File $SRCDIR\game\shared\fortress\grenade_antipersonnel.cpp $File $SRCDIR\game\shared\fortress\grenade_base_empable.cpp + $File $SRCDIR\game\shared\fortress\grenade_base_empable.h $File $SRCDIR\game\shared\fortress\grenade_emp.cpp $File $SRCDIR\game\shared\fortress\grenade_objectsapper.cpp $File $SRCDIR\game\shared\fortress\grenade_objectsapper.h @@ -220,6 +219,7 @@ $Project "Server" $File fortress/tf_obj_manned_shield.cpp $File fortress/tf_obj_mapdefined.cpp $File fortress/tf_obj_mcv_selection_panel.cpp + $File fortress/tf_obj_mcv_selection_panel.h $File fortress/tf_obj_mortar.cpp $File fortress/tf_obj_powerpack.cpp $File fortress/tf_obj_powerpack.h @@ -422,9 +422,6 @@ $Project "Server" $File fortress/tf_walker_strider.cpp $File fortress/tf_walker_strider.h } - - $File fortress/tf_obj_mcv_selection_panel.cpp - $File fortress/tf_obj_mcv_selection_panel.h } } } From 822c7bdfb10154ff6e29d59f94935d51965d4b46 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sun, 31 Jan 2021 15:52:37 +0100 Subject: [PATCH 07/11] Fix Event_CrateSmashed for vehicles We don't use CPropVehicleDriveable. Instead we've got CBaseTFVehicle, so check for that. --- mp/src/game/server/props.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/mp/src/game/server/props.cpp b/mp/src/game/server/props.cpp index 9ba6c11bb38..5090a148c08 100644 --- a/mp/src/game/server/props.cpp +++ b/mp/src/game/server/props.cpp @@ -40,7 +40,7 @@ #include "doors.h" #include "physics_collisionevent.h" #include "gamestats.h" -#include "vehicle_base.h" +#include "basetfvehicle.h" // memdbgon must be the last include file in a .cpp file!!! #include "tier0/memdbgon.h" @@ -1611,14 +1611,10 @@ void CBreakableProp::Break( CBaseEntity *pBreaker, const CTakeDamageInfo &info ) { bSmashed = true; } - else if ( pBreaker && dynamic_cast< CPropVehicleDriveable * >( pBreaker ) ) + else if ( pBreaker && dynamic_cast< CBaseTFVehicle * >( pBreaker ) ) { - CPropVehicleDriveable *veh = static_cast< CPropVehicleDriveable * >( pBreaker ); - CBaseEntity *driver = veh->GetDriver(); - if ( driver && driver->IsPlayer() ) - { - bSmashed = true; - } + CBaseTFVehicle *veh = static_cast< CBaseTFVehicle * >( pBreaker ); + bSmashed = veh->GetDriverPlayer(); } if ( bSmashed ) { From 7cea376a75bbfd21fc0ff66b7741d2cc5b7fe62b Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Wed, 27 Jan 2021 22:45:53 +0100 Subject: [PATCH 08/11] Fix gcc 8+ build errors --- .gitignore | 4 + mp/src/devtools/gcc9+support.cpp | 44 ++ mp/src/devtools/makefile_base_posix.mak | 487 +----------------- .../devtools/makefile_base_posix.mak.default | 472 +++++++++++++++++ mp/src/devtools/makefile_base_posix.mak.gcc8 | 469 +++++++++++++++++ mp/src/game/client/c_baseflex.h | 1 - mp/src/game/client/clientshadowmgr.cpp | 3 +- mp/src/game/client/fortress/c_shield.cpp | 9 + mp/src/game/client/fortress/hintitembase.h | 4 +- .../fortress/hud_commander_statuspanel.cpp | 4 +- mp/src/game/server/baseflex.h | 1 - mp/src/game/server/fortress/grenade_rocket.h | 2 +- mp/src/game/server/fortress/mortar_round.h | 2 +- .../game/server/fortress/npc_bug_warrior.cpp | 10 +- mp/src/game/server/fortress/npc_bug_warrior.h | 2 +- .../fortress/tf_basefourwheelvehicle.cpp | 6 +- mp/src/game/server/fortress/tf_obj.cpp | 4 +- mp/src/game/server/fortress/tf_obj.h | 2 +- mp/src/game/server/fortress/tf_player.h | 1 - mp/src/game/server/fortress/tf_playerclass.h | 13 +- mp/src/game/server/fortress/tf_shield.cpp | 9 + .../fortress/tf_vehicle_siege_tower.cpp | 6 +- .../shared/fortress/grenade_antipersonnel.h | 2 +- mp/src/game/shared/fortress/grenade_emp.h | 2 +- .../game/shared/fortress/grenade_limpetmine.h | 2 +- .../shared/fortress/grenade_objectsapper.h | 2 +- mp/src/game/shared/fortress/tf_shareddefs.cpp | 18 +- mp/src/game/shared/fortress/tf_shareddefs.h | 1 + .../game/shared/fortress/tf_shield_shared.cpp | 2 +- mp/src/game/shared/fortress/tf_shieldshared.h | 2 +- mp/src/public/bone_setup.cpp | 9 + mp/src/public/mathlib/vector.h | 3 +- mp/src/public/particles/particles.h | 6 +- mp/src/public/tier1/utlblockmemory.h | 8 +- mp/src/public/tier1/utlsoacontainer.h | 97 +++- 35 files changed, 1187 insertions(+), 522 deletions(-) create mode 100644 mp/src/devtools/gcc9+support.cpp create mode 100644 mp/src/devtools/makefile_base_posix.mak.default create mode 100644 mp/src/devtools/makefile_base_posix.mak.gcc8 diff --git a/.gitignore b/.gitignore index 37b6154912d..f0f33699994 100644 --- a/.gitignore +++ b/.gitignore @@ -25,6 +25,7 @@ ipch *.mak.vpc_crc *.xcodeproj/ !devtools/*.mak +devtools/makefile_base_posix.mak.link !utils/smdlexp/smdlexp.mak # Specific Source build products @@ -105,3 +106,6 @@ mp/game_src/maps/hogsy/*.bsp *.old *.rehex-meta *.ztmp + +# Build support files +devtools/gcc9+support.o diff --git a/mp/src/devtools/gcc9+support.cpp b/mp/src/devtools/gcc9+support.cpp new file mode 100644 index 00000000000..270f179ffe4 --- /dev/null +++ b/mp/src/devtools/gcc9+support.cpp @@ -0,0 +1,44 @@ +// compatibility with old ABI +#if __GNUC__ >= 9 +#include + +extern "C" double __pow_finite(double a, double b) +{ + return pow(a, b); +} + +extern "C" double __log_finite(double a) +{ + return log(a); +} + +extern "C" double __exp_finite(double a) +{ + return exp(a); +} + +extern "C" double __atan2_finite(double a, double b) +{ + return atan2(a, b); +} + +extern "C" float __powf_finite(float a, float b) +{ + return powf(a, b); +} + +extern "C" float __logf_finite(float a) +{ + return logf(a); +} + +extern "C" float __expf_finite(float a) +{ + return expf(a); +} + +extern "C" float __acosf_finite(float a) +{ + return acosf(a); +} +#endif diff --git a/mp/src/devtools/makefile_base_posix.mak b/mp/src/devtools/makefile_base_posix.mak index c76a1b1fdc6..a44309f4a3d 100644 --- a/mp/src/devtools/makefile_base_posix.mak +++ b/mp/src/devtools/makefile_base_posix.mak @@ -1,472 +1,15 @@ -# -# Base makefile for Linux. -# -# !!!!! Note to future editors !!!!! -# -# before you make changes, make sure you grok: -# 1. the difference between =, :=, +=, and ?= -# 2. how and when this base makefile gets included in the generated makefile(s) -# ( see http://www.gnu.org/software/make/manual/make.html#Flavors ) -# -# Command line prefixes: -# - errors are ignored -# @ command is not printed to stdout before being executed -# + command is executed even if Make is invoked in "do not exec" mode - -OS := $(shell uname) -HOSTNAME := $(shell hostname) - --include $(SRCROOT)/devtools/steam_def.mak --include $(SRCROOT)/devtools/sourcesdk_def.mak - -# To build with clang, set the following in your environment: -# CC = clang -# CXX = clang++ -ifneq (,$(findstring clang,$(CXX))) - CLANG_BUILD = 1 -endif - -ifeq ($(OS),Darwin) - $(error This file should never be used for Mac - use base.xconfig) -endif - -ifeq ($(CFG), release) - # With gcc 4.6.3, engine.so went from 7,383,765 to 8,429,109 when building with -O3. - # There also was no speed difference running at 1280x1024. May 2012, mikesart. - # tonyp: The size increase was likely caused by -finline-functions and -fipa-cp-clone getting switched on with -O3. - # -fno-omit-frame-pointer: need this for stack traces with perf. - OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize - ifeq ($(CLANG_BUILD),1) - # These aren't supported wit Clang 3.5. Need to remove when we update that. - OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops - else - OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops - endif -else - OptimizerLevel_CompilerSpecific = -O0 - #-O1 -finline-functions -endif - -# CPPFLAGS == "c/c++ *preprocessor* flags" - not "cee-plus-plus flags" -ARCH_FLAGS = -BUILDING_MULTI_ARCH = 0 -# Preserve cflags set in environment -ENV_CFLAGS := $(CFLAGS) -ENV_CXXFLAGS := $(CXXFLAGS) -CPPFLAGS = $(DEFINES) $(addprefix -I, $(abspath $(INCLUDEDIRS) )) -BASE_CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility) $(OptimizerLevel) -pipe $(GCC_ExtraCompilerFlags) -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE -CFLAGS = $(BASE_CFLAGS) $(ENV_CFLAGS) -# In -std=gnu++0x mode we get lots of errors about "error: narrowing conversion". -fpermissive -# turns these into warnings in gcc, and -Wno-c++11-narrowing suppresses them entirely in clang 3.1+. -ifeq ($(CLANG_BUILD),1) - CXXFLAGS = $(BASE_CFLAGS) -std=gnu++0x -Wno-c++11-narrowing -Wno-dangling-else $(ENV_CXXFLAGS) -else - CXXFLAGS = $(BASE_CFLAGS) -std=gnu++0x -fpermissive $(ENV_CXXFLAGS) -endif -DEFINES += -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE - -## TODO: This cases build errors in cstrike/bin right now. Need to debug. -# This causes all filesystem interfaces to default to their 64bit versions on -# 32bit systems, which means we don't break on filesystems with inodes > 32bit. -# DEFINES += -D_FILE_OFFSET_BITS=64 - -LDFLAGS = $(CFLAGS) $(GCC_ExtraLinkerFlags) $(OptimizerLevel) -GENDEP_CXXFLAGS = -MMD -MP -MF $(@:.o=.P) -MAP_FLAGS = -Srv_GAMEOUTPUTFILE = -COPY_DLL_TO_SRV = 0 - -# We should always specify -Wl,--build-id, as documented at: -# http://linux.die.net/man/1/ld and http://fedoraproject.org/wiki/Releases/FeatureBuildId.http://fedoraproject.org/wiki/Releases/FeatureBuildId -LDFLAGS += -Wl,--build-id - -# -# If we should be running in a chroot, check to see if we are. If not, then prefix everything with the -# required chroot -# -ifdef MAKE_CHROOT - export STEAM_RUNTIME_PATH := /usr - ifneq ("$(SCHROOT_CHROOT_NAME)", "$(CHROOT_NAME)") - $(info '$(SCHROOT_CHROOT_NAME)' is not '$(CHROOT_NAME)') - $(error This makefile should be run from within a chroot. 'schroot --chroot $(CHROOT_NAME) -- $(MAKE) $(MAKEFLAGS)') - endif - GCC_VER = -4.8 - P4BIN = $(SRCROOT)/devtools/bin/linux/p4 - CRYPTOPPDIR=ubuntu12_32_gcc48 -else ifeq ($(USE_VALVE_BINDIR),1) - # Using /valve/bin directory. - export STEAM_RUNTIME_PATH ?= /valve - GCC_VER = -4.6 - P4BIN = p4 - CRYPTOPPDIR=linux32 -else - # Not using chroot, use old steam-runtime. (gcc 4.6.3) - export STEAM_RUNTIME_PATH ?= /valve/steam-runtime - GCC_VER = - P4BIN = p4 - CRYPTOPPDIR=ubuntu12_32 -endif - -ifeq ($(TARGET_PLATFORM),linux64) - MARCH_TARGET = core2 -else - MARCH_TARGET = pentium4 -endif - -ifeq ($(USE_VALVE_BINDIR),1) - # On dedicated servers, some plugins depend on global variable symbols in addition to functions. - # So symbols like _Z16ClearMultiDamagev should show up when you do "nm server_srv.so" in TF2. - STRIP_FLAGS = -else - # Linux desktop client (or client/dedicated server in chroot). - STRIP_FLAGS = -x -endif - -ifeq ($(CLANG_BUILD),1) - # Clang does not support -mfpmath=sse because it uses whatever - # instruction set extensions are available by default. - SSE_GEN_FLAGS = -msse2 -else - SSE_GEN_FLAGS = -msse2 -mfpmath=sse -endif - -CCACHE := $(SRCROOT)/devtools/bin/linux/ccache - -ifeq ($(origin AR), default) - AR = $(STEAM_RUNTIME_PATH)/bin/ar crs -endif -ifeq ($(origin CC), default) - CC = $(CCACHE) $(STEAM_RUNTIME_PATH)/bin/gcc$(GCC_VER) -endif -ifeq ($(origin CXX), default) - CXX = $(CCACHE) $(STEAM_RUNTIME_PATH)/bin/g++$(GCC_VER) -endif - -# Support ccache with clang. Add -Qunused-arguments to avoid excessive warnings due to -# a ccache quirk. Could also upgrade ccache. -# http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html -ifeq ($(CLANG_BUILD),1) - CC := $(CCACHE) $(CC) -Qunused-arguments -fcolor-diagnostics - CXX := $(CCACHE) $(CXX) -Qunused-arguments -fcolor-diagnostics -endif -LINK ?= $(CC) - -ifeq ($(STEAM_BRANCH),1) - WARN_FLAGS = -Wall -Wextra -Wshadow -Wno-invalid-offsetof -else - WARN_FLAGS = -Wall -Wno-invalid-offsetof -Wno-multichar -Wno-overloaded-virtual - WARN_FLAGS += -Wno-write-strings - WARN_FLAGS += -Wno-unused-variable - WARN_FLAGS += -Wno-unused-but-set-variable - WARN_FLAGS += -Wno-unused-function -endif - -ifeq ($(CLANG_BUILD),1) - # Clang specific flags -else ifeq ($(GCC_VER),-4.8) - WARN_FLAGS += -Wno-unused-local-typedefs - WARN_FLAGS += -Wno-unused-result - WARN_FLAGS += -Wno-narrowing - # WARN_FLAGS += -Wno-unused-function -endif - -WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers -WARN_FLAGS += -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type -WARN_FLAGS += -fdiagnostics-show-option -Wformat -Wformat-security - -ifeq ($(TARGET_PLATFORM),linux64) - # nocona = pentium4 + 64bit + MMX, SSE, SSE2, SSE3 - no SSSE3 (that's three s's - added in core2) - ARCH_FLAGS += -march=$(MARCH_TARGET) -mtune=core2 - LD_SO = ld-linux-x86_64.so.2 - LIBSTDCXX := $(shell $(CXX) -print-file-name=libstdc++.a) - LIBSTDCXXPIC := $(shell $(CXX) -print-file-name=libstdc++-pic.a) -else - # pentium4 = MMX, SSE, SSE2 - no SSE3 (added in prescott) # -msse3 -mfpmath=sse - ARCH_FLAGS += -m32 -march=$(MARCH_TARGET) -mtune=core2 $(SSE_GEN_FLAGS) - LD_SO = ld-linux.so.2 - LIBSTDCXX := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.so) - LIBSTDCXXPIC := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.so) - LDFLAGS += -m32 -endif - -GEN_SYM ?= $(SRCROOT)/devtools/gendbg.sh -ifeq ($(CFG),release) - STRIP ?= strip $(STRIP_FLAGS) -S -# CFLAGS += -ffunction-sections -fdata-sections -# LDFLAGS += -Wl,--gc-sections -Wl,--print-gc-sections -else - STRIP ?= true -endif -VSIGN ?= true - -ifeq ($(SOURCE_SDK), 1) - Srv_GAMEOUTPUTFILE := $(GAMEOUTPUTFILE:.so=_srv.so) - COPY_DLL_TO_SRV := 1 -endif - -LINK_MAP_FLAGS = -Wl,-Map,$(@:.so=).map - -SHLIBLDFLAGS = -shared $(LDFLAGS) -Wl,--no-undefined - -_WRAP := -Xlinker --wrap= -PATHWRAP = $(_WRAP)fopen $(_WRAP)freopen $(_WRAP)open $(_WRAP)creat $(_WRAP)access $(_WRAP)__xstat \ - $(_WRAP)stat $(_WRAP)lstat $(_WRAP)fopen64 $(_WRAP)open64 $(_WRAP)opendir $(_WRAP)__lxstat \ - $(_WRAP)chmod $(_WRAP)chown $(_WRAP)lchown $(_WRAP)symlink $(_WRAP)link $(_WRAP)__lxstat64 \ - $(_WRAP)mknod $(_WRAP)utimes $(_WRAP)unlink $(_WRAP)rename $(_WRAP)utime $(_WRAP)__xstat64 \ - $(_WRAP)mount $(_WRAP)mkfifo $(_WRAP)mkdir $(_WRAP)rmdir $(_WRAP)scandir $(_WRAP)realpath - -LIB_START_EXE = $(PATHWRAP) -static-libgcc -Wl,--start-group -LIB_END_EXE = -Wl,--end-group -lm -ldl $(LIBSTDCXX) -lpthread - -LIB_START_SHLIB = $(PATHWRAP) -static-libgcc -Wl,--start-group -LIB_END_SHLIB = -Wl,--end-group -lm -ldl $(LIBSTDCXXPIC) -lpthread -l:$(LD_SO) -Wl,--version-script=$(SRCROOT)/devtools/version_script.linux.txt - -# -# Profile-directed optimizations. -# Note: Last time these were tested 3/5/08, it actually slowed down the server benchmark by 5%! -# -# First, uncomment these, build, and test. It will generate .gcda and .gcno files where the .o files are. -# PROFILE_LINKER_FLAG=-fprofile-arcs -# PROFILE_COMPILER_FLAG=-fprofile-arcs -# -# Then, comment the above flags out again and rebuild with this flag uncommented: -# PROFILE_COMPILER_FLAG=-fprofile-use -# - -############################################################################# -# The compiler command lne for each src code file to compile -############################################################################# - -OBJ_DIR = ./obj_$(NAME)_$(TARGET_PLATFORM)$(TARGET_PLATFORM_EXT)/$(CFG) -CPP_TO_OBJ = $(CPPFILES:.cpp=.o) -CXX_TO_OBJ = $(CPP_TO_OBJ:.cxx=.o) -CC_TO_OBJ = $(CXX_TO_OBJ:.cc=.o) -MM_TO_OBJ = $(CC_TO_OBJ:.mm=.o) -C_TO_OBJ = $(MM_TO_OBJ:.c=.o) -OBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(C_TO_OBJ))) - -ifeq ($(MAKE_VERBOSE),1) - QUIET_PREFIX = - QUIET_ECHO_POSTFIX = -else - QUIET_PREFIX = @ - QUIET_ECHO_POSTFIX = > /dev/null -endif - -ifeq ($(MAKE_CC_VERBOSE),1) -CC += -v -endif - -ifeq ($(CONFTYPE),lib) - LIB_File = $(OUTPUTFILE) -endif - -ifeq ($(CONFTYPE),dll) - SO_File = $(OUTPUTFILE) -endif - -ifeq ($(CONFTYPE),exe) - EXE_File = $(OUTPUTFILE) -endif - -# we generate dependencies as a side-effect of compilation now -GEN_DEP_FILE= - -PRE_COMPILE_FILE = - -POST_COMPILE_FILE = - -ifeq ($(BUILDING_MULTI_ARCH),1) - SINGLE_ARCH_CXXFLAGS=$(subst -arch x86_64,,$(CXXFLAGS)) - COMPILE_FILE = \ - $(QUIET_PREFIX) \ - echo "---- $(lastword $(subst /, ,$<)) as MULTIARCH----";\ - mkdir -p $(OBJ_DIR) && \ - $(CXX) $(SINGLE_ARCH_CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< && \ - $(CXX) $(CXXFLAGS) -o $@ -c $< -else - COMPILE_FILE = \ - $(QUIET_PREFIX) \ - echo "---- $(lastword $(subst /, ,$<)) ----";\ - mkdir -p $(OBJ_DIR) && \ - $(CXX) $(CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< -endif - -ifneq "$(origin VALVE_NO_AUTO_P4)" "undefined" - P4_EDIT_START = chmod -R +w - P4_EDIT_END = || true - P4_REVERT_START = true - P4_REVERT_END = -else - ifndef P4_EDIT_CHANGELIST - # You can use an environment variable to specify what changelist to check the Linux Binaries out into. Normally the default - # setting is best, but here is an alternate example: - # export P4_EDIT_CHANGELIST_CMD="echo 1424335" - # ?= means that if P4_EDIT_CHANGELIST_CMD is already set it won't be changed. - P4_EDIT_CHANGELIST_CMD ?= $(P4BIN) changes -c `$(P4BIN) client -o | grep ^Client | cut -f 2` -s pending | fgrep 'POSIX Auto Checkout' | cut -d' ' -f 2 | tail -n 1 - P4_EDIT_CHANGELIST := $(shell $(P4_EDIT_CHANGELIST_CMD)) - endif - ifeq ($(P4_EDIT_CHANGELIST),) - # If we haven't found a changelist to check out to then create one. The name must match the one from a few - # lines above or else a new changelist will be created each time. - # Warning: the behavior of 'echo' is not consistent. In bash you need the "-e" option in order for \n to be - # interpreted as a line-feed, but in dash you do not, and if "-e" is passed along then it is printed, which - # confuses p4. So, if you run this command from the bash shell don't forget to add "-e" to the echo command. - P4_EDIT_CHANGELIST = $(shell echo -e "Change: new\nDescription: POSIX Auto Checkout" | $(P4BIN) change -i | cut -f 2 -d ' ') - endif - - P4_EDIT_START := for f in - P4_EDIT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | $(P4BIN) -x - edit -c $(P4_EDIT_CHANGELIST); else $(P4BIN) edit -c $(P4_EDIT_CHANGELIST) $$f; fi; fi; done $(QUIET_ECHO_POSTFIX) - P4_REVERT_START := for f in - P4_REVERT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | $(P4BIN) -x - revert; else $(P4BIN) revert $$f; fi; fi; done $(QUIET_ECHO_POSTFIX) -endif - -ifeq ($(CONFTYPE),dll) -all: $(OTHER_DEPENDENCIES) $(OBJS) $(GAMEOUTPUTFILE) - @echo $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX) -else -all: $(OTHER_DEPENDENCIES) $(OBJS) $(OUTPUTFILE) - @echo $(OUTPUTFILE) $(QUIET_ECHO_POSTFIX) -endif - -.PHONY: clean cleantargets cleanandremove rebuild relink RemoveOutputFile SingleFile - - -rebuild : - $(MAKE) -f $(firstword $(MAKEFILE_LIST)) cleanandremove - $(MAKE) -f $(firstword $(MAKEFILE_LIST)) - - -# Use the relink target to force to relink the project. -relink: RemoveOutputFile all - -RemoveOutputFile: - rm -f $(OUTPUTFILE) - - -# This rule is so you can say "make SingleFile SingleFilename=/home/myname/valve_main/src/engine/language.cpp" and have it only build that file. -# It basically just translates the full filename to create a dependency on the appropriate .o file so it'll build that. -SingleFile : RemoveSingleFile $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o - @echo "" - -RemoveSingleFile: - $(QUIET_PREFIX) rm -f $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o - -clean: -ifneq "$(OBJ_DIR)" "" - $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)" - $(QUIET_PREFIX) rm -rf $(OBJ_DIR) -endif -ifneq "$(OUTPUTFILE)" "" - $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \ - echo "$(P4BIN) revert $(OUTPUTFILE)"; \ - $(P4_REVERT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END); \ - fi; -endif -ifneq "$(OTHER_DEPENDENCIES)" "" - $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)" - $(QUIET_PREFIX) rm -f $(OTHER_DEPENDENCIES) -endif -ifneq "$(GAMEOUTPUTFILE)" "" - $(QUIET_PREFIX) echo "$(P4BIN) revert $(GAMEOUTPUTFILE)" - $(QUIET_PREFIX) $(P4_REVERT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END) -endif - - -# Do the above cleaning, except with p4 edit and rm. Reason being ar crs adds and replaces obj files to the -# archive. However if you've renamed or deleted a source file, $(AR) won't remove it. This can leave -# us with archive files that have extra unused symbols, and also potentially cause compilation errors -# when you rename a file and have many duplicate symbols. -cleanandremove: -ifneq "$(OBJ_DIR)" "" - $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)" - $(QUIET_PREFIX) -rm -rf $(OBJ_DIR) -endif -ifneq "$(OUTPUTFILE)" "" - $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \ - echo "$(P4BIN) edit and rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT)"; \ - $(P4_EDIT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); \ - fi; - $(QUIET_PREFIX) -rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT); -endif -ifneq "$(OTHER_DEPENDENCIES)" "" - $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)" - $(QUIET_PREFIX) -rm -f $(OTHER_DEPENDENCIES) -endif -ifneq "$(GAMEOUTPUTFILE)" "" - $(QUIET_PREFIX) echo "$(P4BIN) edit and rm -f $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT)" - $(QUIET_PREFIX) $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END) - $(QUIET_PREFIX) -rm -f $(GAMEOUTPUTFILE) -endif - - -# This just deletes the final targets so it'll do a relink next time we build. -cleantargets: - $(QUIET_PREFIX) rm -f $(OUTPUTFILE) $(GAMEOUTPUTFILE) - - -$(LIB_File): $(OTHER_DEPENDENCIES) $(OBJS) - $(QUIET_PREFIX) -$(P4_EDIT_START) $(LIB_File) $(P4_EDIT_END); - $(QUIET_PREFIX) $(AR) $(LIB_File) $(OBJS) $(LIBFILES); - -SO_GameOutputFile = $(GAMEOUTPUTFILE) - -# Remove the target before installing a file over it; this prevents existing -# instances of the game from crashing due to the overwrite. -$(SO_GameOutputFile): $(SO_File) - $(QUIET_PREFIX) \ - $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END) && \ - echo "----" $(QUIET_ECHO_POSTFIX);\ - echo "---- COPYING TO $@ [$(CFG)] ----";\ - echo "----" $(QUIET_ECHO_POSTFIX); - $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END); - $(QUIET_PREFIX) -mkdir -p `dirname $(GAMEOUTPUTFILE)` > /dev/null; - $(QUIET_PREFIX) rm -f $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX); - $(QUIET_PREFIX) cp -v $(OUTPUTFILE) $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX); - $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); - $(QUIET_PREFIX) $(GEN_SYM) $(GAMEOUTPUTFILE); - $(QUIET_PREFIX) -$(STRIP) $(GAMEOUTPUTFILE); - $(QUIET_PREFIX) $(VSIGN) -signvalve $(GAMEOUTPUTFILE); - $(QUIET_PREFIX) if [ "$(COPY_DLL_TO_SRV)" = "1" ]; then\ - echo "----" $(QUIET_ECHO_POSTFIX);\ - echo "---- COPYING TO $(Srv_GAMEOUTPUTFILE) ----";\ - echo "----" $(QUIET_ECHO_POSTFIX);\ - cp -v $(GAMEOUTPUTFILE) $(Srv_GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX);\ - cp -v $(GAMEOUTPUTFILE)$(SYM_EXT) $(Srv_GAMEOUTPUTFILE)$(SYM_EXT) $(QUIET_ECHO_POSTFIX);\ - fi; - $(QUIET_PREFIX) if [ "$(IMPORTLIBRARY)" != "" ]; then\ - echo "----" $(QUIET_ECHO_POSTFIX);\ - echo "---- COPYING TO IMPORT LIBRARY $(IMPORTLIBRARY) ----";\ - echo "----" $(QUIET_ECHO_POSTFIX);\ - $(P4_EDIT_START) $(IMPORTLIBRARY) $(P4_EDIT_END) && \ - mkdir -p `dirname $(IMPORTLIBRARY)` > /dev/null && \ - cp -v $(OUTPUTFILE) $(IMPORTLIBRARY); \ - fi; - - -$(SO_File): $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES) - $(QUIET_PREFIX) \ - echo "----" $(QUIET_ECHO_POSTFIX);\ - echo "---- LINKING $@ [$(CFG)] ----";\ - echo "----" $(QUIET_ECHO_POSTFIX);\ - \ - $(LINK) $(LINK_MAP_FLAGS) $(SHLIBLDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_SHLIB) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_SHLIB); - $(VSIGN) -signvalve $(OUTPUTFILE); - - -$(EXE_File) : $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES) - $(QUIET_PREFIX) \ - echo "----" $(QUIET_ECHO_POSTFIX);\ - echo "---- LINKING EXE $@ [$(CFG)] ----";\ - echo "----" $(QUIET_ECHO_POSTFIX);\ - \ - $(P4_EDIT_START) $(OUTPUTFILE) $(P4_EDIT_END);\ - $(LINK) $(LINK_MAP_FLAGS) $(LDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_EXE) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_EXE); - $(QUIET_PREFIX) -$(P4_EDIT_START) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); - $(QUIET_PREFIX) $(GEN_SYM) $(OUTPUTFILE); - $(QUIET_PREFIX) -$(STRIP) $(OUTPUTFILE); - $(QUIET_PREFIX) $(VSIGN) -signvalve $(OUTPUTFILE); - - -tags: - etags -a -C -o $(SRCROOT)/TAGS *.cpp *.cxx *.h *.hxx +SRCROOT?=.. + +THISFILE:=$(SRCROOT)/devtools/makefile_base_posix.mak +MAKEFILE_BASE:=$(notdir $(THISFILE)) +MAKEFILE_LINK:=$(THISFILE).link + +-include $(MAKEFILE_LINK) + +$(MAKEFILE_LINK): $(shell which $(CXX)) $(THISFILE) $(SRCROOT)/devtools/gcc9+support.cpp + @ if [ "$(shell printf "$(shell $(CXX) -dumpversion)\n8" | sort -Vr | head -1)" = 8 ]; then \ + ln -sf $(MAKEFILE_BASE).default $@ ;\ + else \ + $(COMPILE.cpp) -o $(SRCROOT)/devtools/gcc9+support.o $(SRCROOT)/devtools/gcc9+support.cpp &&\ + ln -sf $(MAKEFILE_BASE).gcc8 $@ ;\ + fi diff --git a/mp/src/devtools/makefile_base_posix.mak.default b/mp/src/devtools/makefile_base_posix.mak.default new file mode 100644 index 00000000000..ffdda176622 --- /dev/null +++ b/mp/src/devtools/makefile_base_posix.mak.default @@ -0,0 +1,472 @@ +# +# Base makefile for Linux. +# +# !!!!! Note to future editors !!!!! +# +# before you make changes, make sure you grok: +# 1. the difference between =, :=, +=, and ?= +# 2. how and when this base makefile gets included in the generated makefile(s) +# ( see http://www.gnu.org/software/make/manual/make.html#Flavors ) +# +# Command line prefixes: +# - errors are ignored +# @ command is not printed to stdout before being executed +# + command is executed even if Make is invoked in "do not exec" mode + +OS := $(shell uname) +HOSTNAME := $(shell hostname) + +-include $(SRCROOT)/devtools/steam_def.mak +-include $(SRCROOT)/devtools/sourcesdk_def.mak + +# To build with clang, set the following in your environment: +# CC = clang +# CXX = clang++ +ifneq (,$(findstring clang,$(CXX))) + CLANG_BUILD = 1 +endif + +ifeq ($(OS),Darwin) + $(error This file should never be used for Mac - use base.xconfig) +endif + +ifeq ($(CFG), release) + # With gcc 4.6.3, engine.so went from 7,383,765 to 8,429,109 when building with -O3. + # There also was no speed difference running at 1280x1024. May 2012, mikesart. + # tonyp: The size increase was likely caused by -finline-functions and -fipa-cp-clone getting switched on with -O3. + # -fno-omit-frame-pointer: need this for stack traces with perf. + OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize + ifeq ($(CLANG_BUILD),1) + # These aren't supported wit Clang 3.5. Need to remove when we update that. + OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops + else + OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops + endif +else + OptimizerLevel_CompilerSpecific = -O0 + #-O1 -finline-functions +endif + +# CPPFLAGS == "c/c++ *preprocessor* flags" - not "cee-plus-plus flags" +ARCH_FLAGS = +BUILDING_MULTI_ARCH = 0 +# Preserve cflags set in environment +ENV_CFLAGS := $(CFLAGS) +ENV_CXXFLAGS := $(CXXFLAGS) +CPPFLAGS = $(DEFINES) $(addprefix -I, $(abspath $(INCLUDEDIRS) )) +BASE_CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility) $(OptimizerLevel) -pipe $(GCC_ExtraCompilerFlags) -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE +CFLAGS = $(BASE_CFLAGS) $(ENV_CFLAGS) +# In -std=gnu++0x mode we get lots of errors about "error: narrowing conversion". -fpermissive +# turns these into warnings in gcc, and -Wno-c++11-narrowing suppresses them entirely in clang 3.1+. +ifeq ($(CLANG_BUILD),1) + CXXFLAGS = $(BASE_CFLAGS) -std=gnu++0x -Wno-c++11-narrowing -Wno-dangling-else $(ENV_CXXFLAGS) +else + CXXFLAGS = $(BASE_CFLAGS) -std=gnu++0x -fpermissive $(ENV_CXXFLAGS) +endif +DEFINES += -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE + +## TODO: This cases build errors in cstrike/bin right now. Need to debug. +# This causes all filesystem interfaces to default to their 64bit versions on +# 32bit systems, which means we don't break on filesystems with inodes > 32bit. +# DEFINES += -D_FILE_OFFSET_BITS=64 + +LDFLAGS = $(CFLAGS) $(GCC_ExtraLinkerFlags) $(OptimizerLevel) +GENDEP_CXXFLAGS = -MMD -MP -MF $(@:.o=.P) +MAP_FLAGS = +Srv_GAMEOUTPUTFILE = +COPY_DLL_TO_SRV = 0 + +# We should always specify -Wl,--build-id, as documented at: +# http://linux.die.net/man/1/ld and http://fedoraproject.org/wiki/Releases/FeatureBuildId.http://fedoraproject.org/wiki/Releases/FeatureBuildId +LDFLAGS += -Wl,--build-id + +# +# If we should be running in a chroot, check to see if we are. If not, then prefix everything with the +# required chroot +# +ifdef MAKE_CHROOT + export STEAM_RUNTIME_PATH := /usr + ifneq ("$(SCHROOT_CHROOT_NAME)", "$(CHROOT_NAME)") + $(info '$(SCHROOT_CHROOT_NAME)' is not '$(CHROOT_NAME)') + $(error This makefile should be run from within a chroot. 'schroot --chroot $(CHROOT_NAME) -- $(MAKE) $(MAKEFLAGS)') + endif + GCC_VER = -4.8 + P4BIN = $(SRCROOT)/devtools/bin/linux/p4 + CRYPTOPPDIR=ubuntu12_32_gcc48 +else ifeq ($(USE_VALVE_BINDIR),1) + # Using /valve/bin directory. + export STEAM_RUNTIME_PATH ?= /valve + GCC_VER = -4.6 + P4BIN = p4 + CRYPTOPPDIR=linux32 +else + # Not using chroot, use old steam-runtime. (gcc 4.6.3) + export STEAM_RUNTIME_PATH ?= /valve/steam-runtime + GCC_VER = + P4BIN = p4 + CRYPTOPPDIR=ubuntu12_32 +endif + +ifeq ($(TARGET_PLATFORM),linux64) + MARCH_TARGET = core2 +else + MARCH_TARGET = pentium4 +endif + +ifeq ($(USE_VALVE_BINDIR),1) + # On dedicated servers, some plugins depend on global variable symbols in addition to functions. + # So symbols like _Z16ClearMultiDamagev should show up when you do "nm server_srv.so" in TF2. + STRIP_FLAGS = +else + # Linux desktop client (or client/dedicated server in chroot). + STRIP_FLAGS = -x +endif + +ifeq ($(CLANG_BUILD),1) + # Clang does not support -mfpmath=sse because it uses whatever + # instruction set extensions are available by default. + SSE_GEN_FLAGS = -msse2 +else + SSE_GEN_FLAGS = -msse2 -mfpmath=sse +endif + +CCACHE := $(SRCROOT)/devtools/bin/linux/ccache + +ifeq ($(origin AR), default) + AR = $(STEAM_RUNTIME_PATH)/bin/ar crs +endif +ifeq ($(origin CC), default) + CC = $(CCACHE) $(STEAM_RUNTIME_PATH)/bin/gcc$(GCC_VER) +endif +ifeq ($(origin CXX), default) + CXX = $(CCACHE) $(STEAM_RUNTIME_PATH)/bin/g++$(GCC_VER) +endif + +# Support ccache with clang. Add -Qunused-arguments to avoid excessive warnings due to +# a ccache quirk. Could also upgrade ccache. +# http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html +ifeq ($(CLANG_BUILD),1) + CC := $(CCACHE) $(CC) -Qunused-arguments -fcolor-diagnostics + CXX := $(CCACHE) $(CXX) -Qunused-arguments -fcolor-diagnostics +endif +LINK ?= $(CC) + +ifeq ($(STEAM_BRANCH),1) + WARN_FLAGS = -Wall -Wextra -Wshadow -Wno-invalid-offsetof +else + WARN_FLAGS = -Wall -Wno-invalid-offsetof -Wno-multichar -Wno-overloaded-virtual + WARN_FLAGS += -Wno-write-strings + WARN_FLAGS += -Wno-unused-variable + WARN_FLAGS += -Wno-unused-but-set-variable + WARN_FLAGS += -Wno-unused-function +endif + +ifeq ($(CLANG_BUILD),1) + # Clang specific flags +else ifeq ($(GCC_VER),-4.8) + WARN_FLAGS += -Wno-unused-local-typedefs + WARN_FLAGS += -Wno-unused-result + WARN_FLAGS += -Wno-narrowing + # WARN_FLAGS += -Wno-unused-function +endif + +WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers +WARN_FLAGS += -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type +WARN_FLAGS += -fdiagnostics-show-option -Wformat -Wformat-security + +ifeq ($(TARGET_PLATFORM),linux64) + # nocona = pentium4 + 64bit + MMX, SSE, SSE2, SSE3 - no SSSE3 (that's three s's - added in core2) + ARCH_FLAGS += -march=$(MARCH_TARGET) -mtune=core2 + LD_SO = ld-linux-x86_64.so.2 + LIBSTDCXX := $(shell $(CXX) -print-file-name=libstdc++.a) + LIBSTDCXXPIC := $(shell $(CXX) -print-file-name=libstdc++-pic.a) +else + # pentium4 = MMX, SSE, SSE2 - no SSE3 (added in prescott) # -msse3 -mfpmath=sse + ARCH_FLAGS += -m32 -march=$(MARCH_TARGET) -mtune=core2 $(SSE_GEN_FLAGS) + LD_SO = ld-linux.so.2 + LIBSTDCXX := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.so) + LIBSTDCXXPIC := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.so) + LDFLAGS += -m32 +endif + +GEN_SYM ?= $(SRCROOT)/devtools/gendbg.sh +ifeq ($(CFG),release) + STRIP ?= strip $(STRIP_FLAGS) -S +# CFLAGS += -ffunction-sections -fdata-sections +# LDFLAGS += -Wl,--gc-sections -Wl,--print-gc-sections +else + STRIP ?= true +endif +VSIGN ?= true + +ifeq ($(SOURCE_SDK), 1) + Srv_GAMEOUTPUTFILE := $(GAMEOUTPUTFILE:.so=_srv.so) + COPY_DLL_TO_SRV := 1 +endif + +LINK_MAP_FLAGS = -Wl,-Map,$(@:.so=).map + +SHLIBLDFLAGS = -shared $(LDFLAGS) -Wl,--no-undefined + +_WRAP := -Xlinker --wrap= +PATHWRAP = $(_WRAP)fopen $(_WRAP)freopen $(_WRAP)open $(_WRAP)creat $(_WRAP)access $(_WRAP)__xstat \ + $(_WRAP)stat $(_WRAP)lstat $(_WRAP)fopen64 $(_WRAP)open64 $(_WRAP)opendir $(_WRAP)__lxstat \ + $(_WRAP)chmod $(_WRAP)chown $(_WRAP)lchown $(_WRAP)symlink $(_WRAP)link $(_WRAP)__lxstat64 \ + $(_WRAP)mknod $(_WRAP)utimes $(_WRAP)unlink $(_WRAP)rename $(_WRAP)utime $(_WRAP)__xstat64 \ + $(_WRAP)mount $(_WRAP)mkfifo $(_WRAP)mkdir $(_WRAP)rmdir $(_WRAP)scandir $(_WRAP)realpath + +LIB_START_EXE = $(PATHWRAP) -static-libgcc -Wl,--start-group +LIB_END_EXE = -Wl,--end-group -lm -ldl $(LIBSTDCXX) -lpthread + +LIB_START_SHLIB = $(PATHWRAP) -static-libgcc -Wl,--start-group +LIB_END_SHLIB = -Wl,--end-group -lm -ldl $(LIBSTDCXXPIC) -lpthread -l:$(LD_SO) -Wl,--version-script=$(SRCROOT)/devtools/version_script.linux.txt + +# +# Profile-directed optimizations. +# Note: Last time these were tested 3/5/08, it actually slowed down the server benchmark by 5%! +# +# First, uncomment these, build, and test. It will generate .gcda and .gcno files where the .o files are. +# PROFILE_LINKER_FLAG=-fprofile-arcs +# PROFILE_COMPILER_FLAG=-fprofile-arcs +# +# Then, comment the above flags out again and rebuild with this flag uncommented: +# PROFILE_COMPILER_FLAG=-fprofile-use +# + +############################################################################# +# The compiler command lne for each src code file to compile +############################################################################# + +OBJ_DIR = ./obj_$(NAME)_$(TARGET_PLATFORM)$(TARGET_PLATFORM_EXT)/$(CFG) +CPP_TO_OBJ = $(CPPFILES:.cpp=.o) +CXX_TO_OBJ = $(CPP_TO_OBJ:.cxx=.o) +CC_TO_OBJ = $(CXX_TO_OBJ:.cc=.o) +MM_TO_OBJ = $(CC_TO_OBJ:.mm=.o) +C_TO_OBJ = $(MM_TO_OBJ:.c=.o) +OBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(C_TO_OBJ))) + +ifeq ($(MAKE_VERBOSE),1) + QUIET_PREFIX = + QUIET_ECHO_POSTFIX = +else + QUIET_PREFIX = @ + QUIET_ECHO_POSTFIX = > /dev/null +endif + +ifeq ($(MAKE_CC_VERBOSE),1) +CC += -v +endif + +ifeq ($(CONFTYPE),lib) + LIB_File = $(OUTPUTFILE) +endif + +ifeq ($(CONFTYPE),dll) + SO_File = $(OUTPUTFILE) +endif + +ifeq ($(CONFTYPE),exe) + EXE_File = $(OUTPUTFILE) +endif + +# we generate dependencies as a side-effect of compilation now +GEN_DEP_FILE= + +PRE_COMPILE_FILE = + +POST_COMPILE_FILE = + +ifeq ($(BUILDING_MULTI_ARCH),1) + SINGLE_ARCH_CXXFLAGS=$(subst -arch x86_64,,$(CXXFLAGS)) + COMPILE_FILE = \ + $(QUIET_PREFIX) \ + echo "---- $(lastword $(subst /, ,$<)) as MULTIARCH----";\ + mkdir -p $(OBJ_DIR) && \ + $(CXX) $(SINGLE_ARCH_CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< && \ + $(CXX) $(CXXFLAGS) -o $@ -c $< +else + COMPILE_FILE = \ + $(QUIET_PREFIX) \ + echo "---- $(lastword $(subst /, ,$<)) ----";\ + mkdir -p $(OBJ_DIR) && \ + $(CXX) $(CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< +endif + +ifneq "$(origin VALVE_NO_AUTO_P4)" "undefined" + P4_EDIT_START = chmod -R +w + P4_EDIT_END = || true + P4_REVERT_START = true + P4_REVERT_END = +else + ifndef P4_EDIT_CHANGELIST + # You can use an environment variable to specify what changelist to check the Linux Binaries out into. Normally the default + # setting is best, but here is an alternate example: + # export P4_EDIT_CHANGELIST_CMD="echo 1424335" + # ?= means that if P4_EDIT_CHANGELIST_CMD is already set it won't be changed. + P4_EDIT_CHANGELIST_CMD ?= $(P4BIN) changes -c `$(P4BIN) client -o | grep ^Client | cut -f 2` -s pending | fgrep 'POSIX Auto Checkout' | cut -d' ' -f 2 | tail -n 1 + P4_EDIT_CHANGELIST := $(shell $(P4_EDIT_CHANGELIST_CMD)) + endif + ifeq ($(P4_EDIT_CHANGELIST),) + # If we haven't found a changelist to check out to then create one. The name must match the one from a few + # lines above or else a new changelist will be created each time. + # Warning: the behavior of 'echo' is not consistent. In bash you need the "-e" option in order for \n to be + # interpreted as a line-feed, but in dash you do not, and if "-e" is passed along then it is printed, which + # confuses p4. So, if you run this command from the bash shell don't forget to add "-e" to the echo command. + P4_EDIT_CHANGELIST = $(shell echo -e "Change: new\nDescription: POSIX Auto Checkout" | $(P4BIN) change -i | cut -f 2 -d ' ') + endif + + P4_EDIT_START := for f in + P4_EDIT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | $(P4BIN) -x - edit -c $(P4_EDIT_CHANGELIST); else $(P4BIN) edit -c $(P4_EDIT_CHANGELIST) $$f; fi; fi; done $(QUIET_ECHO_POSTFIX) + P4_REVERT_START := for f in + P4_REVERT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | $(P4BIN) -x - revert; else $(P4BIN) revert $$f; fi; fi; done $(QUIET_ECHO_POSTFIX) +endif + +ifeq ($(CONFTYPE),dll) +all: $(OTHER_DEPENDENCIES) $(OBJS) $(GAMEOUTPUTFILE) + @echo $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX) +else +all: $(OTHER_DEPENDENCIES) $(OBJS) $(OUTPUTFILE) + @echo $(OUTPUTFILE) $(QUIET_ECHO_POSTFIX) +endif + +.PHONY: clean cleantargets cleanandremove rebuild relink RemoveOutputFile SingleFile + + +rebuild : + $(MAKE) -f $(firstword $(MAKEFILE_LIST)) cleanandremove + $(MAKE) -f $(firstword $(MAKEFILE_LIST)) + + +# Use the relink target to force to relink the project. +relink: RemoveOutputFile all + +RemoveOutputFile: + rm -f $(OUTPUTFILE) + + +# This rule is so you can say "make SingleFile SingleFilename=/home/myname/valve_main/src/engine/language.cpp" and have it only build that file. +# It basically just translates the full filename to create a dependency on the appropriate .o file so it'll build that. +SingleFile : RemoveSingleFile $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o + @echo "" + +RemoveSingleFile: + $(QUIET_PREFIX) rm -f $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o + +clean: +ifneq "$(OBJ_DIR)" "" + $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)" + $(QUIET_PREFIX) rm -rf $(OBJ_DIR) +endif +ifneq "$(OUTPUTFILE)" "" + $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \ + echo "$(P4BIN) revert $(OUTPUTFILE)"; \ + $(P4_REVERT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END); \ + fi; +endif +ifneq "$(OTHER_DEPENDENCIES)" "" + $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)" + $(QUIET_PREFIX) rm -f $(OTHER_DEPENDENCIES) +endif +ifneq "$(GAMEOUTPUTFILE)" "" + $(QUIET_PREFIX) echo "$(P4BIN) revert $(GAMEOUTPUTFILE)" + $(QUIET_PREFIX) $(P4_REVERT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END) +endif + + +# Do the above cleaning, except with p4 edit and rm. Reason being ar crs adds and replaces obj files to the +# archive. However if you've renamed or deleted a source file, $(AR) won't remove it. This can leave +# us with archive files that have extra unused symbols, and also potentially cause compilation errors +# when you rename a file and have many duplicate symbols. +cleanandremove: +ifneq "$(OBJ_DIR)" "" + $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)" + $(QUIET_PREFIX) -rm -rf $(OBJ_DIR) +endif +ifneq "$(OUTPUTFILE)" "" + $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \ + echo "$(P4BIN) edit and rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT)"; \ + $(P4_EDIT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); \ + fi; + $(QUIET_PREFIX) -rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT); +endif +ifneq "$(OTHER_DEPENDENCIES)" "" + $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)" + $(QUIET_PREFIX) -rm -f $(OTHER_DEPENDENCIES) +endif +ifneq "$(GAMEOUTPUTFILE)" "" + $(QUIET_PREFIX) echo "$(P4BIN) edit and rm -f $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT)" + $(QUIET_PREFIX) $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END) + $(QUIET_PREFIX) -rm -f $(GAMEOUTPUTFILE) +endif + + +# This just deletes the final targets so it'll do a relink next time we build. +cleantargets: + $(QUIET_PREFIX) rm -f $(OUTPUTFILE) $(GAMEOUTPUTFILE) + + +$(LIB_File): $(OTHER_DEPENDENCIES) $(OBJS) + $(QUIET_PREFIX) -$(P4_EDIT_START) $(LIB_File) $(P4_EDIT_END); + $(QUIET_PREFIX) $(AR) $(LIB_File) $(OBJS) $(LIBFILES); + +SO_GameOutputFile = $(GAMEOUTPUTFILE) + +# Remove the target before installing a file over it; this prevents existing +# instances of the game from crashing due to the overwrite. +$(SO_GameOutputFile): $(SO_File) + $(QUIET_PREFIX) \ + $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END) && \ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- COPYING TO $@ [$(CFG)] ----";\ + echo "----" $(QUIET_ECHO_POSTFIX); + $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END); + $(QUIET_PREFIX) -mkdir -p `dirname $(GAMEOUTPUTFILE)` > /dev/null; + $(QUIET_PREFIX) rm -f $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX); + $(QUIET_PREFIX) cp -v $(OUTPUTFILE) $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX); + $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); + $(QUIET_PREFIX) $(GEN_SYM) $(GAMEOUTPUTFILE); + $(QUIET_PREFIX) -$(STRIP) $(GAMEOUTPUTFILE); + $(QUIET_PREFIX) $(VSIGN) -signvalve $(GAMEOUTPUTFILE); + $(QUIET_PREFIX) if [ "$(COPY_DLL_TO_SRV)" = "1" ]; then\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- COPYING TO $(Srv_GAMEOUTPUTFILE) ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + cp -v $(GAMEOUTPUTFILE) $(Srv_GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX);\ + cp -v $(GAMEOUTPUTFILE)$(SYM_EXT) $(Srv_GAMEOUTPUTFILE)$(SYM_EXT) $(QUIET_ECHO_POSTFIX);\ + fi; + $(QUIET_PREFIX) if [ "$(IMPORTLIBRARY)" != "" ]; then\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- COPYING TO IMPORT LIBRARY $(IMPORTLIBRARY) ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + $(P4_EDIT_START) $(IMPORTLIBRARY) $(P4_EDIT_END) && \ + mkdir -p `dirname $(IMPORTLIBRARY)` > /dev/null && \ + cp -v $(OUTPUTFILE) $(IMPORTLIBRARY); \ + fi; + + +$(SO_File): $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES) + $(QUIET_PREFIX) \ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- LINKING $@ [$(CFG)] ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + \ + $(LINK) $(LINK_MAP_FLAGS) $(SHLIBLDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_SHLIB) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_SHLIB); + $(VSIGN) -signvalve $(OUTPUTFILE); + + +$(EXE_File) : $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES) + $(QUIET_PREFIX) \ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- LINKING EXE $@ [$(CFG)] ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + \ + $(P4_EDIT_START) $(OUTPUTFILE) $(P4_EDIT_END);\ + $(LINK) $(LINK_MAP_FLAGS) $(LDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_EXE) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_EXE); + $(QUIET_PREFIX) -$(P4_EDIT_START) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); + $(QUIET_PREFIX) $(GEN_SYM) $(OUTPUTFILE); + $(QUIET_PREFIX) -$(STRIP) $(OUTPUTFILE); + $(QUIET_PREFIX) $(VSIGN) -signvalve $(OUTPUTFILE); + + +tags: + etags -a -C -o $(SRCROOT)/TAGS *.cpp *.cxx *.h *.hxx diff --git a/mp/src/devtools/makefile_base_posix.mak.gcc8 b/mp/src/devtools/makefile_base_posix.mak.gcc8 new file mode 100644 index 00000000000..b414d1df5ff --- /dev/null +++ b/mp/src/devtools/makefile_base_posix.mak.gcc8 @@ -0,0 +1,469 @@ +# +# Base makefile for Linux. +# +# !!!!! Note to future editors !!!!! +# +# before you make changes, make sure you grok: +# 1. the difference between =, :=, +=, and ?= +# 2. how and when this base makefile gets included in the generated makefile(s) +# ( see http://www.gnu.org/software/make/manual/make.html#Flavors ) +# +# Command line prefixes: +# - errors are ignored +# @ command is not printed to stdout before being executed +# + command is executed even if Make is invoked in "do not exec" mode + +OS := $(shell uname) +HOSTNAME := $(shell hostname) + +-include $(SRCROOT)/devtools/steam_def.mak +-include $(SRCROOT)/devtools/sourcesdk_def.mak + +# To build with clang, set the following in your environment: +# CC = clang +# CXX = clang++ +ifneq (,$(findstring clang,$(CXX))) + CLANG_BUILD = 1 +endif + +ifeq ($(OS),Darwin) + $(error This file should never be used for Mac - use base.xconfig) +endif + +ifeq ($(CFG), release) + # With gcc 4.6.3, engine.so went from 7,383,765 to 8,429,109 when building with -O3. + # There also was no speed difference running at 1280x1024. May 2012, mikesart. + # tonyp: The size increase was likely caused by -finline-functions and -fipa-cp-clone getting switched on with -O3. + # -fno-omit-frame-pointer: need this for stack traces with perf. + OptimizerLevel_CompilerSpecific = -O2 -fno-strict-aliasing -ffast-math -fno-omit-frame-pointer -ftree-vectorize + ifeq ($(CLANG_BUILD),1) + # These aren't supported wit Clang 3.5. Need to remove when we update that. + OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops + else + OptimizerLevel_CompilerSpecific += -fpredictive-commoning -funswitch-loops + endif +else + OptimizerLevel_CompilerSpecific = -Og + #-O1 -finline-functions +endif + +# CPPFLAGS == "c/c++ *preprocessor* flags" - not "cee-plus-plus flags" +ARCH_FLAGS = -fabi-compat-version=2 -fabi-version=2 -fpic -fno-plt -fcf-protection=none -fno-stack-protector -fno-stack-clash-protection +BUILDING_MULTI_ARCH = 0 +# Preserve cflags set in environment +ENV_CFLAGS := $(CFLAGS) +ENV_CXXFLAGS := $(CXXFLAGS) +CPPFLAGS = $(DEFINES) $(addprefix -I, $(abspath $(INCLUDEDIRS) )) +BASE_CFLAGS = $(ARCH_FLAGS) $(CPPFLAGS) $(WARN_FLAGS) -fvisibility=$(SymbolVisibility) $(OptimizerLevel) -pipe $(GCC_ExtraCompilerFlags) -Usprintf -Ustrncpy -UPROTECTED_THINGS_ENABLE +CFLAGS = $(BASE_CFLAGS) $(ENV_CFLAGS) +# In -std=gnu++0x mode we get lots of errors about "error: narrowing conversion". -fpermissive +# supress them using -Wno-c++11-narrowing in clang 3.1+ and -Wno-narrowing in gcc 8+. +ifeq ($(CLANG_BUILD),1) + CXXFLAGS = $(BASE_CFLAGS) -std=gnu++0x -Wno-c++11-narrowing -Wno-dangling-else $(ENV_CXXFLAGS) +else + # suppress some more conformance warnings + CXXFLAGS = $(BASE_CFLAGS) -std=gnu++0x -Wno-narrowing -Wno-unused-local-typedefs -Wno-class-memaccess -Wno-format-zero-length $(ENV_CXXFLAGS) +endif +DEFINES += -DVPROF_LEVEL=1 -DGNUC -DNO_HOOK_MALLOC -DNO_MALLOC_OVERRIDE + +## TODO: This cases build errors in cstrike/bin right now. Need to debug. +# This causes all filesystem interfaces to default to their 64bit versions on +# 32bit systems, which means we don't break on filesystems with inodes > 32bit. +# DEFINES += -D_FILE_OFFSET_BITS=64 + +LDFLAGS = $(CFLAGS) $(GCC_ExtraLinkerFlags) $(OptimizerLevel) +GENDEP_CXXFLAGS = -MMD -MP -MF $(@:.o=.P) +MAP_FLAGS = +Srv_GAMEOUTPUTFILE = +COPY_DLL_TO_SRV = 0 + +# We should always specify -Wl,--build-id, as documented at: +# http://linux.die.net/man/1/ld and http://fedoraproject.org/wiki/Releases/FeatureBuildId.http://fedoraproject.org/wiki/Releases/FeatureBuildId +LDFLAGS += -Wl,--build-id + +# +# If we should be running in a chroot, check to see if we are. If not, then prefix everything with the +# required chroot +# +ifdef MAKE_CHROOT + export STEAM_RUNTIME_PATH := /usr + ifneq ("$(SCHROOT_CHROOT_NAME)", "$(CHROOT_NAME)") + $(info '$(SCHROOT_CHROOT_NAME)' is not '$(CHROOT_NAME)') + $(error This makefile should be run from within a chroot. 'schroot --chroot $(CHROOT_NAME) -- $(MAKE) $(MAKEFLAGS)') + endif + GCC_VER = -4.8 + P4BIN = $(SRCROOT)/devtools/bin/linux/p4 + CRYPTOPPDIR=ubuntu12_32_gcc48 +else ifeq ($(USE_VALVE_BINDIR),1) + # Using /valve/bin directory. + export STEAM_RUNTIME_PATH ?= /valve + GCC_VER = -4.6 + P4BIN = p4 + CRYPTOPPDIR=linux32 +else + # Not using chroot, use old steam-runtime. (gcc 4.6.3) + export STEAM_RUNTIME_PATH ?= /valve/steam-runtime + GCC_VER = + P4BIN = p4 + CRYPTOPPDIR=ubuntu12_32 +endif + +MARCH_TARGET = nocona + +ifeq ($(USE_VALVE_BINDIR),1) + # On dedicated servers, some plugins depend on global variable symbols in addition to functions. + # So symbols like _Z16ClearMultiDamagev should show up when you do "nm server_srv.so" in TF2. + STRIP_FLAGS = +else + # Linux desktop client (or client/dedicated server in chroot). + STRIP_FLAGS = -x +endif + +ifeq ($(CLANG_BUILD),1) + # Clang does not support -mfpmath=sse because it uses whatever + # instruction set extensions are available by default. + SSE_GEN_FLAGS = -msse2 +else + SSE_GEN_FLAGS = -msse2 -mfpmath=sse +endif + +CCACHE := $(SRCROOT)/devtools/bin/linux/ccache + +ifeq ($(origin AR), default) + AR = $(STEAM_RUNTIME_PATH)/bin/ar crs +endif +ifeq ($(origin CC), default) + CC = $(CCACHE) $(STEAM_RUNTIME_PATH)/bin/gcc$(GCC_VER) +endif +ifeq ($(origin CXX), default) + CXX = $(CCACHE) $(STEAM_RUNTIME_PATH)/bin/g++$(GCC_VER) +endif + +# Support ccache with clang. Add -Qunused-arguments to avoid excessive warnings due to +# a ccache quirk. Could also upgrade ccache. +# http://petereisentraut.blogspot.com/2011/05/ccache-and-clang.html +ifeq ($(CLANG_BUILD),1) + CC := $(CCACHE) $(CC) -Qunused-arguments -fcolor-diagnostics + CXX := $(CCACHE) $(CXX) -Qunused-arguments -fcolor-diagnostics +endif +LINK ?= $(CC) + +ifeq ($(STEAM_BRANCH),1) + WARN_FLAGS = -Wall -Wextra -Wshadow -Wno-invalid-offsetof +else + WARN_FLAGS = -Wall -Wno-invalid-offsetof -Wno-multichar -Wno-overloaded-virtual + WARN_FLAGS += -Wno-write-strings + WARN_FLAGS += -Wno-unused-variable + WARN_FLAGS += -Wno-unused-but-set-variable + WARN_FLAGS += -Wno-unused-function +endif + +ifeq ($(CLANG_BUILD),1) + # Clang specific flags +else ifeq ($(GCC_VER),-4.8) + WARN_FLAGS += -Wno-unused-local-typedefs + WARN_FLAGS += -Wno-unused-result + WARN_FLAGS += -Wno-narrowing + # WARN_FLAGS += -Wno-unused-function +endif + +WARN_FLAGS += -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-value -Wno-missing-field-initializers +WARN_FLAGS += -Wno-sign-compare -Wno-reorder -Wno-invalid-offsetof -Wno-float-equal -Werror=return-type +WARN_FLAGS += -fdiagnostics-show-option -Wformat -Wformat-security + +ifeq ($(TARGET_PLATFORM),linux64) + # nocona = pentium4 + 64bit + MMX, SSE, SSE2, SSE3 - no SSSE3 (that's three s's - added in core2) + ARCH_FLAGS += -march=$(MARCH_TARGET) -mtune=core2 + LD_SO = ld-linux-x86_64.so.2 + LIBSTDCXX := $(shell $(CXX) -print-file-name=libstdc++.a) + LIBSTDCXXPIC := $(shell $(CXX) -print-file-name=libstdc++-pic.a) +else + # pentium4 = MMX, SSE, SSE2 - no SSE3 (added in prescott) # -msse3 -mfpmath=sse + ARCH_FLAGS += -m32 -march=$(MARCH_TARGET) -mtune=core2 $(SSE_GEN_FLAGS) + LD_SO = ld-linux.so.2 + LIBSTDCXX := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.so) + LIBSTDCXXPIC := $(shell $(CXX) $(ARCH_FLAGS) -print-file-name=libstdc++.so) + LDFLAGS += -m32 +endif + +GEN_SYM ?= $(SRCROOT)/devtools/gendbg.sh +ifeq ($(CFG),release) + STRIP ?= strip $(STRIP_FLAGS) -S +# CFLAGS += -ffunction-sections -fdata-sections +# LDFLAGS += -Wl,--gc-sections -Wl,--print-gc-sections +else + STRIP ?= true +endif +VSIGN ?= true + +ifeq ($(SOURCE_SDK), 1) + Srv_GAMEOUTPUTFILE := $(GAMEOUTPUTFILE:.so=_srv.so) + COPY_DLL_TO_SRV := 1 +endif + +LINK_MAP_FLAGS = -Wl,-Map,$(@:.so=).map + +SHLIBLDFLAGS = -shared $(LDFLAGS) -Wl,--no-undefined + +_WRAP := -Xlinker --wrap= +PATHWRAP = $(_WRAP)fopen $(_WRAP)freopen $(_WRAP)open $(_WRAP)creat $(_WRAP)access $(_WRAP)__xstat \ + $(_WRAP)stat $(_WRAP)lstat $(_WRAP)fopen64 $(_WRAP)open64 $(_WRAP)opendir $(_WRAP)__lxstat \ + $(_WRAP)chmod $(_WRAP)chown $(_WRAP)lchown $(_WRAP)symlink $(_WRAP)link $(_WRAP)__lxstat64 \ + $(_WRAP)mknod $(_WRAP)utimes $(_WRAP)unlink $(_WRAP)rename $(_WRAP)utime $(_WRAP)__xstat64 \ + $(_WRAP)mount $(_WRAP)mkfifo $(_WRAP)mkdir $(_WRAP)rmdir $(_WRAP)scandir $(_WRAP)realpath + +LIB_START_EXE = $(PATHWRAP) -static-libgcc -Wl,--start-group +LIB_END_EXE = -Wl,--end-group -lm -ldl $(LIBSTDCXX) -lpthread + +LIB_START_SHLIB = $(PATHWRAP) -static-libgcc -Wl,--start-group +LIB_END_SHLIB = -Wl,--end-group $(SRCROOT)/devtools/gcc9+support.o -lm -ldl $(LIBSTDCXXPIC) -lpthread -l:$(LD_SO) -Wl,--version-script=$(SRCROOT)/devtools/version_script.linux.txt + +# +# Profile-directed optimizations. +# Note: Last time these were tested 3/5/08, it actually slowed down the server benchmark by 5%! +# +# First, uncomment these, build, and test. It will generate .gcda and .gcno files where the .o files are. +# PROFILE_LINKER_FLAG=-fprofile-arcs +# PROFILE_COMPILER_FLAG=-fprofile-arcs +# +# Then, comment the above flags out again and rebuild with this flag uncommented: +# PROFILE_COMPILER_FLAG=-fprofile-use +# + +############################################################################# +# The compiler command lne for each src code file to compile +############################################################################# + +OBJ_DIR = ./obj_$(NAME)_$(TARGET_PLATFORM)$(TARGET_PLATFORM_EXT)/$(CFG) +CPP_TO_OBJ = $(CPPFILES:.cpp=.o) +CXX_TO_OBJ = $(CPP_TO_OBJ:.cxx=.o) +CC_TO_OBJ = $(CXX_TO_OBJ:.cc=.o) +MM_TO_OBJ = $(CC_TO_OBJ:.mm=.o) +C_TO_OBJ = $(MM_TO_OBJ:.c=.o) +OBJS = $(addprefix $(OBJ_DIR)/, $(notdir $(C_TO_OBJ))) + +ifeq ($(MAKE_VERBOSE),1) + QUIET_PREFIX = + QUIET_ECHO_POSTFIX = +else + QUIET_PREFIX = @ + QUIET_ECHO_POSTFIX = > /dev/null +endif + +ifeq ($(MAKE_CC_VERBOSE),1) +CC += -v +endif + +ifeq ($(CONFTYPE),lib) + LIB_File = $(OUTPUTFILE) +endif + +ifeq ($(CONFTYPE),dll) + SO_File = $(OUTPUTFILE) +endif + +ifeq ($(CONFTYPE),exe) + EXE_File = $(OUTPUTFILE) +endif + +# we generate dependencies as a side-effect of compilation now +GEN_DEP_FILE= + +PRE_COMPILE_FILE = + +POST_COMPILE_FILE = + +ifeq ($(BUILDING_MULTI_ARCH),1) + SINGLE_ARCH_CXXFLAGS=$(subst -arch x86_64,,$(CXXFLAGS)) + COMPILE_FILE = \ + $(QUIET_PREFIX) \ + echo "---- $(lastword $(subst /, ,$<)) as MULTIARCH----";\ + mkdir -p $(OBJ_DIR) && \ + $(CXX) $(SINGLE_ARCH_CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< && \ + $(CXX) $(CXXFLAGS) -o $@ -c $< +else + COMPILE_FILE = \ + $(QUIET_PREFIX) \ + echo "---- $(lastword $(subst /, ,$<)) ----";\ + mkdir -p $(OBJ_DIR) && \ + $(CXX) $(CXXFLAGS) $(GENDEP_CXXFLAGS) -o $@ -c $< +endif + +ifneq "$(origin VALVE_NO_AUTO_P4)" "undefined" + P4_EDIT_START = chmod -R +w + P4_EDIT_END = || true + P4_REVERT_START = true + P4_REVERT_END = +else + ifndef P4_EDIT_CHANGELIST + # You can use an environment variable to specify what changelist to check the Linux Binaries out into. Normally the default + # setting is best, but here is an alternate example: + # export P4_EDIT_CHANGELIST_CMD="echo 1424335" + # ?= means that if P4_EDIT_CHANGELIST_CMD is already set it won't be changed. + P4_EDIT_CHANGELIST_CMD ?= $(P4BIN) changes -c `$(P4BIN) client -o | grep ^Client | cut -f 2` -s pending | fgrep 'POSIX Auto Checkout' | cut -d' ' -f 2 | tail -n 1 + P4_EDIT_CHANGELIST := $(shell $(P4_EDIT_CHANGELIST_CMD)) + endif + ifeq ($(P4_EDIT_CHANGELIST),) + # If we haven't found a changelist to check out to then create one. The name must match the one from a few + # lines above or else a new changelist will be created each time. + # Warning: the behavior of 'echo' is not consistent. In bash you need the "-e" option in order for \n to be + # interpreted as a line-feed, but in dash you do not, and if "-e" is passed along then it is printed, which + # confuses p4. So, if you run this command from the bash shell don't forget to add "-e" to the echo command. + P4_EDIT_CHANGELIST = $(shell echo -e "Change: new\nDescription: POSIX Auto Checkout" | $(P4BIN) change -i | cut -f 2 -d ' ') + endif + + P4_EDIT_START := for f in + P4_EDIT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | $(P4BIN) -x - edit -c $(P4_EDIT_CHANGELIST); else $(P4BIN) edit -c $(P4_EDIT_CHANGELIST) $$f; fi; fi; done $(QUIET_ECHO_POSTFIX) + P4_REVERT_START := for f in + P4_REVERT_END := ; do if [ -n $$f ]; then if [ -d $$f ]; then find $$f -type f -print | $(P4BIN) -x - revert; else $(P4BIN) revert $$f; fi; fi; done $(QUIET_ECHO_POSTFIX) +endif + +ifeq ($(CONFTYPE),dll) +all: $(OTHER_DEPENDENCIES) $(OBJS) $(GAMEOUTPUTFILE) + @echo $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX) +else +all: $(OTHER_DEPENDENCIES) $(OBJS) $(OUTPUTFILE) + @echo $(OUTPUTFILE) $(QUIET_ECHO_POSTFIX) +endif + +.PHONY: clean cleantargets cleanandremove rebuild relink RemoveOutputFile SingleFile + + +rebuild : + $(MAKE) -f $(firstword $(MAKEFILE_LIST)) cleanandremove + $(MAKE) -f $(firstword $(MAKEFILE_LIST)) + + +# Use the relink target to force to relink the project. +relink: RemoveOutputFile all + +RemoveOutputFile: + rm -f $(OUTPUTFILE) + + +# This rule is so you can say "make SingleFile SingleFilename=/home/myname/valve_main/src/engine/language.cpp" and have it only build that file. +# It basically just translates the full filename to create a dependency on the appropriate .o file so it'll build that. +SingleFile : RemoveSingleFile $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o + @echo "" + +RemoveSingleFile: + $(QUIET_PREFIX) rm -f $(OBJ_DIR)/$(basename $(notdir $(SingleFilename))).o + +clean: +ifneq "$(OBJ_DIR)" "" + $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)" + $(QUIET_PREFIX) rm -rf $(OBJ_DIR) +endif +ifneq "$(OUTPUTFILE)" "" + $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \ + echo "$(P4BIN) revert $(OUTPUTFILE)"; \ + $(P4_REVERT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END); \ + fi; +endif +ifneq "$(OTHER_DEPENDENCIES)" "" + $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)" + $(QUIET_PREFIX) rm -f $(OTHER_DEPENDENCIES) +endif +ifneq "$(GAMEOUTPUTFILE)" "" + $(QUIET_PREFIX) echo "$(P4BIN) revert $(GAMEOUTPUTFILE)" + $(QUIET_PREFIX) $(P4_REVERT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_REVERT_END) +endif + + +# Do the above cleaning, except with p4 edit and rm. Reason being ar crs adds and replaces obj files to the +# archive. However if you've renamed or deleted a source file, $(AR) won't remove it. This can leave +# us with archive files that have extra unused symbols, and also potentially cause compilation errors +# when you rename a file and have many duplicate symbols. +cleanandremove: +ifneq "$(OBJ_DIR)" "" + $(QUIET_PREFIX) echo "rm -rf $(OBJ_DIR)" + $(QUIET_PREFIX) -rm -rf $(OBJ_DIR) +endif +ifneq "$(OUTPUTFILE)" "" + $(QUIET_PREFIX) if [ -e $(OUTPUTFILE) ]; then \ + echo "$(P4BIN) edit and rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT)"; \ + $(P4_EDIT_START) $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); \ + fi; + $(QUIET_PREFIX) -rm -f $(OUTPUTFILE) $(OUTPUTFILE)$(SYM_EXT); +endif +ifneq "$(OTHER_DEPENDENCIES)" "" + $(QUIET_PREFIX) echo "rm -f $(OTHER_DEPENDENCIES)" + $(QUIET_PREFIX) -rm -f $(OTHER_DEPENDENCIES) +endif +ifneq "$(GAMEOUTPUTFILE)" "" + $(QUIET_PREFIX) echo "$(P4BIN) edit and rm -f $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT)" + $(QUIET_PREFIX) $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END) + $(QUIET_PREFIX) -rm -f $(GAMEOUTPUTFILE) +endif + + +# This just deletes the final targets so it'll do a relink next time we build. +cleantargets: + $(QUIET_PREFIX) rm -f $(OUTPUTFILE) $(GAMEOUTPUTFILE) + + +$(LIB_File): $(OTHER_DEPENDENCIES) $(OBJS) + $(QUIET_PREFIX) -$(P4_EDIT_START) $(LIB_File) $(P4_EDIT_END); + $(QUIET_PREFIX) $(AR) $(LIB_File) $(OBJS) $(LIBFILES); + +SO_GameOutputFile = $(GAMEOUTPUTFILE) + +# Remove the target before installing a file over it; this prevents existing +# instances of the game from crashing due to the overwrite. +$(SO_GameOutputFile): $(SO_File) + $(QUIET_PREFIX) \ + $(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END) && \ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- COPYING TO $@ [$(CFG)] ----";\ + echo "----" $(QUIET_ECHO_POSTFIX); + $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE) $(P4_EDIT_END); + $(QUIET_PREFIX) -mkdir -p `dirname $(GAMEOUTPUTFILE)` > /dev/null; + $(QUIET_PREFIX) rm -f $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX); + $(QUIET_PREFIX) cp -v $(OUTPUTFILE) $(GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX); + $(QUIET_PREFIX) -$(P4_EDIT_START) $(GAMEOUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); + $(QUIET_PREFIX) $(GEN_SYM) $(GAMEOUTPUTFILE); + $(QUIET_PREFIX) -$(STRIP) $(GAMEOUTPUTFILE); + $(QUIET_PREFIX) $(VSIGN) -signvalve $(GAMEOUTPUTFILE); + $(QUIET_PREFIX) if [ "$(COPY_DLL_TO_SRV)" = "1" ]; then\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- COPYING TO $(Srv_GAMEOUTPUTFILE) ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + cp -v $(GAMEOUTPUTFILE) $(Srv_GAMEOUTPUTFILE) $(QUIET_ECHO_POSTFIX);\ + cp -v $(GAMEOUTPUTFILE)$(SYM_EXT) $(Srv_GAMEOUTPUTFILE)$(SYM_EXT) $(QUIET_ECHO_POSTFIX);\ + fi; + $(QUIET_PREFIX) if [ "$(IMPORTLIBRARY)" != "" ]; then\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- COPYING TO IMPORT LIBRARY $(IMPORTLIBRARY) ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + $(P4_EDIT_START) $(IMPORTLIBRARY) $(P4_EDIT_END) && \ + mkdir -p `dirname $(IMPORTLIBRARY)` > /dev/null && \ + cp -v $(OUTPUTFILE) $(IMPORTLIBRARY); \ + fi; + + +$(SO_File): $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES) + $(QUIET_PREFIX) \ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- LINKING $@ [$(CFG)] ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + \ + $(LINK) $(LINK_MAP_FLAGS) $(SHLIBLDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_SHLIB) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_SHLIB); + $(VSIGN) -signvalve $(OUTPUTFILE); + + +$(EXE_File) : $(OTHER_DEPENDENCIES) $(OBJS) $(LIBFILENAMES) + $(QUIET_PREFIX) \ + echo "----" $(QUIET_ECHO_POSTFIX);\ + echo "---- LINKING EXE $@ [$(CFG)] ----";\ + echo "----" $(QUIET_ECHO_POSTFIX);\ + \ + $(P4_EDIT_START) $(OUTPUTFILE) $(P4_EDIT_END);\ + $(LINK) $(LINK_MAP_FLAGS) $(LDFLAGS) $(PROFILE_LINKER_FLAG) -o $(OUTPUTFILE) $(LIB_START_EXE) $(OBJS) $(LIBFILES) $(SystemLibraries) $(LIB_END_EXE); + $(QUIET_PREFIX) -$(P4_EDIT_START) $(OUTPUTFILE)$(SYM_EXT) $(P4_EDIT_END); + $(QUIET_PREFIX) $(GEN_SYM) $(OUTPUTFILE); + $(QUIET_PREFIX) -$(STRIP) $(OUTPUTFILE); + $(QUIET_PREFIX) $(VSIGN) -signvalve $(OUTPUTFILE); + + +tags: + etags -a -C -o $(SRCROOT)/TAGS *.cpp *.cxx *.h *.hxx diff --git a/mp/src/game/client/c_baseflex.h b/mp/src/game/client/c_baseflex.h index 71cee3d81e7..f923ab371b2 100644 --- a/mp/src/game/client/c_baseflex.h +++ b/mp/src/game/client/c_baseflex.h @@ -75,7 +75,6 @@ struct FS_LocalToGlobal_t FS_LocalToGlobal_t( const FS_LocalToGlobal_t& src ) { m_Key = src.m_Key; - delete m_Mapping; m_Mapping = new int[ src.m_nCount ]; Q_memcpy( m_Mapping, src.m_Mapping, src.m_nCount * sizeof( int ) ); diff --git a/mp/src/game/client/clientshadowmgr.cpp b/mp/src/game/client/clientshadowmgr.cpp index bd3e2c2a443..95d844d6810 100644 --- a/mp/src/game/client/clientshadowmgr.cpp +++ b/mp/src/game/client/clientshadowmgr.cpp @@ -2500,7 +2500,8 @@ void CClientShadowMgr::BuildRenderToTextureShadow( IClientRenderable* pRenderabl fProjMax = fLengthSqr; yvec = test; } - } + } + AssertMsg( fProjMax > 0.0f, "Shadow direction is zero." ); VectorNormalize( yvec ); diff --git a/mp/src/game/client/fortress/c_shield.cpp b/mp/src/game/client/fortress/c_shield.cpp index 99b3a56dac5..ecf3233efb8 100644 --- a/mp/src/game/client/fortress/c_shield.cpp +++ b/mp/src/game/client/fortress/c_shield.cpp @@ -162,7 +162,12 @@ void C_Shield::ActivateShields( bool activate, int team ) //----------------------------------------------------------------------------- // Helper method for collision testing //----------------------------------------------------------------------------- +#ifdef _MSC_VER #pragma warning ( disable : 4701 ) +#elif defined __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif bool C_Shield::TestCollision( const Ray_t& ray, unsigned int mask, trace_t& trace ) { @@ -268,7 +273,11 @@ bool C_Shield::TestCollision( const Ray_t& ray, unsigned int mask, trace_t& trac return true; } +#ifdef _MSC_VER #pragma warning ( default : 4701 ) +#elif defined __GNUC__ +#pragma GCC diagnostic pop +#endif //----------------------------------------------------------------------------- // Called when we hit something that we deflect... diff --git a/mp/src/game/client/fortress/hintitembase.h b/mp/src/game/client/fortress/hintitembase.h index 914e44173d4..c56687979da 100644 --- a/mp/src/game/client/fortress/hintitembase.h +++ b/mp/src/game/client/fortress/hintitembase.h @@ -23,13 +23,13 @@ namespace vgui } #define DECLARE_HINTITEMFACTORY( className ) \ - CHintItemBase *Create_##className##( vgui::Panel *parent, const char *panelName ) \ + CHintItemBase *Create_##className( vgui::Panel *parent, const char *panelName ) \ { return new className( parent, panelName ); } #define GET_HINTITEMFACTORY_NAME( className ) Create_##className #define DECLARE_HINTFACTORY( className ) \ - C_TFBaseHint *Create_##className##( int id, int entity ) \ + C_TFBaseHint *Create_##className( int id, int entity ) \ { return new className( id, 0, entity, NULL ); } #define GET_HINTFACTORY_NAME( className ) Create_##className diff --git a/mp/src/game/client/fortress/hud_commander_statuspanel.cpp b/mp/src/game/client/fortress/hud_commander_statuspanel.cpp index 3d11da6579c..b085e6121b7 100644 --- a/mp/src/game/client/fortress/hud_commander_statuspanel.cpp +++ b/mp/src/game/client/fortress/hud_commander_statuspanel.cpp @@ -109,11 +109,11 @@ void CCommanderStatusPanel::Paint() if ( m_Type == TYPE_INFO && m_nTitlePos != -1 ) { - m_szText[ m_nTitlePos ] = 0; + m_szText[ (int)m_nTitlePos ] = 0; g_pMatSystemSurface->DrawColoredTextRect( m_hFont, x, y, wide, tall, 220, 220, 255, alpha, m_szText ); - m_szText[ m_nTitlePos ] = '\n'; + m_szText[ (int)m_nTitlePos ] = '\n'; y += vgui::surface()->GetFontTall( m_hFont ); tall -= vgui::surface()->GetFontTall( m_hFont ); diff --git a/mp/src/game/server/baseflex.h b/mp/src/game/server/baseflex.h index 1f0009ec35b..f96752eb422 100644 --- a/mp/src/game/server/baseflex.h +++ b/mp/src/game/server/baseflex.h @@ -206,7 +206,6 @@ class CBaseFlex : public CBaseAnimatingOverlay FS_LocalToGlobal_t( const FS_LocalToGlobal_t& src ) { m_Key = src.m_Key; - delete m_Mapping; m_Mapping = new LocalFlexController_t[ src.m_nCount ]; Q_memcpy( m_Mapping, src.m_Mapping, src.m_nCount * sizeof( int ) ); diff --git a/mp/src/game/server/fortress/grenade_rocket.h b/mp/src/game/server/fortress/grenade_rocket.h index bb73fc181e7..a1c43dc23de 100644 --- a/mp/src/game/server/fortress/grenade_rocket.h +++ b/mp/src/game/server/fortress/grenade_rocket.h @@ -48,7 +48,7 @@ class CGrenadeRocket : public CBaseAnimating return DMG_BLAST; } - static CGrenadeRocket *CGrenadeRocket::Create( const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner, CBaseEntity *pRealOwner ); + static CGrenadeRocket *Create( const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner, CBaseEntity *pRealOwner ); public: EHANDLE m_hLockTarget; diff --git a/mp/src/game/server/fortress/mortar_round.h b/mp/src/game/server/fortress/mortar_round.h index 4062c625aa2..28e428f1d6a 100644 --- a/mp/src/game/server/fortress/mortar_round.h +++ b/mp/src/game/server/fortress/mortar_round.h @@ -37,7 +37,7 @@ class CMortarRound : public CBaseAnimating // Damage type accessors virtual int GetDamageType() const { return DMG_BLAST; } - static CMortarRound* CMortarRound::Create( const Vector &vecOrigin, const Vector &vecVelocity, edict_t *pentOwner ); + static CMortarRound* Create( const Vector &vecOrigin, const Vector &vecVelocity, edict_t *pentOwner ); SmokeTrail *m_pSmokeTrail; CHandle m_pLauncher; diff --git a/mp/src/game/server/fortress/npc_bug_warrior.cpp b/mp/src/game/server/fortress/npc_bug_warrior.cpp index ccde8cd9ccf..2b4c0b7c9a8 100644 --- a/mp/src/game/server/fortress/npc_bug_warrior.cpp +++ b/mp/src/game/server/fortress/npc_bug_warrior.cpp @@ -324,7 +324,7 @@ void CNPC_Bug_Warrior::StartTask( const Task_t *pTask ) // We're fleeing from an enemy. // If I have a squadmate, run to him. CAI_BaseNPC *pSquadMate; - if ( m_pSquad && (pSquadMate = m_pSquad->NearestSquadMember(this)) != false ) + if ( m_pSquad && (pSquadMate = m_pSquad->NearestSquadMember(this)) ) { SetTarget( pSquadMate ); AI_NavGoal_t goal( GOALTYPE_TARGETENT, vec3_origin, ACT_RUN ); @@ -505,7 +505,7 @@ void CNPC_Bug_Warrior::Event_Killed( const CTakeDamageInfo &info ) //----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- -void CNPC_Bug_Warrior::MeleeAttack( float distance, float damage, QAngle& viewPunch, Vector& shove ) +void CNPC_Bug_Warrior::MeleeAttack( float distance, float damage, const QAngle& viewPunch, const Vector& shove ) { if ( GetEnemy() == NULL ) return; @@ -561,8 +561,10 @@ void CNPC_Bug_Warrior::HandleAnimEvent( animevent_t *pEvent ) switch ( pEvent->event ) { case BUG_WARRIOR_AE_MELEE_HIT1: - MeleeAttack( BUG_WARRIOR_MELEE1_RANGE, npc_bug_warrior_swipe_damage.GetFloat(), QAngle( 20.0f, 0.0f, 0.0f ), Vector( -350.0f, 1.0f, 1.0f ) ); - return; + { + MeleeAttack( BUG_WARRIOR_MELEE1_RANGE, npc_bug_warrior_swipe_damage.GetFloat(), QAngle( 20.0f, 0.0f, 0.0f ), Vector( -350.0f, 1.0f, 1.0f ) ); + return; + } break; case BUG_WARRIOR_AE_MELEE_SOUND1: diff --git a/mp/src/game/server/fortress/npc_bug_warrior.h b/mp/src/game/server/fortress/npc_bug_warrior.h index febb22c8f00..d52b4efe15c 100644 --- a/mp/src/game/server/fortress/npc_bug_warrior.h +++ b/mp/src/game/server/fortress/npc_bug_warrior.h @@ -81,7 +81,7 @@ class CNPC_Bug_Warrior : public CAI_BaseNPC virtual int IRelationPriority( CBaseEntity *pTarget ); void Event_Killed( const CTakeDamageInfo &info ); - void MeleeAttack( float distance, float damage, QAngle& viewPunch, Vector& shove ); + void MeleeAttack( float distance, float damage, const QAngle& viewPunch, const Vector& shove ); float m_flIdleDelay; diff --git a/mp/src/game/server/fortress/tf_basefourwheelvehicle.cpp b/mp/src/game/server/fortress/tf_basefourwheelvehicle.cpp index f7ef39c6bc6..cabef6e76ff 100644 --- a/mp/src/game/server/fortress/tf_basefourwheelvehicle.cpp +++ b/mp/src/game/server/fortress/tf_basefourwheelvehicle.cpp @@ -472,7 +472,8 @@ void CBaseTFFourWheelVehicle::PlayerControlInit( CBasePlayer *pPlayer ) pPlayer->SetViewOffset( vec3_origin ); m_playerOn.FireOutput( pPlayer, this, 0 ); - InputTurnOn( inputdata_t() ); + inputdata_t inputdata; + InputTurnOn( inputdata ); // Release the handbrake. if ( !IsDeployed() ) @@ -495,7 +496,8 @@ void CBaseTFFourWheelVehicle::PlayerControlShutdown() m_attackaxis.Set( 0, pPlayer, this ); m_attack2axis.Set( 0, pPlayer, this ); - InputTurnOff( inputdata_t() ); + inputdata_t inputdata; + InputTurnOff( inputdata ); m_VehiclePhysics.SetHandbrake( true ); //to stop the vehicle from sliding away with no driver m_VehiclePhysics.SetThrottle( 0.0f ); } diff --git a/mp/src/game/server/fortress/tf_obj.cpp b/mp/src/game/server/fortress/tf_obj.cpp index 5add93678e7..bb7d4df9a65 100644 --- a/mp/src/game/server/fortress/tf_obj.cpp +++ b/mp/src/game/server/fortress/tf_obj.cpp @@ -957,7 +957,7 @@ bool CBaseObject::VerifyCorner( const Vector &vBottomCenter, float xOffset, floa //----------------------------------------------------------------------------- // Purpose: Check under a build point to ensure it's buildable on //----------------------------------------------------------------------------- -bool CBaseObject::CheckBuildPoint( Vector vecPoint, Vector &vecTrace, Vector *vecOutPoint ) +bool CBaseObject::CheckBuildPoint( const Vector &vecPoint, const Vector &vecTrace, Vector *vecOutPoint ) { trace_t tr; @@ -965,7 +965,7 @@ bool CBaseObject::CheckBuildPoint( Vector vecPoint, Vector &vecTrace, Vector *ve Vector vecEnd; // Ensure that this point isn't in a no-build zone: - if( !tf_fastbuild.GetInt() && NoBuildPreventsBuild(this, vecPoint ) ) + if( !tf_fastbuild.GetInt() && NoBuildPreventsBuild( this, vecPoint ) ) bClear = false; // If the point isn't in solid, trace down until we find the ground diff --git a/mp/src/game/server/fortress/tf_obj.h b/mp/src/game/server/fortress/tf_obj.h index 86a52b89746..0da42a4209c 100644 --- a/mp/src/game/server/fortress/tf_obj.h +++ b/mp/src/game/server/fortress/tf_obj.h @@ -99,7 +99,7 @@ class CBaseObject : public CBaseCombatCharacter, public IHasBuildPoints void StopPlacement( void ); bool FindNearestBuildPoint( CBaseEntity *pEntity, CBaseTFPlayer *pBuilder, Vector vecBuildOrigin, float &flNearestPoint, Vector &vecNearestBuildPoint ); virtual bool CalculatePlacement( CBaseTFPlayer *pPlayer ); - bool CheckBuildPoint( Vector vecPoint, Vector &vecTrace, Vector *vecOutPoint=NULL ); + bool CheckBuildPoint( const Vector &vecPoint, const Vector &vecTrace, Vector *vecOutPoint = NULL ); bool VerifyCorner( const Vector &vBottomCenter, float xOffset, float yOffset ); virtual bool CheckBuildOrigin( CBaseTFPlayer *pPlayer, const Vector &vecBuildOrigin, bool bSnappedToPoint = false ); void AttemptToFindPower( void ); diff --git a/mp/src/game/server/fortress/tf_player.h b/mp/src/game/server/fortress/tf_player.h index 9a07a87b915..0d356458f99 100644 --- a/mp/src/game/server/fortress/tf_player.h +++ b/mp/src/game/server/fortress/tf_player.h @@ -71,7 +71,6 @@ enum ResupplyReason_t; //===================================================================== class CBaseTFPlayer : public CBasePlayer, public IScorer { - typedef CBasePlayer BaseClass; public: DECLARE_CLASS( CBaseTFPlayer, CBasePlayer ); DECLARE_SERVERCLASS(); diff --git a/mp/src/game/server/fortress/tf_playerclass.h b/mp/src/game/server/fortress/tf_playerclass.h index 109854076b3..5ea441b7d0d 100644 --- a/mp/src/game/server/fortress/tf_playerclass.h +++ b/mp/src/game/server/fortress/tf_playerclass.h @@ -7,7 +7,6 @@ #include "tier0/fasttimer.h" -#include class CPlayerClassData; class CPlayerClass; @@ -17,6 +16,18 @@ class CBaseObject; class CBaseTechnology; class CWeaponCombatShield; +#if _WIN32 +#include +#else +static inline void* _malloc_dbg(size_t stAllocateBlock, int nBlockUse, const char *pFileName, int nLine) +{ + (void)nBlockUse; + (void)pFileName; + (void)nLine; + return malloc(stAllocateBlock); +} +#endif + enum ResupplyReason_t { diff --git a/mp/src/game/server/fortress/tf_shield.cpp b/mp/src/game/server/fortress/tf_shield.cpp index a16902afaab..7fb60f1a109 100644 --- a/mp/src/game/server/fortress/tf_shield.cpp +++ b/mp/src/game/server/fortress/tf_shield.cpp @@ -318,7 +318,12 @@ void CShield::SetEMPed( bool isEmped ) //----------------------------------------------------------------------------- // Helper method for collision testing //----------------------------------------------------------------------------- +#ifdef _MSC_VER #pragma warning ( disable : 4701 ) +#elif defined __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif bool CShield::TestCollision( const Ray_t& ray, unsigned int mask, trace_t& trace ) { @@ -427,6 +432,10 @@ bool CShield::TestCollision( const Ray_t& ray, unsigned int mask, trace_t& trace return true; } +#ifdef _MSC_VER #pragma warning ( default : 4701 ) +#elif defined __GNUC__ +#pragma GCC diagnostic pop +#endif diff --git a/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp b/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp index 5ccfe006343..cf55126bf59 100644 --- a/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp +++ b/mp/src/game/server/fortress/tf_vehicle_siege_tower.cpp @@ -118,7 +118,8 @@ void CVehicleSiegeTower::InternalDeploy( void ) if ( !Deploy() ) return; - InputTurnOff( inputdata_t() ); + inputdata_t inputdata; + InputTurnOff( inputdata ); // Create the ladder. Vector vecOrigin; @@ -134,7 +135,8 @@ void CVehicleSiegeTower::InternalUnDeploy( void ) { // Undeploy UnDeploy(); - InputTurnOn( inputdata_t() ); + inputdata_t inputdata; + InputTurnOn( inputdata ); // Destory the ladder. DestroyLadder(); diff --git a/mp/src/game/shared/fortress/grenade_antipersonnel.h b/mp/src/game/shared/fortress/grenade_antipersonnel.h index 2538f782932..5280329a5db 100644 --- a/mp/src/game/shared/fortress/grenade_antipersonnel.h +++ b/mp/src/game/shared/fortress/grenade_antipersonnel.h @@ -38,7 +38,7 @@ class CGrenadeAntiPersonnel : public CBaseEMPableGrenade // Damage type accessors virtual int GetDamageType() const { return DMG_BLAST; } - static CGrenadeAntiPersonnel *CGrenadeAntiPersonnel::Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner ); + static CGrenadeAntiPersonnel *Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner ); void SetExplodeOnContact( bool bExplode ) { m_bExplodeOnContact = bExplode; } diff --git a/mp/src/game/shared/fortress/grenade_emp.h b/mp/src/game/shared/fortress/grenade_emp.h index 3ee68a4b4ba..f4499a28ce1 100644 --- a/mp/src/game/shared/fortress/grenade_emp.h +++ b/mp/src/game/shared/fortress/grenade_emp.h @@ -44,7 +44,7 @@ class CGrenadeEMP : public CBaseEMPableGrenade void ApplyRadiusEMPEffect( CBaseEntity *pOwner, const Vector& vecCenter ); - static CGrenadeEMP *CGrenadeEMP::Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner ); + static CGrenadeEMP *Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner ); // A derived class should return true here so that weapon sounds, etc, can // apply the proper filter diff --git a/mp/src/game/shared/fortress/grenade_limpetmine.h b/mp/src/game/shared/fortress/grenade_limpetmine.h index 59e9c51d136..4629563209f 100644 --- a/mp/src/game/shared/fortress/grenade_limpetmine.h +++ b/mp/src/game/shared/fortress/grenade_limpetmine.h @@ -30,7 +30,7 @@ class CLimpetMine : public CBaseGrenade // Creation and Initialization virtual void Spawn( void ); virtual void Precache( void ); - static CLimpetMine* CLimpetMine::Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner ); + static CLimpetMine* Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner ); virtual int GetDamageType() const { return DMG_BLAST; } virtual bool CanBePoweredUp( void ) { return false; } diff --git a/mp/src/game/shared/fortress/grenade_objectsapper.h b/mp/src/game/shared/fortress/grenade_objectsapper.h index 7ec2a489bf0..1507660546e 100644 --- a/mp/src/game/shared/fortress/grenade_objectsapper.h +++ b/mp/src/game/shared/fortress/grenade_objectsapper.h @@ -40,7 +40,7 @@ class CGrenadeObjectSapper : public CBaseGrenade void CleanUp(); - static CGrenadeObjectSapper *CGrenadeObjectSapper::Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner, CBaseObject *pObject ); + static CGrenadeObjectSapper *Create( const Vector &vecOrigin, const Vector &vecAngles, CBasePlayer *pOwner, CBaseObject *pObject ); public: CNetworkVar( bool, m_bSapping ); diff --git a/mp/src/game/shared/fortress/tf_shareddefs.cpp b/mp/src/game/shared/fortress/tf_shareddefs.cpp index 035fb78c81a..342457948ba 100644 --- a/mp/src/game/shared/fortress/tf_shareddefs.cpp +++ b/mp/src/game/shared/fortress/tf_shareddefs.cpp @@ -346,18 +346,18 @@ bool IsObjectADefensiveBuilding( int iObjectType ) #if defined( CLIENT_DLL ) #define DEFINE_PLAYERCLASS_ALLOC_FNS( className, iClass ) \ - C_PlayerClass* AllocClient##className##( C_BaseTFPlayer *pPlayer ) \ + C_PlayerClass* AllocClient##className( C_BaseTFPlayer *pPlayer ) \ { \ - return new C_PlayerClass##className##( pPlayer ); \ + return new C_PlayerClass##className( pPlayer ); \ } \ - CPlayerClass* AllocServer##className##( CBaseTFPlayer *pPlayer ) \ + CPlayerClass* AllocServer##className( CBaseTFPlayer *pPlayer ) \ { \ Assert( false ); \ return NULL; \ } #define GENERATE_PLAYERCLASS_INFO( className ) \ - AllocClient##className##, AllocServer##className, NULL + AllocClient##className, AllocServer##className, NULL // ------------------------------------------------------------------------------------- // @@ -380,18 +380,18 @@ bool IsObjectADefensiveBuilding( int iObjectType ) #define DEFINE_PLAYERCLASS_ALLOC_FNS( className, iClass ) \ ConVar class_##className##_health( "class_" #className "_health", "0", FCVAR_NONE, #className "'s max health" ); \ - C_PlayerClass* AllocClient##className##( C_BaseTFPlayer *pPlayer ) \ + C_PlayerClass* AllocClient##className( C_BaseTFPlayer *pPlayer ) \ { \ Assert( false ); \ return NULL; \ } \ - CPlayerClass* AllocServer##className##( CBaseTFPlayer *pPlayer ) \ + CPlayerClass* AllocServer##className( CBaseTFPlayer *pPlayer ) \ { \ - return new CPlayerClass##className##( pPlayer, iClass ); \ - } + return new CPlayerClass##className( pPlayer, iClass ); \ + } #define GENERATE_PLAYERCLASS_INFO( className ) \ - AllocClient##className##, AllocServer##className, &class_##className##_health + AllocClient##className, AllocServer##className, &class_##className##_health // ------------------------------------------------------------------------------------- // diff --git a/mp/src/game/shared/fortress/tf_shareddefs.h b/mp/src/game/shared/fortress/tf_shareddefs.h index 6bc8b5bb9c5..943d6c84cbc 100644 --- a/mp/src/game/shared/fortress/tf_shareddefs.h +++ b/mp/src/game/shared/fortress/tf_shareddefs.h @@ -9,6 +9,7 @@ #define PLAYER_MSG_PERSONAL_SHIELD 2 +class ConVar; extern ConVar inv_demo; extern ConVar lod_effect_distance; diff --git a/mp/src/game/shared/fortress/tf_shield_shared.cpp b/mp/src/game/shared/fortress/tf_shield_shared.cpp index 616741654a2..42f600df388 100644 --- a/mp/src/game/shared/fortress/tf_shield_shared.cpp +++ b/mp/src/game/shared/fortress/tf_shield_shared.cpp @@ -246,7 +246,7 @@ void CShieldEffect::ComputeVertexActivity() //----------------------------------------------------------------------------- // bounding box for collision //----------------------------------------------------------------------------- -void CShieldEffect::SetShieldPanelSize( Vector& mins, Vector& maxs ) +void CShieldEffect::SetShieldPanelSize( const Vector& mins, const Vector& maxs ) { m_PanelBoxMin = mins; m_PanelBoxMax = maxs; diff --git a/mp/src/game/shared/fortress/tf_shieldshared.h b/mp/src/game/shared/fortress/tf_shieldshared.h index 74ff3f6ef78..5fd46a7bea6 100644 --- a/mp/src/game/shared/fortress/tf_shieldshared.h +++ b/mp/src/game/shared/fortress/tf_shieldshared.h @@ -172,7 +172,7 @@ class CShieldEffect private: // Simulation set up void ComputeRestPositions(); - void SetShieldPanelSize( Vector& mins, Vector& maxs ); + void SetShieldPanelSize( const Vector& mins, const Vector& maxs ); void SimulateTranslation( float dt ); void SimulateRotation( float dt, const Vector& forward ); void ComputeOrientationMatrix(); diff --git a/mp/src/public/bone_setup.cpp b/mp/src/public/bone_setup.cpp index 4630c73074d..14e63bd5f12 100644 --- a/mp/src/public/bone_setup.cpp +++ b/mp/src/public/bone_setup.cpp @@ -5148,7 +5148,12 @@ float Studio_GetPoseParameter( const CStudioHdr *pStudioHdr, int iParameter, flo } +#ifdef _MSC_VER #pragma warning (disable : 4701) +#elif defined __GNUC__ +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" +#endif //----------------------------------------------------------------------------- @@ -5257,7 +5262,11 @@ static int ClipRayToHitbox( const Ray_t &ray, mstudiobbox_t *pbox, matrix3x4_t& return hitside; } +#ifdef _MSC_VER #pragma warning (default : 4701) +#elif defined __GNUC__ +#pragma GCC diagnostic pop +#endif //----------------------------------------------------------------------------- diff --git a/mp/src/public/mathlib/vector.h b/mp/src/public/mathlib/vector.h index a797da25bbd..fce6b6f92fc 100644 --- a/mp/src/public/mathlib/vector.h +++ b/mp/src/public/mathlib/vector.h @@ -374,8 +374,9 @@ class TableVector class ALIGN16 VectorAligned : public Vector { public: - inline VectorAligned(void) {}; + inline VectorAligned(void):w(0) {}; inline VectorAligned(vec_t X, vec_t Y, vec_t Z) + : w(0) { Init(X,Y,Z); } diff --git a/mp/src/public/particles/particles.h b/mp/src/public/particles/particles.h index 4066d85e78d..37af4bf5321 100644 --- a/mp/src/public/particles/particles.h +++ b/mp/src/public/particles/particles.h @@ -1391,7 +1391,7 @@ class CParticleCollection -class CM128InitialAttributeIterator : public CStridedConstPtr +class CM128InitialAttributeIterator : public CFltx4StridedConstPtr { public: FORCEINLINE CM128InitialAttributeIterator( int nAttribute, CParticleCollection *pParticles ) @@ -1401,7 +1401,7 @@ class CM128InitialAttributeIterator : public CStridedConstPtr }; -class CM128AttributeIterator : public CStridedConstPtr +class CM128AttributeIterator : public CFltx4StridedConstPtr { public: FORCEINLINE CM128AttributeIterator( int nAttribute, CParticleCollection *pParticles ) @@ -1419,7 +1419,7 @@ class C4IAttributeIterator : public CStridedConstPtr } }; -class CM128AttributeWriteIterator : public CStridedPtr +class CM128AttributeWriteIterator : public CFltx4StridedPtr { public: FORCEINLINE CM128AttributeWriteIterator( void ) diff --git a/mp/src/public/tier1/utlblockmemory.h b/mp/src/public/tier1/utlblockmemory.h index b4a254ff742..8d86c59e839 100644 --- a/mp/src/public/tier1/utlblockmemory.h +++ b/mp/src/public/tier1/utlblockmemory.h @@ -135,10 +135,10 @@ CUtlBlockMemory::~CUtlBlockMemory() template< class T, class I > void CUtlBlockMemory::Swap( CUtlBlockMemory< T, I > &mem ) { - swap( m_pMemory, mem.m_pMemory ); - swap( m_nBlocks, mem.m_nBlocks ); - swap( m_nIndexMask, mem.m_nIndexMask ); - swap( m_nIndexShift, mem.m_nIndexShift ); + V_swap( m_pMemory, mem.m_pMemory ); + V_swap( m_nBlocks, mem.m_nBlocks ); + V_swap( m_nIndexMask, mem.m_nIndexMask ); + V_swap( m_nIndexShift, mem.m_nIndexShift ); } diff --git a/mp/src/public/tier1/utlsoacontainer.h b/mp/src/public/tier1/utlsoacontainer.h index b9440c5fc92..284358db03d 100644 --- a/mp/src/public/tier1/utlsoacontainer.h +++ b/mp/src/public/tier1/utlsoacontainer.h @@ -109,6 +109,95 @@ template class CStridedConstPtr } }; +class CFltx4StridedPtr +{ +private: + typedef __m128 T; + +protected: + T *m_pData; + size_t m_nStride; + +public: + FORCEINLINE CFltx4StridedPtr( void *pData, size_t nByteStride ) + { + m_pData = reinterpret_cast( pData ); + m_nStride = nByteStride / sizeof( T ); + } + + FORCEINLINE CFltx4StridedPtr( void ) {} + T *operator->(void) const + { + return m_pData; + } + + T & operator*(void) const + { + return *m_pData; + } + + FORCEINLINE operator T *(void) + { + return m_pData; + } + + FORCEINLINE CFltx4StridedPtr& operator++(void) + { + m_pData += m_nStride; + return *this; + } + + FORCEINLINE void operator+=( size_t nNumElements ) + { + m_pData += nNumElements * m_nStride; + } + +}; + +class CFltx4StridedConstPtr +{ +private: + typedef __m128 T; + +protected: + const T *m_pData; + size_t m_nStride; + +public: + FORCEINLINE CFltx4StridedConstPtr( void const *pData, size_t nByteStride ) + { + m_pData = reinterpret_cast( pData ); + m_nStride = nByteStride / sizeof( T ); + } + + FORCEINLINE CFltx4StridedConstPtr( void ) {} + + const T *operator->(void) const + { + return m_pData; + } + + const T & operator*(void) const + { + return *m_pData; + } + + FORCEINLINE operator const T *(void) const + { + return m_pData; + } + + FORCEINLINE CFltx4StridedConstPtr &operator++(void) + { + m_pData += m_nStride; + return *this; + } + FORCEINLINE void operator+=( size_t nNumElements ) + { + m_pData += nNumElements*m_nStride; + } +}; + // allowed field data types. if you change these values, you need to change the tables in the .cpp file enum EAttributeDataType { @@ -311,19 +400,19 @@ class CSOAContainer }; -class CFltX4AttributeIterator : public CStridedConstPtr +class CFltX4AttributeIterator : public CFltx4StridedConstPtr { FORCEINLINE CFltX4AttributeIterator( CSOAContainer const *pContainer, int nAttribute, int nRowNumber = 0 ) - : CStridedConstPtr( pContainer->ConstRowPtr( nAttribute, nRowNumber), + : CFltx4StridedConstPtr( pContainer->ConstRowPtr( nAttribute, nRowNumber), pContainer->ItemByteStride( nAttribute ) ) { } }; -class CFltX4AttributeWriteIterator : public CStridedPtr +class CFltX4AttributeWriteIterator : public CFltx4StridedPtr { FORCEINLINE CFltX4AttributeWriteIterator( CSOAContainer const *pContainer, int nAttribute, int nRowNumber = 0 ) - : CStridedPtr( pContainer->RowPtr( nAttribute, nRowNumber), + : CFltx4StridedPtr( pContainer->RowPtr( nAttribute, nRowNumber), pContainer->ItemByteStride( nAttribute ) ) { } From 1b2365d879a6f80e2ebf052ad0c4dc8a99480b08 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sat, 30 Jan 2021 17:27:39 +0100 Subject: [PATCH 09/11] Update gameinfo.txt The HL2(MP) assets weren't being loaded correctly on Linux. I copied the settings from the original Source SDK 2013 file, which fixed it. --- mp/game/invasion/gameinfo.txt | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/mp/game/invasion/gameinfo.txt b/mp/game/invasion/gameinfo.txt index 9b843e13abc..94b37c764b5 100644 --- a/mp/game/invasion/gameinfo.txt +++ b/mp/game/invasion/gameinfo.txt @@ -59,17 +59,20 @@ // VPK and we can avoid making thousands of file system calls to attempt to open files // in folders where they don't exist. (Searching a VPK is much faster than making an operating // system call.) - game |all_source_engine_paths|hl2 + game_lv hl2/hl2_lv.vpk + game+mod hl2mp/hl2mp_english.vpk + game+mod hl2mp/hl2mp_pak.vpk game |all_source_engine_paths|hl2/hl2_english.vpk + game |all_source_engine_paths|hl2/hl2_pak.vpk game |all_source_engine_paths|hl2/hl2_textures.vpk game |all_source_engine_paths|hl2/hl2_sound_vo_english.vpk game |all_source_engine_paths|hl2/hl2_sound_misc.vpk game |all_source_engine_paths|hl2/hl2_misc.vpk + platform |all_source_engine_paths|platform/platform_misc.vpk + game |all_source_engine_paths|hl2mp - game |all_source_engine_paths|hl2mp/hl2mp_english.vpk - game |all_source_engine_paths|hl2mp/hl2mp_pak.vpk + game |all_source_engine_paths|hl2 platform |all_source_engine_paths|platform - platform |all_source_engine_paths|platform/platform_misc.vpk } } } From be40015e7e23a4dce35e23e94d804dea3c9061b4 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sun, 31 Jan 2021 15:42:56 +0100 Subject: [PATCH 10/11] Move font files to parent directory This works around an engine bug that seems to exist for Linux, where fonts are not found if three directories deep: Couldn't find custom font file 'resource/fonts/Squada_One/SquadaOne-Regular.ttf' --- mp/game/invasion/resource/clientscheme.res | 4 ++-- .../resource/fonts/{Michroma => }/Michroma.ttf | Bin .../fonts/{Michroma/OFL.txt => Michroma.txt} | 0 .../resource/fonts/{Oswald => }/Oswald-Bold.ttf | Bin .../resource/fonts/{Oswald => }/Oswald-Light.ttf | Bin .../resource/fonts/{Oswald => }/Oswald-Regular.ttf | Bin .../resource/fonts/{Oswald/OFL.txt => Oswald.txt} | 0 .../fonts/{Squada_One => }/SquadaOne-Regular.ttf | Bin .../fonts/{Squada_One/OFL.txt => SquadaOne.txt} | 0 mp/game/invasion/resource/sourcescheme.res | 2 +- mp/game/invasion/resource/teamscheme.res | 8 ++++---- mp/game/invasion/resource/teamschemealien.res | 8 ++++---- mp/game/invasion/resource/teamschemehuman.res | 8 ++++---- 13 files changed, 15 insertions(+), 15 deletions(-) rename mp/game/invasion/resource/fonts/{Michroma => }/Michroma.ttf (100%) rename mp/game/invasion/resource/fonts/{Michroma/OFL.txt => Michroma.txt} (100%) rename mp/game/invasion/resource/fonts/{Oswald => }/Oswald-Bold.ttf (100%) rename mp/game/invasion/resource/fonts/{Oswald => }/Oswald-Light.ttf (100%) rename mp/game/invasion/resource/fonts/{Oswald => }/Oswald-Regular.ttf (100%) rename mp/game/invasion/resource/fonts/{Oswald/OFL.txt => Oswald.txt} (100%) rename mp/game/invasion/resource/fonts/{Squada_One => }/SquadaOne-Regular.ttf (100%) rename mp/game/invasion/resource/fonts/{Squada_One/OFL.txt => SquadaOne.txt} (100%) diff --git a/mp/game/invasion/resource/clientscheme.res b/mp/game/invasion/resource/clientscheme.res index fbd93f13961..7e2cb44e828 100644 --- a/mp/game/invasion/resource/clientscheme.res +++ b/mp/game/invasion/resource/clientscheme.res @@ -1553,8 +1553,8 @@ Client { "1" "resource/HALFLIFE2.ttf" "2" "resource/HL2crosshairs.ttf" - "3" "resource/fonts/Squada_One/SquadaOne-Regular.ttf" - "4" "resource/fonts/Michroma/Michroma.ttf" + "3" "resource/fonts/SquadaOne-Regular.ttf" + "4" "resource/fonts/Michroma.ttf" "5" "resource/fonts/CRYSRG__.TTF" } } diff --git a/mp/game/invasion/resource/fonts/Michroma/Michroma.ttf b/mp/game/invasion/resource/fonts/Michroma.ttf similarity index 100% rename from mp/game/invasion/resource/fonts/Michroma/Michroma.ttf rename to mp/game/invasion/resource/fonts/Michroma.ttf diff --git a/mp/game/invasion/resource/fonts/Michroma/OFL.txt b/mp/game/invasion/resource/fonts/Michroma.txt similarity index 100% rename from mp/game/invasion/resource/fonts/Michroma/OFL.txt rename to mp/game/invasion/resource/fonts/Michroma.txt diff --git a/mp/game/invasion/resource/fonts/Oswald/Oswald-Bold.ttf b/mp/game/invasion/resource/fonts/Oswald-Bold.ttf similarity index 100% rename from mp/game/invasion/resource/fonts/Oswald/Oswald-Bold.ttf rename to mp/game/invasion/resource/fonts/Oswald-Bold.ttf diff --git a/mp/game/invasion/resource/fonts/Oswald/Oswald-Light.ttf b/mp/game/invasion/resource/fonts/Oswald-Light.ttf similarity index 100% rename from mp/game/invasion/resource/fonts/Oswald/Oswald-Light.ttf rename to mp/game/invasion/resource/fonts/Oswald-Light.ttf diff --git a/mp/game/invasion/resource/fonts/Oswald/Oswald-Regular.ttf b/mp/game/invasion/resource/fonts/Oswald-Regular.ttf similarity index 100% rename from mp/game/invasion/resource/fonts/Oswald/Oswald-Regular.ttf rename to mp/game/invasion/resource/fonts/Oswald-Regular.ttf diff --git a/mp/game/invasion/resource/fonts/Oswald/OFL.txt b/mp/game/invasion/resource/fonts/Oswald.txt similarity index 100% rename from mp/game/invasion/resource/fonts/Oswald/OFL.txt rename to mp/game/invasion/resource/fonts/Oswald.txt diff --git a/mp/game/invasion/resource/fonts/Squada_One/SquadaOne-Regular.ttf b/mp/game/invasion/resource/fonts/SquadaOne-Regular.ttf similarity index 100% rename from mp/game/invasion/resource/fonts/Squada_One/SquadaOne-Regular.ttf rename to mp/game/invasion/resource/fonts/SquadaOne-Regular.ttf diff --git a/mp/game/invasion/resource/fonts/Squada_One/OFL.txt b/mp/game/invasion/resource/fonts/SquadaOne.txt similarity index 100% rename from mp/game/invasion/resource/fonts/Squada_One/OFL.txt rename to mp/game/invasion/resource/fonts/SquadaOne.txt diff --git a/mp/game/invasion/resource/sourcescheme.res b/mp/game/invasion/resource/sourcescheme.res index ab4def71c4b..c9c40fd6536 100644 --- a/mp/game/invasion/resource/sourcescheme.res +++ b/mp/game/invasion/resource/sourcescheme.res @@ -1232,6 +1232,6 @@ Scheme 1 "resource/HALFLIFE2.ttf" 2 "resource/HL2EP2.ttf" 3 "resource/marlett.ttf" - 4 "resource/fonts/Squada_One/SquadaOne-Regular.ttf" + 4 "resource/fonts/SquadaOne-Regular.ttf" } } diff --git a/mp/game/invasion/resource/teamscheme.res b/mp/game/invasion/resource/teamscheme.res index d8988ec05fc..e73ac9a3ae6 100644 --- a/mp/game/invasion/resource/teamscheme.res +++ b/mp/game/invasion/resource/teamscheme.res @@ -782,9 +782,9 @@ TeamScheme CustomFontFiles { - 1 "resource/fonts/michroma/michroma.ttf" + 1 "resource/fonts/Michroma.ttf" 2 "resource/fonts/electr.ttf" - 3 "resource/fonts/oswald/Oswald-Regular.ttf" - 4 "resource/fonts/squada_one/SquadaOne-Regular.ttf" + 3 "resource/fonts/Oswald-Regular.ttf" + 4 "resource/fonts/SquadaOne-Regular.ttf" } -} \ No newline at end of file +} diff --git a/mp/game/invasion/resource/teamschemealien.res b/mp/game/invasion/resource/teamschemealien.res index cd60d0ad590..7a71a62533e 100644 --- a/mp/game/invasion/resource/teamschemealien.res +++ b/mp/game/invasion/resource/teamschemealien.res @@ -793,9 +793,9 @@ TeamSchemeAlien CustomFontFiles { - 1 "resource/fonts/michroma/michroma.ttf" + 1 "resource/fonts/Michroma.ttf" 2 "resource/fonts/electr.ttf" - 3 "resource/fonts/oswald/Oswald-Regular.ttf" - 4 "resource/fonts/squada_one/SquadaOne-Regular.ttf" + 3 "resource/fonts/Oswald-Regular.ttf" + 4 "resource/fonts/SquadaOne-Regular.ttf" } -} \ No newline at end of file +} diff --git a/mp/game/invasion/resource/teamschemehuman.res b/mp/game/invasion/resource/teamschemehuman.res index e09c651318d..dc66894e25b 100644 --- a/mp/game/invasion/resource/teamschemehuman.res +++ b/mp/game/invasion/resource/teamschemehuman.res @@ -720,10 +720,10 @@ TeamSchemeHuman CustomFontFiles { - 1 "resource/fonts/michroma/michroma.ttf" + 1 "resource/fonts/Michroma.ttf" 2 "resource/fonts/electr.ttf" - 3 "resource/fonts/oswald/Oswald-Regular.ttf" - 4 "resource/fonts/squada_one/SquadaOne-Regular.ttf" + 3 "resource/fonts/Oswald-Regular.ttf" + 4 "resource/fonts/SquadaOne-Regular.ttf" 5 "resource/fonts/CRYSRG__.TTF" } -} \ No newline at end of file +} From c860df4b0bba4409f284f5b28e52619c553b2b87 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sun, 31 Jan 2021 15:47:03 +0100 Subject: [PATCH 11/11] Fix Buttons not working on Linux with newer gcc The button mask is created by shifting a bit according to the MouseCode, which is just a renamed ButtonCode_t. Mouse buttons start at 107, which is way out of range for our ints. To fix this, introduce MouseButtonBit(), which checks if a button code corresponds to a mouse button at all and returns a usable bitmask for the corresponding mouse button code. This is then used for the button mask. --- mp/src/public/vgui/MouseCode.h | 9 +++++++++ mp/src/vgui2/vgui_controls/Button.cpp | 6 +++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/mp/src/public/vgui/MouseCode.h b/mp/src/public/vgui/MouseCode.h index 7ba162147af..9b13fc81423 100644 --- a/mp/src/public/vgui/MouseCode.h +++ b/mp/src/public/vgui/MouseCode.h @@ -18,6 +18,15 @@ namespace vgui { typedef ButtonCode_t MouseCode; + +static inline int MouseButtonBit(MouseCode code) +{ + if (code < MOUSE_FIRST || code > MOUSE_LAST) { + Assert(false); + return 0; + } + return 1 << (code - MOUSE_FIRST); +} } #endif // MOUSECODE_H diff --git a/mp/src/vgui2/vgui_controls/Button.cpp b/mp/src/vgui2/vgui_controls/Button.cpp index cceb8043544..406c3e13853 100644 --- a/mp/src/vgui2/vgui_controls/Button.cpp +++ b/mp/src/vgui2/vgui_controls/Button.cpp @@ -695,12 +695,12 @@ void Button::SetMouseClickEnabled(MouseCode code,bool state) if(state) { //set bit to 1 - _mouseClickMask|=1<<((int)(code+1)); + _mouseClickMask|=MouseButtonBit(code); } else { //set bit to 0 - _mouseClickMask&=~(1<<((int)(code+1))); + _mouseClickMask&=~MouseButtonBit(code); } } @@ -709,7 +709,7 @@ void Button::SetMouseClickEnabled(MouseCode code,bool state) //----------------------------------------------------------------------------- bool Button::IsMouseClickEnabled(MouseCode code) { - if(_mouseClickMask&(1<<((int)(code+1)))) + if(_mouseClickMask&MouseButtonBit(code)) { return true; }