This commit is contained in:
I#Oleg 2025-01-21 14:08:18 +00:00 committed by GitHub
commit cdfd053e87
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
32 changed files with 548 additions and 292 deletions

4
build_waf.sh Normal file
View File

@ -0,0 +1,4 @@
./waf configure -T release --destdir=E:/source_engine --prefix=E:/source_engine --build-game=hl1 &&
./waf install --strip
# use can set --destdir and --prefix and set path , where you located source code

View File

@ -12,8 +12,8 @@
#include "hl1_clientscoreboard.h"
// default FOV for HL1
ConVar default_fov( "default_fov", "90", FCVAR_CHEAT );
ConVar fov_desired( "fov_desired", "90", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 110.0 );
ConVar default_fov( "default_fov", "110", FCVAR_CHEAT );
ConVar fov_desired( "fov_desired", "90", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 130.0 );
// The current client mode. Always ClientModeNormal in HL.
IClientMode *g_pClientMode = NULL;
@ -32,13 +32,9 @@ public:
virtual void LevelShutdown( void );
};
CHLModeManager::CHLModeManager( void )
{
}
CHLModeManager::CHLModeManager( void ) = default;
CHLModeManager::~CHLModeManager( void )
{
}
CHLModeManager::~CHLModeManager( void ) = default;
void CHLModeManager::Init( void )
{
@ -99,16 +95,12 @@ protected:
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
ClientModeHL1Normal::ClientModeHL1Normal()
{
}
ClientModeHL1Normal::ClientModeHL1Normal() = default;
//-----------------------------------------------------------------------------
// Purpose: If you don't know what a destructor is by now, you are probably going to get fired
//-----------------------------------------------------------------------------
ClientModeHL1Normal::~ClientModeHL1Normal()
{
}
ClientModeHL1Normal::~ClientModeHL1Normal() = default;
void ClientModeHL1Normal::InitViewport()
{

View File

@ -19,7 +19,7 @@
extern bool g_bRollingCredits;
ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 110.0 );
ConVar fov_desired( "fov_desired", "75", FCVAR_ARCHIVE | FCVAR_USERINFO, "Sets the base field-of-view.", true, 75.0, true, 150.0 );
//-----------------------------------------------------------------------------
// Globals
@ -70,9 +70,7 @@ ClientModeHLNormal::ClientModeHLNormal()
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
ClientModeHLNormal::~ClientModeHLNormal()
{
}
ClientModeHLNormal::~ClientModeHLNormal() = default;
//-----------------------------------------------------------------------------

View File

@ -367,7 +367,19 @@ int CNPC_Barney::OnTakeDamage_Alive( const CTakeDamageInfo &inputInfo )
{
Speak( BA_SHOT );
}
}
if (gpGlobals->curtime >= m_flPainTime)
{
m_flPainTime = gpGlobals->curtime + random->RandomFloat(0.5, 0.75);
CPASAttenuationFilter filter(this);
EmitSound(filter, entindex(), "Barney.Pain");
}
return ret;
}

View File

@ -88,8 +88,8 @@ enum
// Attack distance constants
#define BIG_ATTACKDIST 170
#define BIG_MORTARDIST 800
#define BIG_MAXCHILDREN 6 // Max # of live headcrab children
#define BIG_MORTARDIST 100
#define BIG_MAXCHILDREN 8 // Max # of live headcrab children
#define bits_MEMORY_CHILDPAIR (bits_MEMORY_CUSTOM1)

View File

@ -12,6 +12,7 @@
// $NoKeywords: $
//=============================================================================//
#include "ai_condition.h"
#include "cbase.h"
#include "beam_shared.h"
#include "ai_default.h"
@ -236,7 +237,7 @@ void CNPC_HGrunt::Spawn()
m_bloodColor = BLOOD_COLOR_RED;
ClearEffects();
m_iHealth = sk_hgrunt_health.GetFloat();
m_flFieldOfView = 0.2;// indicates the width of this monster's forward view cone ( as a dotproduct result )
m_flFieldOfView = 0.4;// indicates the width of this monster's forward view cone ( as a dotproduct result )
m_NPCState = NPC_STATE_NONE;
m_flNextGrenadeCheck = gpGlobals->curtime + 1;
m_flNextPainTime = gpGlobals->curtime;
@ -299,8 +300,25 @@ void CNPC_HGrunt::Spawn()
BaseClass::Spawn();
NPCInit();
CreateVPhysics();
}
bool CNPC_HGrunt::CreateVPhysics(void)
{
VPhysicsDestroyObject();
CPhysCollide* pModel = PhysCreateBbox(NAI_Hull::Mins(HULL_HUMAN), NAI_Hull::Maxs(HULL_HUMAN));
IPhysicsObject* pPhysics = PhysModelCreateCustom(this, pModel, GetAbsOrigin(), GetAbsAngles(), "barney_hull", false);
VPhysicsSetObject(pPhysics);
if (pPhysics)
{
pPhysics->SetCallbackFlags(CALLBACK_GLOBAL_COLLISION | CALLBACK_SHADOW_COLLISION);
}
PhysAddShadow(this);
return true;
}
int CNPC_HGrunt::IRelationPriority( CBaseEntity *pTarget )
{
//I hate alien grunts more than anything.
@ -425,10 +443,11 @@ void CNPC_HGrunt::PrescheduleThink ( void )
}
else
{
if ( gpGlobals->curtime - pSquadLeader->m_flLastEnemySightTime > 5 )
if ( gpGlobals->curtime - pSquadLeader->m_flLastEnemySightTime > 5.0f )
{
// been a while since we've seen the enemy
pSquadLeader->GetEnemies()->MarkAsEluded( GetEnemy() );
}
}
}
@ -624,6 +643,10 @@ int CNPC_HGrunt::RangeAttack1Conditions ( float flDot, float flDist )
// kick nonclients, but don't shoot at them.
return COND_NONE;
}
if (GetEnemy())
{
return COND_CAN_RANGE_ATTACK1;
}
Vector vecSrc;
QAngle angAngles;
@ -768,7 +791,7 @@ int CNPC_HGrunt::GetGrenadeConditions( float flDot, float flDist )
m_vecTossVelocity = vecToss;
// don't check again for a while.
m_flNextGrenadeCheck = gpGlobals->curtime + 0.3; // 1/3 second.
m_flNextGrenadeCheck = gpGlobals->curtime + 0.1; // 1/3 second.
return COND_CAN_RANGE_ATTACK2;
}
@ -1640,6 +1663,7 @@ int CNPC_HGrunt::SelectSchedule( void )
// little time and give the player a chance to turn.
if ( pSquadLeader && pSquadLeader->EnemyHasEludedMe() && !HasCondition ( COND_ENEMY_FACING_ME ) )
{
pSquadLeader->EnemyHasEludedMe(); // try to fix bug in chapter we`re all hostiles
return SCHED_GRUNT_FOUND_ENEMY;
}
}
@ -2557,7 +2581,14 @@ AI_BEGIN_CUSTOM_NPC( monster_human_grunt, CNPC_HGrunt )
AI_END_CUSTOM_NPC()
// Nothing , just shit
/* void MortarSpray(const Vector& position, const Vector& direction, int spriteModel, int count)
{
CPVSFilter filter(position);
te->SpriteSpray(filter, 0.0, &position, &direction, spriteModel, 200, 80, count);
}
*/
//=========================================================
// DEAD HGRUNT PROP
//=========================================================

View File

@ -24,6 +24,7 @@ public:
void PrescheduleThink ( void );
bool FOkToSpeak( void );
bool CreateVPhysics( void );
Class_T Classify ( void );
int RangeAttack1Conditions ( float flDot, float flDist );

View File

@ -936,13 +936,13 @@ void CNPC_Tentacle::HitTouch( CBaseEntity *pOther )
//as the ragdoll only covers the top portion of the tentacle.
if ( pOther->m_takedamage )
{
CTakeDamageInfo info( this, this, m_iHitDmg, DMG_CLUB );
CTakeDamageInfo info( this, this, m_iHitDmg, DMG_CLUB | DMG_ALWAYSGIB );
Vector vDamageForce = pOther->GetAbsOrigin() - GetAbsOrigin();
VectorNormalize( vDamageForce );
CalculateMeleeDamageForce( &info, vDamageForce, pOther->GetAbsOrigin());
pOther->TakeDamage( info );
m_flHitTime = gpGlobals->curtime + 0.5;
}

View File

@ -7,6 +7,7 @@
#include "cbase.h"
#include "hl1mp_basecombatweapon_shared.h"
#include "weapon_parse.h"
#ifdef CLIENT_DLL
#include "c_baseplayer.h"
@ -22,6 +23,7 @@
#include "mathlib/mathlib.h"
#include "in_buttons.h"
#include "vstdlib/random.h"
extern ConVar sk_plr_dmg_crowbar;
@ -63,7 +65,7 @@ private:
virtual void Swing( void );
virtual void Hit( void );
virtual void ImpactEffect( void );
void ImpactSound( CBaseEntity *pHitEntity );
void ImpactSound( bool isWorld , trace_t &hitTrace , CBaseEntity *pHitEntity);
virtual Activity ChooseIntersectionPointAndActivity( trace_t &hitTrace, const Vector &mins, const Vector &maxs, CBasePlayer *pOwner );
public:
@ -184,8 +186,9 @@ void CWeaponCrowbar::Hit( void )
TraceAttackToTriggers( CTakeDamageInfo( GetOwner(), GetOwner(), sk_plr_dmg_crowbar.GetFloat(), DMG_CLUB ), m_traceHit.startpos, m_traceHit.endpos, hitDirection );
//Play an impact sound
ImpactSound( pHitEntity );
ImpactSound( pHitEntity->Classify() == CLASS_NONE || pHitEntity->Classify() == CLASS_MACHINE, m_traceHit , pHitEntity );
}
#endif
//Apply an impact effect
@ -197,23 +200,31 @@ void CWeaponCrowbar::Hit( void )
// Input : pHitEntity - entity that we hit
// assumes pHitEntity is not null
//-----------------------------------------------------------------------------
void CWeaponCrowbar::ImpactSound( CBaseEntity *pHitEntity )
void CWeaponCrowbar::ImpactSound( bool isWorld , trace_t &hitTrace , CBaseEntity *pHitEntity )
{
bool bIsWorld = ( pHitEntity->entindex() == 0 );
bool IsWorld = ( pHitEntity->entindex() );
#ifndef CLIENT_DLL
if ( !bIsWorld )
if ( !isWorld )
{
bIsWorld |= pHitEntity->Classify() == CLASS_NONE || pHitEntity->Classify() == CLASS_MACHINE;
isWorld |= pHitEntity->Classify() == CLASS_NONE || pHitEntity->Classify() == CLASS_MACHINE;
}
#endif
if( bIsWorld )
if( isWorld )
{
switch (random->RandomInt(0, 1))
{
case 0:
WeaponSound( MELEE_HIT_WORLD );
break;
case 1:
WeaponSound( MELEE_HIT );
break;
}
}
else
{
WeaponSound( MELEE_HIT );
WeaponSound( MELEE_MISS );
}
}

View File

@ -112,7 +112,7 @@ void CWeapon357::PrimaryAttack( void )
else
{
WeaponSound( EMPTY );
m_flNextPrimaryAttack = 0.15;
m_flNextPrimaryAttack = 0.1;
}
return;

View File

@ -18,10 +18,10 @@
// Armor given by a battery
#define MAX_NORMAL_BATTERY 100
#define MAX_NORMAL_BATTERY 200
// Ammo counts given by ammo items
#define SIZE_AMMO_PISTOL 20
#define SIZE_AMMO_PISTOL 18
#define SIZE_AMMO_PISTOL_LARGE 100
#define SIZE_AMMO_SMG1 45
#define SIZE_AMMO_SMG1_LARGE 225
@ -31,7 +31,7 @@
#define SIZE_AMMO_SMG1_GRENADE 1
#define SIZE_AMMO_BUCKSHOT 20
#define SIZE_AMMO_357 6
#define SIZE_AMMO_357_LARGE 20
#define SIZE_AMMO_357_LARGE 80
#define SIZE_AMMO_CROSSBOW 6
#define SIZE_AMMO_AR2_ALTFIRE 1

View File

@ -859,7 +859,7 @@ void CGameRules::ClientSettingsChanged( CBasePlayer *pPlayer )
if ( pszFov )
{
int iFov = atoi(pszFov);
iFov = clamp( iFov, 75, 110 );
iFov = clamp( iFov, 75, 150 );
pPlayer->SetDefaultFOV( iFov );
}

View File

@ -232,7 +232,7 @@ enum CastVote
#define MAX_PLACE_NAME_LENGTH 18
#define MAX_FOV 110
#define MAX_FOV 150
//===================================================================================================================
// Team Defines

View File

@ -233,6 +233,10 @@ $Project "GameUI"
$File "OptionsSubVideo.h"
$File "OptionsSubVoice.cpp"
$File "OptionsSubVoice.h"
$File "OptionsSubModificcation.cpp"
$File "OptionsSubModificcation.h"
}
$Folder "Link Libraries"

View File

@ -29,6 +29,7 @@
#include "OptionsSubMultiplayer.h"
#include "OptionsSubDifficulty.h"
#include "OptionsSubPortal.h"
#include "OptionsSubModification.h"
#ifdef WIN32
// NVNT haptic configuration dialog
#include "OptionsSubHaptics.h"
@ -94,7 +95,10 @@ COptionsDialog::COptionsDialog(vgui::Panel *parent) : PropertyDialog(parent, "Op
m_pOptionsSubAudio = new COptionsSubAudio(this);
AddPage(m_pOptionsSubAudio, "#GameUI_Audio");
m_pOptionsSubVideo = new COptionsSubVideo(this);
AddPage(m_pOptionsSubVideo, "#GameUI_Video");
AddPage(new COptionsSubModification(this), "ModInfo");
AddPage(new COptionsSubPortal(this), "#GameUI_Portal");
if ( !ModInfo().IsSinglePlayerOnly() )
{
@ -119,9 +123,7 @@ COptionsDialog::COptionsDialog(vgui::Panel *parent) : PropertyDialog(parent, "Op
//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
COptionsDialog::~COptionsDialog()
{
}
COptionsDialog::~COptionsDialog() = default;
//-----------------------------------------------------------------------------
// Purpose: Brings the dialog to the fore

View File

@ -7,6 +7,7 @@
#ifndef OPTIONSDIALOG_H
#define OPTIONSDIALOG_H
#include "OptionsSubModification.h"
#ifdef _WIN32
#pragma once
#endif
@ -37,6 +38,7 @@ public:
private:
class COptionsSubAudio *m_pOptionsSubAudio;
class COptionsSubVideo *m_pOptionsSubVideo;
class COptionsSubModification *m_pOptionsSubModification;
vgui::PropertyPage *m_pOptionsSubMultiplayer;
};

View File

@ -72,9 +72,7 @@ COptionsSubAudio::COptionsSubAudio(vgui::Panel *parent) : PropertyPage(parent, N
//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
COptionsSubAudio::~COptionsSubAudio()
{
}
COptionsSubAudio::~COptionsSubAudio() = default;
//-----------------------------------------------------------------------------
// Purpose: Reloads data

View File

@ -67,6 +67,7 @@ void COptionsSubDifficulty::OnApplyChanges()
{
var.SetValue( 2 );
}
}

View File

@ -22,9 +22,7 @@ COptionsSubGame::COptionsSubGame( vgui::Panel *parent, const char *name ) : Base
//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
COptionsSubGame::~COptionsSubGame()
{
}
COptionsSubGame::~COptionsSubGame() = default;
void COptionsSubGame::OnClose( void )
{

View File

@ -0,0 +1,143 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include "OptionsSubModification.h"
#include "CvarSlider.h"
#include "CvarToggleCheckButton.h"
#include "EngineInterface.h"
#include <KeyValues.h>
#include <vgui/IScheme.h>
#include "vgui_controls/Controls.h"
#include <vgui_controls/TextEntry.h>
// memdbgon must be the last include file in a .cpp file!!!
#include <tier0/memdbgon.h>
using namespace vgui;
COptionsSubModification::COptionsSubModification(vgui::Panel *parent) : PropertyPage(parent, nullptr)
{
// Create the slider for aspect ratio adjustments
m_pAspectRatioSlider = new CCvarSlider(
this,
"AspectRatioSlider",
"Aspect Ratio",
0.1f, 3.0f, // Slider range: 0.1 to 3.0
"r_aspectratio",
true // Allow fractional values
);
m_pAspectRatioLabel = new TextEntry(this, "AspectRatioLabel");
m_pAspectRatioLabel->AddActionSignalTarget(this);
m_pChangeCheatFlag = new CCvarToggleCheckButton(
this , "ChangeCheatFlag" , "Change Cheat Flag" , "sv_cheats"
);
m_pGiveWeaponButton = new Button(this, "GiveWeapon", "Give Weapon");
// Load settings from the associated resource file
LoadControlSettings("Resource\\OptionsSubModification.res");
m_pGiveWeaponButton->SetCommand("GiveWeapon");
m_pGiveWeaponButton->AddActionSignalTarget(this);
m_pGiveHealthKitButton = new Button(this, "GiveHealthKit", "Give Health Kit");
m_pGiveHealthKitButton->SetCommand("GiveHealthKit");
m_pGiveHealthKitButton->AddActionSignalTarget(this);
UpdateLabel(m_pAspectRatioSlider, m_pAspectRatioLabel);
m_pGiveWeaponButton->SetEnabled(true);
}
COptionsSubModification::~COptionsSubModification() = default;
void COptionsSubModification::OnTextChanged(Panel *panel)
{
if (panel == m_pAspectRatioLabel)
{
char buf[64];
m_pAspectRatioLabel->GetText(buf, 64);
float fValue;
int numParsed = sscanf(buf, "%f", &fValue);
if ((numParsed == 1) && (fValue >= 0.0f))
{
m_pAspectRatioSlider->SetSliderValue(fValue);
PostActionSignal(new KeyValues("ApplyButtonEnable"));
}
}
}
//-----------------------------------------------------------------------------
// Purpose: Resets the data to the initial state
//-----------------------------------------------------------------------------
void COptionsSubModification::OnResetData()
{
m_pAspectRatioSlider->Reset();
m_pChangeCheatFlag->Reset();
}
//-----------------------------------------------------------------------------
// Purpose: Applies changes made by the user
//-----------------------------------------------------------------------------
void COptionsSubModification::OnApplyChanges()
{
m_pAspectRatioSlider->ApplyChanges();
m_pChangeCheatFlag->ApplyChanges();
}
//-----------------------------------------------------------------------------
// Purpose: Handles slider modifications
//-----------------------------------------------------------------------------
void COptionsSubModification::OnControlModified(Panel *panel)
{
PostActionSignal(new KeyValues("ApplyButtonEnable"));
// Update the label based on slider changes
if (panel == m_pAspectRatioSlider && m_pAspectRatioSlider->HasBeenModified())
{
UpdateLabel(m_pAspectRatioSlider, m_pAspectRatioLabel);
}
}
//-----------------------------------------------------------------------------
// Purpose: Sets scheme-specific properties
//-----------------------------------------------------------------------------
void COptionsSubModification::ApplySchemeSettings(IScheme *pScheme)
{
BaseClass::ApplySchemeSettings(pScheme);
}
//-----------------------------------------------------------------------------
// Purpose: Updates the label text based on slider value
//-----------------------------------------------------------------------------
void COptionsSubModification::UpdateLabel(CCvarSlider *slider, vgui::TextEntry *label)
{
char buf[64];
Q_snprintf(buf, sizeof(buf), "%.2f", slider->GetSliderValue());
label->SetText(buf);
}
void COptionsSubModification::OnCommand(const char *command)
{
if (!stricmp(command, "GiveWeapon"))
{
engine->ExecuteClientCmd("impulse 101");
Msg("GiveWeapon command triggered\n"); // Debug message
}
if(!stricmp(command, "GiveHealthKit"))
{
engine->ExecuteClientCmd("give item_healthkit");
Msg("GiveHealthKit command triggered\n");
}
else
{
BaseClass::OnCommand(command); // Make sure to call the base class for any other commands
}
}

View File

@ -0,0 +1,67 @@
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//=============================================================================//
#ifndef OPTIONS_SUB_MODIFICATION_H
#define OPTIONS_SUB_MODIFICATION_H
#include "vgui_controls/Button.h"
#ifdef _WIN32
#pragma once
#endif
#include <vgui_controls/PropertyPage.h>
class CCvarNegateCheckButton;
class CKeyToggleCheckButton;
class CCvarToggleCheckButton;
class CCvarSlider;
namespace vgui
{
class Label;
class Panel;
}
class VControlsListPanel;
//-----------------------------------------------------------------------------
// Purpose: Touch Details, Part of OptionsDialog
//-----------------------------------------------------------------------------
class COptionsSubModification : public vgui::PropertyPage
{
DECLARE_CLASS_SIMPLE(COptionsSubModification, vgui::PropertyPage);
public:
COptionsSubModification(vgui::Panel *parent);
~COptionsSubModification();
virtual void OnResetData();
virtual void OnApplyChanges();
virtual void OnCommand(const char *command);
protected:
virtual void ApplySchemeSettings(vgui::IScheme *pScheme);
MESSAGE_FUNC_PTR(OnControlModified, "ControlModified", panel);
MESSAGE_FUNC_PTR(OnTextChanged, "TextChanged", panel);
MESSAGE_FUNC_PTR(OnCheckButtonChecked, "CheckButtonChecked", panel)
{
OnControlModified(panel);
}
void UpdateLabel(CCvarSlider *slider, vgui::TextEntry *label);
private:
vgui::TextEntry *m_pAspectRatioLabel;
vgui::Button *m_pGiveWeaponButton;
vgui::Button *m_pGiveHealthKitButton;
CCvarToggleCheckButton *m_pChangeCheatFlag;
CCvarSlider *m_pAspectRatioSlider;
};
#endif // OPTIONS_SUB_MODIFICATION_H

View File

@ -7,7 +7,7 @@
//=============================================================================//
#include "OptionsSubMouse.h"
// #include "CommandCheckButton.h"
#include "KeyToggleCheckButton.h"
//#include "KeyToggleCheckButton.h" (Not used direcly)
#include "CvarNegateCheckButton.h"
#include "CvarToggleCheckButton.h"
#include "cvarslider.h"
@ -49,7 +49,6 @@ COptionsSubMouse::COptionsSubMouse(vgui::Panel *parent) : PropertyPage(parent, N
"MouseAccelerationCheckbox",
"#GameUI_MouseCustomAccel");
m_pJoystickCheckBox = new CCvarToggleCheckButton(
this,
"Joystick",
@ -105,9 +104,7 @@ COptionsSubMouse::COptionsSubMouse(vgui::Panel *parent) : PropertyPage(parent, N
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
COptionsSubMouse::~COptionsSubMouse()
{
}
COptionsSubMouse::~COptionsSubMouse() = default;
//-----------------------------------------------------------------------------
// Purpose:
@ -217,7 +214,7 @@ void COptionsSubMouse::OnTextChanged(Panel *panel)
char buf[64];
m_pMouseAccelExponentLabel->GetText(buf, 64);
float fValue = (float) atof(buf);
float fValue = atof(buf);
if (fValue >= 1.0)
{
m_pMouseAccelExponentSlider->SetSliderValue(fValue);
@ -236,7 +233,6 @@ void COptionsSubMouse::UpdateSensitivityLabel()
m_pMouseSensitivityLabel->SetText(buf);
}
void COptionsSubMouse::UpdateAccelerationLabel()
{
char buf[64];
@ -244,7 +240,6 @@ void COptionsSubMouse::UpdateAccelerationLabel()
m_pMouseAccelExponentLabel->SetText(buf);
}
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------

View File

@ -89,9 +89,7 @@ COptionsSubTouch::COptionsSubTouch(vgui::Panel *parent) : PropertyPage(parent, N
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
COptionsSubTouch::~COptionsSubTouch()
{
}
COptionsSubTouch::~COptionsSubTouch() = default;
//-----------------------------------------------------------------------------
// Purpose:

View File

@ -1070,7 +1070,7 @@ COptionsSubVideo::COptionsSubVideo(vgui::Panel *parent) : PropertyPage(parent, N
break;
}
#else
int iNormalItemID = m_pAspectRatio->AddItem( "lemonparty.org", NULL );
int iNormalItemID = m_pAspectRatio->AddItem( "NULL", NULL );
m_pAspectRatio->ActivateItem( iNormalItemID );
m_pGammaButton->SetEnabled(false);
@ -1544,6 +1544,7 @@ void COptionsSubVideo::OnApplyChanges()
bConfigChanged = true;
}
#if defined( USE_SDL )
if ( !windowed )
{

View File

@ -53,7 +53,6 @@ CSaveGameDialog::CSaveGameDialog(vgui::Panel *parent) : BaseClass(parent, "SaveG
CSaveGameDialog::~CSaveGameDialog()
{
}
//-----------------------------------------------------------------------------
// Purpose: Saves game
//-----------------------------------------------------------------------------

View File

@ -57,9 +57,7 @@ CVGuiSystemModuleLoader::CVGuiSystemModuleLoader()
//-----------------------------------------------------------------------------
// Purpose: Destructor
//-----------------------------------------------------------------------------
CVGuiSystemModuleLoader::~CVGuiSystemModuleLoader()
{
}
CVGuiSystemModuleLoader::~CVGuiSystemModuleLoader() = default;
//-----------------------------------------------------------------------------
// Purpose: returns true if the module loader has acquired the platform mutex and loaded the modules

View File

@ -93,6 +93,7 @@ def build(bld):
'OptionsSubPortal.cpp',
'OptionsSubVideo.cpp',
'OptionsSubVoice.cpp',
'OptionsSubModification.cpp', #added new page
'../public/tier0/memoverride.cpp',
]

View File

@ -3612,7 +3612,7 @@ bool CDynamicMeshDX8::HasEnoughRoom( int nVertexCount, int nIndexCount ) const
if ( g_pShaderDeviceDx8->IsDeactivated() )
return false;
Assert( m_pVertexBuffer != NULL );
//Assert( m_pVertexBuffer != NULL );
// We need space in both the vertex and index buffer
return m_pVertexBuffer->HasEnoughRoom( nVertexCount ) &&

View File

@ -1739,7 +1739,7 @@ jpeg_fdct_13x13 (DCTELEM * data, JSAMPARRAY sample_data, JDIMENSION start_col)
MULTIPLY(tmp1 - tmp5, FIX(0.239678205)); /* (c8-c12)/2 */
z2 = MULTIPLY(tmp0 + tmp2, FIX(0.073342435)) - /* (c4-c6)/2 */
MULTIPLY(tmp3 + tmp4, FIX(0.709910013)) + /* (c2+c10)/2 */
MULTIPLY(tmp1 + tmp5, FIX(0.368787494)); /* (c8+c12)/2 */
MULTIPLY(tmp1 + t, FIX(0.368787494)); /* (c8+c12)/2 */
dataptr[DCTSIZE*4] = (DCTELEM) DESCALE(z1 + z2, CONST_BITS+1);
dataptr[DCTSIZE*6] = (DCTELEM) DESCALE(z1 - z2, CONST_BITS+1);

View File

@ -24,6 +24,7 @@
#include "pixelwriter.h"
#include "tier2/tier2.h"
#include "platform.h"
#include <iostream>
#if defined ( WIN32 )
@ -340,8 +341,8 @@ VideoResult_t CQuickTimeVideoSubSystem::PlayVideoFileFullScreen( const char *fil
// what size do we set the output rect to?
// Integral scaling is much faster, so always scale the video as such
int nNewWidth = (int) theQTMovieRect.right;
int nNewHeight = (int) theQTMovieRect.bottom;
int nNewWidth = static_cast<int>theQTMovieRect.right;
int nNewHeight = static_cast<int>theQTMovieRect.bottom;
// Determine the window we are rendering video into
int displayWidth = windowWidth;

View File

@ -538,7 +538,7 @@ def configure(conf):
else:
cflags += [
'/I'+os.path.abspath('.')+'/thirdparty/SDL',
'/arch:SSE' if conf.env.DEST_CPU == 'x86' else '/arch:AVX',
#'/arch:SSE' if conf.env.DEST_CPU == 'x86' else '/arch:AVX', (no AVX Support)
'/GF',
'/Gy',
'/fp:fast',
@ -548,7 +548,6 @@ def configure(conf):
'/TP',
'/EHsc'
]
if conf.options.BUILD_TYPE == 'debug':
linkflags += [
'/FORCE:MULTIPLE',