diff --git a/src/game/client/clientshadowmgr.cpp b/src/game/client/clientshadowmgr.cpp index d95ade3a..b1177ff3 100644 --- a/src/game/client/clientshadowmgr.cpp +++ b/src/game/client/clientshadowmgr.cpp @@ -4556,7 +4556,7 @@ void CClientShadowMgr::ComputeShadowDepthTextures( const CViewSetup &viewSetup ) #ifdef MAPBASE if ( j <= ( INT_FLASHLIGHT_DEPTHTEXTURE_FALLBACK_LAST - INT_FLASHLIGHT_DEPTHTEXTURE_FALLBACK_FIRST ) ) { - pRenderContext->SetIntRenderingParameter( INT_FLASHLIGHT_DEPTHTEXTURE_FALLBACK_FIRST + j, int((ITexture*)shadowDepthTexture) ); + pRenderContext->SetIntRenderingParameter( INT_FLASHLIGHT_DEPTHTEXTURE_FALLBACK_FIRST + j, intp((ITexture*)shadowDepthTexture) ); FlashlightState_t state = shadowmgr->GetFlashlightState( shadow.m_ShadowHandle ); diff --git a/src/game/server/baseentity.cpp b/src/game/server/baseentity.cpp index 8e5682cb..6e40ec04 100644 --- a/src/game/server/baseentity.cpp +++ b/src/game/server/baseentity.cpp @@ -9060,7 +9060,7 @@ void CBaseEntity::InputRemoveOutput( inputdata_t& inputdata ) // If our names match, remove if (Matcher_NamesMatch(szOutput, dataDesc->externalName)) { - CBaseEntityOutput *pOutput = (CBaseEntityOutput *)((int)this + (int)dataDesc->fieldOffset[0]); + CBaseEntityOutput *pOutput = (CBaseEntityOutput *)((intp)this + (int)dataDesc->fieldOffset[0]); pOutput->DeleteAllElements(); } } @@ -9122,7 +9122,7 @@ void CBaseEntity::InputReplaceOutput( inputdata_t& inputdata ) // If our names match, replace if (Matcher_NamesMatch(szOutput, dataDesc->externalName)) { - CBaseEntityOutput *pOutput = (CBaseEntityOutput *)((int)this + (int)dataDesc->fieldOffset[0]); + CBaseEntityOutput *pOutput = (CBaseEntityOutput *)((intp)this + (int)dataDesc->fieldOffset[0]); const char *szTarget; const char *szInputName; const char *szParam; diff --git a/src/game/server/hl2/npc_citizen17.cpp b/src/game/server/hl2/npc_citizen17.cpp index 49c68968..bfe9d018 100644 --- a/src/game/server/hl2/npc_citizen17.cpp +++ b/src/game/server/hl2/npc_citizen17.cpp @@ -819,7 +819,7 @@ void CNPC_Citizen::SelectModel() // model_path, model_head, gender ScriptVariant_t args[] = { pszModelPath, pszModelName, (int)scriptGender }; - ScriptVariant_t returnValue = NULL; + ScriptVariant_t returnValue = 0; g_Hook_SelectModel.Call( m_ScriptScope, &returnValue, args ); if (returnValue.m_type == FIELD_CSTRING && returnValue.m_pszString[0] != '\0') diff --git a/src/game/server/variant_t.cpp b/src/game/server/variant_t.cpp index 3b45275b..1efa91c7 100644 --- a/src/game/server/variant_t.cpp +++ b/src/game/server/variant_t.cpp @@ -70,7 +70,7 @@ void variant_t::SetScriptVariant( ScriptVariant_t &var ) { switch (FieldType()) { - case FIELD_VOID: var = NULL; break; + case FIELD_VOID: var.Free(); break; case FIELD_INTEGER: var = iVal; break; case FIELD_FLOAT: var = flVal; break; case FIELD_STRING: var = STRING(iszVal); break; diff --git a/src/vscript/vscript_squirrel.cpp b/src/vscript/vscript_squirrel.cpp index 6cce7da6..0c5fa2fe 100644 --- a/src/vscript/vscript_squirrel.cpp +++ b/src/vscript/vscript_squirrel.cpp @@ -3685,7 +3685,7 @@ void SquirrelVM::WriteObject( const SQObjectPtr &obj, CUtlBuffer* pBuffer, Write WriteObject( ci->_closure, pBuffer, writeState ); - int offset = (int)ci->_ip - (int)ci->_closure._unVal.pClosure->_function->_instructions; + int offset = (intp)ci->_ip - (intp)ci->_closure._unVal.pClosure->_function->_instructions; pBuffer->PutInt( offset ); pBuffer->PutInt( ci->_etraps ); pBuffer->PutInt( ci->_prevstkbase ); @@ -3741,7 +3741,7 @@ void SquirrelVM::WriteObject( const SQObjectPtr &obj, CUtlBuffer* pBuffer, Write Assert( ci._ip && ci._ip >= ci._closure._unVal.pClosure->_function->_instructions ); Assert( pThis->_etraps.size() >= (SQUnsignedInteger)ci._etraps ); - int offset = (int)ci._ip - (int)ci._closure._unVal.pClosure->_function->_instructions; + int offset = (intp)ci._ip - (intp)ci._closure._unVal.pClosure->_function->_instructions; pBuffer->PutInt( offset ); pBuffer->PutInt( ci._etraps ); pBuffer->PutInt( ci._prevstkbase ); @@ -4332,7 +4332,7 @@ void SquirrelVM::ReadObject( SQObjectPtr &pObj, CUtlBuffer* pBuffer, ReadStateMa int offset = pBuffer->GetInt(); int funcsize = sizeof(SQInstruction) * closure._unVal.pClosure->_function->_ninstructions; - int start = (int)(closure._unVal.pClosure->_function->_instructions); + int start = (intp)(closure._unVal.pClosure->_function->_instructions); int pos = start + offset; ci->_ip = (SQInstruction*)pos; @@ -4413,7 +4413,7 @@ void SquirrelVM::ReadObject( SQObjectPtr &pObj, CUtlBuffer* pBuffer, ReadStateMa int offset = pBuffer->GetInt(); int funcsize = sizeof(SQInstruction) * closure._unVal.pClosure->_function->_ninstructions; - int start = (int)(closure._unVal.pClosure->_function->_instructions); + int start = (intp)(closure._unVal.pClosure->_function->_instructions); int pos = start + offset; ci._ip = (SQInstruction*)pos;