fpersmissive fixes

This commit is contained in:
nillerusr
2022-06-15 21:59:06 +03:00
parent 29db778997
commit b06620b8c9
43 changed files with 220 additions and 185 deletions
+1 -1
View File
@@ -968,7 +968,7 @@ void C_ParticleSmokeGrenade::CleanupToolRecordingState( KeyValues *msg )
pLifetime->SetFloat( "maxLifetime", m_FadeEndTime );
KeyValues *pVelocity = pInitializers->FindKey( "DmeAttachmentVelocityInitializer", true );
pVelocity->SetPtr( "entindex", (void*)entindex() );
pVelocity->SetPtr( "entindex", (void*)(intp)entindex() );
pVelocity->SetFloat( "minRandomSpeed", 10 );
pVelocity->SetFloat( "maxRandomSpeed", 20 );
+3 -3
View File
@@ -418,7 +418,7 @@ void C_SmokeTrail::CleanupToolRecordingState( KeyValues *msg )
// FIXME: Until we can interpolate ent logs during emission, this can't work
KeyValues *pPosition = pInitializers->FindKey( "DmePositionPointToEntityInitializer", true );
pPosition->SetPtr( "entindex", (void*)pEnt->entindex() );
pPosition->SetPtr( "entindex", (void*)(intp)pEnt->entindex() );
pPosition->SetInt( "attachmentIndex", m_nAttachment );
pPosition->SetFloat( "randomDist", m_SpawnRadius );
pPosition->SetFloat( "startx", pEnt->GetAbsOrigin().x );
@@ -430,7 +430,7 @@ void C_SmokeTrail::CleanupToolRecordingState( KeyValues *msg )
pLifetime->SetFloat( "maxLifetime", m_ParticleLifetime );
KeyValues *pVelocity = pInitializers->FindKey( "DmeAttachmentVelocityInitializer", true );
pVelocity->SetPtr( "entindex", (void*)entindex() );
pVelocity->SetPtr( "entindex", (void*)(intp)entindex() );
pVelocity->SetFloat( "minAttachmentSpeed", m_MinDirectedSpeed );
pVelocity->SetFloat( "maxAttachmentSpeed", m_MaxDirectedSpeed );
pVelocity->SetFloat( "minRandomSpeed", m_MinSpeed );
@@ -1933,7 +1933,7 @@ void C_DustTrail::CleanupToolRecordingState( KeyValues *msg )
// FIXME: Until we can interpolate ent logs during emission, this can't work
KeyValues *pPosition = pInitializers->FindKey( "DmePositionPointToEntityInitializer", true );
pPosition->SetPtr( "entindex", (void*)pEnt->entindex() );
pPosition->SetPtr( "entindex", (void*)(intp)pEnt->entindex() );
pPosition->SetInt( "attachmentIndex", GetParentAttachment() );
pPosition->SetFloat( "randomDist", m_SpawnRadius );
pPosition->SetFloat( "startx", pEnt->GetAbsOrigin().x );
+2 -2
View File
@@ -132,7 +132,7 @@ static void RecordEffect( const char *pEffectName, const CEffectData &data )
msg->SetInt( "attachmentindex", data.m_nAttachmentIndex );
// NOTE: Ptrs are our way of indicating it's an entindex
msg->SetPtr( "entindex", (void*)data.entindex() );
msg->SetPtr( "entindex", (void*)(intp)data.entindex() );
ToolFramework_PostToolMessage( HTOOLHANDLE_INVALID, msg );
msg->deleteThis();
@@ -213,7 +213,7 @@ void TE_DispatchEffect( IRecipientFilter& filter, float delay, KeyValues *pKeyVa
// NOTE: Ptrs are our way of indicating it's an entindex
ClientEntityHandle_t hWorld = ClientEntityList().EntIndexToHandle( 0 );
data.m_hEntity = (intp)pKeyValues->GetPtr( "entindex", (void*)hWorld.ToInt() );
data.m_hEntity = (intp)pKeyValues->GetPtr( "entindex", (void*)(intp)hWorld.ToInt() );
const char *pEffectName = pKeyValues->GetString( "effectname" );
+1 -1
View File
@@ -240,7 +240,7 @@ void TE_PlayerDecal( IRecipientFilter& filter, float delay,
color32 rgbaColor = { 255, 255, 255, 255 };
effects->PlayerDecalShoot(
logo,
(void *)player,
(void *)(intp)player,
entity,
ent->GetModel(),
ent->GetAbsOrigin(),
+1 -1
View File
@@ -403,7 +403,7 @@ void FX_MuzzleEffectAttached(
KeyValues *pInitializers = pEmitter->FindKey( "initializers", true );
KeyValues *pPosition = pInitializers->FindKey( "DmeLinearAttachedPositionInitializer", true );
pPosition->SetPtr( "entindex", (void*)pEnt->entindex() );
pPosition->SetPtr( "entindex", (void*)(intp)pEnt->entindex() );
pPosition->SetInt( "attachmentIndex", attachmentIndex );
pPosition->SetFloat( "linearOffsetX", 2.0f * scale );
+1 -1
View File
@@ -11,7 +11,7 @@
#include "cbase.h"
#ifdef POSIX
#define HICON int
#define HICON intp
const int DT_LEFT = 1;
const int DT_CENTER = 2;
const int DT_RIGHT = 3;
+1 -1
View File
@@ -1014,7 +1014,7 @@ bool CParticleEffectBinding::RecalculateBoundingBox()
CEffectMaterial* CParticleEffectBinding::GetEffectMaterial( CParticleSubTexture *pSubTexture )
{
// Hash the IMaterial pointer.
unsigned int index = (((unsigned int)pSubTexture->m_pGroup) >> 6) % EFFECT_MATERIAL_HASH_SIZE;
unsigned int index = (((intp)pSubTexture->m_pGroup) >> 6) % EFFECT_MATERIAL_HASH_SIZE;
for ( CEffectMaterial *pCur=m_EffectMaterialHash[index]; pCur; pCur = pCur->m_pHashedNext )
{
if ( pCur->m_pGroup == pSubTexture->m_pGroup )
+1 -1
View File
@@ -2845,7 +2845,7 @@ AI_FollowGroup_t *CAI_FollowManager::FindFollowerGroup( CBaseEntity *pFollower )
{
for ( int i = 0; i < m_groups.Count(); i++ )
{
int h = m_groups[i]->followers.Head();
intp h = m_groups[i]->followers.Head();
while( h != m_groups[i]->followers.InvalidIndex() )
{
AI_Follower_t *p = &m_groups[i]->followers[h];
+3 -3
View File
@@ -729,7 +729,7 @@ CAI_Hint *CAI_HintManager::GetFirstHint( AIHintIter_t *pIter )
{
if ( !gm_AllHints.Count() )
{
*pIter = (AIHintIter_t)gm_AllHints.InvalidIndex();
*pIter = (AIHintIter_t)(intp)gm_AllHints.InvalidIndex();
return NULL;
}
*pIter = (AIHintIter_t)0;
@@ -743,10 +743,10 @@ CAI_Hint *CAI_HintManager::GetNextHint( AIHintIter_t *pIter )
{
if ( (intp)*pIter != gm_AllHints.InvalidIndex() )
{
int i = ( (intp)*pIter ) + 1;
intp i = ( (intp)*pIter ) + 1;
if ( gm_AllHints.Count() <= i )
{
*pIter = (AIHintIter_t)gm_AllHints.InvalidIndex();
*pIter = (AIHintIter_t)(intp)gm_AllHints.InvalidIndex();
return NULL;
}
*pIter = (AIHintIter_t)i;
+2 -2
View File
@@ -176,7 +176,7 @@ CAI_Enemies::~CAI_Enemies()
AI_EnemyInfo_t *CAI_Enemies::GetFirst( AIEnemiesIter_t *pIter )
{
CMemMap::IndexType_t i = m_Map.FirstInorder();
*pIter = (AIEnemiesIter_t)(unsigned)i;
*pIter = (AIEnemiesIter_t)(uintp)i;
if ( i == m_Map.InvalidIndex() )
return NULL;
@@ -197,7 +197,7 @@ AI_EnemyInfo_t *CAI_Enemies::GetNext( AIEnemiesIter_t *pIter )
return NULL;
i = m_Map.NextInorder( i );
*pIter = (AIEnemiesIter_t)(unsigned)i;
*pIter = (AIEnemiesIter_t)(uintp)i;
if ( i == m_Map.InvalidIndex() )
return NULL;
+1 -1
View File
@@ -1224,7 +1224,7 @@ AI_PathNode_t CAI_Navigator::GetNearestNode()
#ifdef WIN32
COMPILE_TIME_ASSERT( (int)AIN_NO_NODE == NO_NODE );
#endif
return (AI_PathNode_t)( GetPathfinder()->NearestNodeToNPC() );
return (AI_PathNode_t)(intp)( GetPathfinder()->NearestNodeToNPC() );
}
//-----------------------------------------------------------------------------
+2 -2
View File
@@ -573,7 +573,7 @@ CSound* CAI_Senses::GetFirstHeardSound( AISoundIter_t *pIter )
return NULL;
}
*pIter = (AISoundIter_t)iFirst;
*pIter = (AISoundIter_t)(intp)iFirst;
return CSoundEnt::SoundPointerForIndex( iFirst );
}
@@ -584,7 +584,7 @@ CSound* CAI_Senses::GetNextHeardSound( AISoundIter_t *pIter )
if ( !*pIter )
return NULL;
int iCurrent = (intp)*pIter;
intp iCurrent = (intp)*pIter;
Assert( iCurrent != SOUNDLIST_EMPTY );
if ( iCurrent == SOUNDLIST_EMPTY )
+1 -1
View File
@@ -420,7 +420,7 @@ CAI_BaseNPC *CAI_Squad::GetLeader( void )
//-----------------------------------------------------------------------------
CAI_BaseNPC *CAI_Squad::GetFirstMember( AISquadIter_t *pIter, bool bIgnoreSilentMembers )
{
int i = 0;
intp i = 0;
if ( bIgnoreSilentMembers )
{
for ( ; i < m_SquadMembers.Count(); i++ )
+1 -1
View File
@@ -49,7 +49,7 @@ const char *TaskFailureToString( AI_TaskFailureCode_t code )
{
const char *pszResult;
if ( code < 0 || code >= NUM_FAIL_CODES )
pszResult = (const char *)code;
pszResult = (const char *)(intp)code;
else
pszResult = g_ppszTaskFailureText[code];
return pszResult;
+2 -2
View File
@@ -2612,7 +2612,7 @@ void CNPC_MetroPolice::IdleSound( void )
if ( m_Sentences.Speak( pQuestion[bIsCriminal][nQuestionType] ) >= 0 )
{
GetSquad()->BroadcastInteraction( g_interactionMetrocopIdleChatter, (void*)(METROPOLICE_CHATTER_RESPONSE + nQuestionType), this );
GetSquad()->BroadcastInteraction( g_interactionMetrocopIdleChatter, (void*)(intp)(METROPOLICE_CHATTER_RESPONSE + nQuestionType), this );
m_nIdleChatterType = METROPOLICE_CHATTER_WAIT_FOR_RESPONSE;
}
}
@@ -2983,7 +2983,7 @@ bool CNPC_MetroPolice::HandleInteraction(int interactionType, void *data, CBaseC
if ( interactionType == g_interactionMetrocopIdleChatter )
{
m_nIdleChatterType = (int)data;
m_nIdleChatterType = (intp)data;
return true;
}
+2 -2
View File
@@ -1068,7 +1068,7 @@ void CCollisionEvent::FluidStartTouch( IPhysicsObject *pObject, IPhysicsFluidCon
return;
pEntity->AddEFlags( EFL_TOUCHING_FLUID );
pEntity->OnEntityEvent( ENTITY_EVENT_WATER_TOUCH, (void*)pFluid->GetContents() );
pEntity->OnEntityEvent( ENTITY_EVENT_WATER_TOUCH, (void*)(intp)pFluid->GetContents() );
float timeSinceLastCollision = DeltaTimeSinceLastFluid( pEntity );
if ( timeSinceLastCollision < 0.5f )
@@ -1124,7 +1124,7 @@ void CCollisionEvent::FluidEndTouch( IPhysicsObject *pObject, IPhysicsFluidContr
}
pEntity->RemoveEFlags( EFL_TOUCHING_FLUID );
pEntity->OnEntityEvent( ENTITY_EVENT_WATER_UNTOUCH, (void*)pFluid->GetContents() );
pEntity->OnEntityEvent( ENTITY_EVENT_WATER_UNTOUCH, (void*)(intp)pFluid->GetContents() );
}
class CSkipKeys : public IVPhysicsKeyHandler
+2 -2
View File
@@ -2076,7 +2076,7 @@ public:
{
if ( ARRAYSIZE( g_NameMap ) != CChoreoEvent::NUM_TYPES )
{
Error( "g_NameMap contains %i entries, CChoreoEvent::NUM_TYPES == %i!",
Error( "g_NameMap contains %zd entries, CChoreoEvent::NUM_TYPES == %i!",
ARRAYSIZE( g_NameMap ), CChoreoEvent::NUM_TYPES );
}
for ( int i = 0; i < CChoreoEvent::NUM_TYPES; ++i )
@@ -2158,7 +2158,7 @@ public:
{
if ( ARRAYSIZE( g_CCNameMap ) != CChoreoEvent::NUM_CC_TYPES )
{
Error( "g_CCNameMap contains %i entries, CChoreoEvent::NUM_CC_TYPES == %i!",
Error( "g_CCNameMap contains %zd entries, CChoreoEvent::NUM_CC_TYPES == %i!",
ARRAYSIZE( g_CCNameMap ), CChoreoEvent::NUM_CC_TYPES );
}
for ( int i = 0; i < CChoreoEvent::NUM_CC_TYPES; ++i )
+1 -1
View File
@@ -368,7 +368,7 @@ bool CSceneImage::CreateSceneImageFile( CUtlBuffer &targetBuffer, char const *pc
if ( !bQuiet )
{
Msg( "Scenes: String Table: %d bytes\n", stringOffsets.Count() * sizeof( int ) );
Msg( "Scenes: String Table: %zd bytes\n", stringOffsets.Count() * sizeof( int ) );
Msg( "Scenes: String Pool: %d bytes\n", stringPool.TellMaxPut() );
}