Skip to content

Commit

Permalink
Merge pull request #2 from 1upD/dev
Browse files Browse the repository at this point in the history
Release 1.1
  • Loading branch information
1upD authored Dec 28, 2018
2 parents 00eb374 + 7111779 commit 672ce05
Show file tree
Hide file tree
Showing 33 changed files with 7,971 additions and 506 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,7 @@ config.cfg
# shader files
*.tmp

*.lib
*.filters
*.vpc_crc
*.sentinel
46 changes: 22 additions & 24 deletions mp/src/game/client/detailobjectsystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1471,25 +1471,6 @@ void CDetailObjectSystem::LevelInitPreEntity()
}
}

if ( m_DetailObjects.Count() || m_DetailSpriteDict.Count() )
{
// There are detail objects in the level, so precache the material
PrecacheMaterial( DETAIL_SPRITE_MATERIAL );
IMaterial *pMat = m_DetailSpriteMaterial;
// adjust for non-square textures (cropped)
float flRatio = (float)( pMat->GetMappingWidth() ) / pMat->GetMappingHeight();
if ( flRatio > 1.0 )
{
for( int i = 0; i<m_DetailSpriteDict.Count(); i++ )
{
m_DetailSpriteDict[i].m_TexUL.y *= flRatio;
m_DetailSpriteDict[i].m_TexLR.y *= flRatio;
m_DetailSpriteDictFlipped[i].m_TexUL.y *= flRatio;
m_DetailSpriteDictFlipped[i].m_TexLR.y *= flRatio;
}
}
}

int detailPropLightingLump;
if( g_pMaterialSystemHardwareConfig->GetHDRType() != HDR_TYPE_NONE )
{
Expand All @@ -1512,13 +1493,30 @@ void CDetailObjectSystem::LevelInitPreEntity()

void CDetailObjectSystem::LevelInitPostEntity()
{
const char *pDetailSpriteMaterial = DETAIL_SPRITE_MATERIAL;
C_World *pWorld = GetClientWorldEntity();
if ( pWorld && pWorld->GetDetailSpriteMaterial() && *(pWorld->GetDetailSpriteMaterial()) )
if ( m_DetailObjects.Count() || m_DetailSpriteDict.Count() )
{
pDetailSpriteMaterial = pWorld->GetDetailSpriteMaterial();
const char *pDetailSpriteMaterial = DETAIL_SPRITE_MATERIAL;
C_World *pWorld = GetClientWorldEntity();
if ( pWorld && pWorld->GetDetailSpriteMaterial() && *(pWorld->GetDetailSpriteMaterial()) )
pDetailSpriteMaterial = pWorld->GetDetailSpriteMaterial();

m_DetailSpriteMaterial.Init( pDetailSpriteMaterial, TEXTURE_GROUP_OTHER );
PrecacheMaterial( pDetailSpriteMaterial );
IMaterial *pMat = m_DetailSpriteMaterial;

// adjust for non-square textures (cropped)
float flRatio = pMat->GetMappingWidth() / pMat->GetMappingHeight();
if ( flRatio > 1.0 )
{
for( int i = 0; i<m_DetailSpriteDict.Count(); i++ )
{
m_DetailSpriteDict[i].m_TexUL.y *= flRatio;
m_DetailSpriteDict[i].m_TexLR.y *= flRatio;
m_DetailSpriteDictFlipped[i].m_TexUL.y *= flRatio;
m_DetailSpriteDictFlipped[i].m_TexLR.y *= flRatio;
}
}
}
m_DetailSpriteMaterial.Init( pDetailSpriteMaterial, TEXTURE_GROUP_OTHER );

if ( GetDetailController() )
{
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/server/hl2/npc_combine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2565,7 +2565,7 @@ void CNPC_Combine::SpeakSentence( int sentenceType )
//=========================================================
// PainSound
//=========================================================
void CNPC_Combine::PainSound ( void )
void CNPC_Combine::PainSound ( const CTakeDamageInfo &info )
{
// NOTE: The response system deals with this at the moment
if ( GetFlags() & FL_DISSOLVING )
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/server/hl2/npc_combine.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class CNPC_Combine : public CAI_BaseActor
// Sounds
// -------------
void DeathSound( void );
void PainSound( void );
void PainSound( const CTakeDamageInfo &info );
void IdleSound( void );
void AlertSound( void );
void LostEnemySound( void );
Expand Down
2 changes: 1 addition & 1 deletion mp/src/game/shared/hl2/hl2_gamerules.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ bool CHalfLife2::Damage_IsTimeBased( int iDmgType )
// Damage types that are time-based.
#ifdef HL2_EPISODIC
// This makes me think EP2 should have its own rules, but they are #ifdef all over in here.
return ( ( iDmgType & ( DMG_PARALYZE | DMG_NERVEGAS | DMG_POISON | DMG_RADIATION | DMG_DROWNRECOVER | DMG_SLOWBURN ) ) != 0 );
return ( ( iDmgType & ( DMG_PARALYZE | DMG_NERVEGAS | DMG_POISON | DMG_ACID | DMG_RADIATION | DMG_DROWNRECOVER | DMG_SLOWBURN ) ) != 0 );
#else
return BaseClass::Damage_IsTimeBased( iDmgType );
#endif
Expand Down
18 changes: 18 additions & 0 deletions sp/game/mod_episodic/bullsquid.fgd
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//=============================================================================
//
// Purpose: Half-Life 2 mod game definition file (.fgd)
// Defines new entities for bullsquid
//
//=============================================================================

@include "base.fgd"
@include "halflife2.fgd"

//-------------------------------------------------------------------------
//
// NPCs
//
//-------------------------------------------------------------------------
@NPCClass base(BaseNPC) studio(" "models/bullsquid.mdl" ) = npc_bullsquid : "Bullsquid"
[
]
11 changes: 11 additions & 0 deletions sp/game/mod_episodic/flaregun.fgd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
//=============================================================================
//
// Purpose: Half-Life 2 mod game definition file (.fgd)
// Defines new entities for the flaregun weapon
//
//=============================================================================

@include "halflife2.fgd"

@PointClass base(Item) studio("models/items/boxflares.mdl")= item_box_flare_rounds : "Box of Flare Rounds" []
@PointClass base(Weapon) studio("models/weapons/w_pistol.mdl") = weapon_flaregun : "Flaregun" []
Loading

0 comments on commit 672ce05

Please sign in to comment.