MCPcopy Create free account
hub / github.com/StrongPC123/Far-Cry-1-Source-Full / SetShaderFloat

Method SetShaderFloat

CrySystem/ScriptObjectEntity.cpp:2876–2919  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2874
2875
2876int CScriptObjectEntity::SetShaderFloat(IFunctionHandler *pH)
2877{
2878 float fFloat,fFadeValue;
2879 const char *sName;
2880 int dwMask;
2881
2882 CHECK_PARAMETERS(4);
2883
2884 pH->GetParam(1, sName);
2885 pH->GetParam(2, fFloat);
2886 pH->GetParam(3, dwMask);
2887 pH->GetParam(4, fFadeValue);
2888
2889 if (m_pEntity)
2890 {
2891 if ((dwMask) && m_pEntity->GetIStatObj(0))
2892 m_pEntity->SetShaderFloat(sName, fFloat);
2893//// if ((dwMask & BITMASK_OBJECT) && m_pEntity->GetIStatObj(0))
2894 // m_pEntity->GetIStatObj(0)->SetShaderFloat(sName, fFloat);
2895
2896 // set it for character
2897 if ((dwMask == 0) && m_pEntity->GetCharInterface() && m_pEntity->GetCharInterface()->GetCharacter(0))
2898 m_pEntity->GetCharInterface()->GetCharacter(0)->SetShaderFloat(sName, fFloat);
2899
2900 // if ((dwMask == 0) && m_pEntity->GetCharInterface() && m_pEntity->GetCharInterface()->GetCharacter(1))
2901// m_pEntity->GetCharInterface()->GetCharacter(1)->SetShaderFloat(sName, fFloat);
2902
2903/*
2904 IEntityContainer *pCont = m_pEntity->GetContainer();
2905 if (pCont && (dwMask & (BITMASK_WEAPON | BITMASK_PLAYER)))
2906 {
2907 CPlayer *pPlayer;
2908 if (pCont->QueryContainerInterface(CIT_IPLAYER,(void**)&pPlayer))
2909 {
2910 pPlayer->SetHeatVisionValues(dwMask,sName,fFloat,fFadeValue);
2911 //&& m_pEntity->GetCharInterface() && m_pEntity->GetCharInterface()->GetCharacter(0))
2912 //m_pEntity->GetCharInterface()->GetCharacter(0)->SetShaderFloat(sName, fFloat,fFadeValue);
2913 } //query play
2914 } //pcont
2915*/
2916 }
2917
2918 return pH->EndFunction();
2919}
2920
2921int CScriptObjectEntity::SetColor(IFunctionHandler *pH)
2922{

Callers

nothing calls this directly

Calls 5

GetCharInterfaceMethod · 0.80
EndFunctionMethod · 0.80
GetParamMethod · 0.45
GetIStatObjMethod · 0.45
GetCharacterMethod · 0.45

Tested by

no test coverage detected