/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 4 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" #include "StdH.h" #include #include void CEnvironmentParticlesHolder::SetDefaultProperties(void) { m_strName = "Env. particles holder"; m_strDescription = ""; m_fnHeightMap = CTString(""); m_boxHeightMap = FLOATaabbox3D(FLOAT3D (0 , 0 , 0) , FLOAT3D (1 , 1 , 1)); m_eptType = EPTH_NONE ; m_penNextHolder = NULL; m_tmRainStart = -1.0f; m_tmRainEnd = -1.0f; m_tmSnowStart = -1.0f; m_tmSnowEnd = -1.0f; m_moHeightMapHolder.SetData(NULL); m_moHeightMapHolder.mo_toTexture.SetData(NULL); m_moParticleTextureHolder.SetData(NULL); m_moParticleTextureHolder.mo_toTexture.SetData(NULL); m_fnTexture = CTString(""); m_fGrowthRenderingStep = 1.0f; m_fGrowthRenderingRadius = 50; m_fGrowthRenderingRadiusFade = 50; m_bGrowthHighresMap = TRUE ; m_iGrowthMapX = 1; m_iGrowthMapY = 1; m_fGrowthMinSize = 1.0f; m_fGrowthMaxSize = 1.0f; m_fParticlesSinkFactor = 0.0; m_fRainAppearLen = 10.0f; m_fSnowAppearLen = 10.0f; CRationalEntity::SetDefaultProperties(); } #line 70 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" void CEnvironmentParticlesHolder::Precache(void) #line 71 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 72 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" CTextureData * ptdHeightMap = (CTextureData *) m_moHeightMapHolder . mo_toTexture . GetData (); #line 73 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(ptdHeightMap != NULL ){ #line 74 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" ptdHeightMap -> Force (TEX_CONSTANT | TEX_STATIC | TEX_KEEPCOLOR ); #line 75 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 76 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 79 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" BOOL CEnvironmentParticlesHolder::IsTargetValid(SLONG slPropertyOffset,CEntity * penTarget) #line 80 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 81 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(slPropertyOffset == offsetof (CEnvironmentParticlesHolder , m_penNextHolder )) #line 82 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 83 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(IsOfClass (penTarget , "EnvironmentParticlesHolder")){return TRUE ;} #line 84 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" else {return FALSE ;} #line 85 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 86 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return CEntity :: IsTargetValid (slPropertyOffset , penTarget ); #line 87 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 90 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" FLOAT CEnvironmentParticlesHolder::GetRainFactor(void) #line 91 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 92 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" FLOAT fRainFactor = 0.0f; #line 93 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" TIME tmNow = _pTimer -> GetLerpedCurrentTick (); #line 95 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(tmNow > m_tmRainStart && tmNow < m_tmRainEnd + m_fRainAppearLen ) #line 96 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 98 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(tmNow > m_tmRainStart + m_fRainAppearLen && tmNow < m_tmRainEnd ) #line 99 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 100 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" fRainFactor = 1.0f; #line 101 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 103 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" else if(tmNow > m_tmRainEnd ) #line 104 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 105 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" fRainFactor = 1.0f - (tmNow - m_tmRainEnd ) / m_fRainAppearLen ; #line 106 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 108 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" else #line 109 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 110 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" fRainFactor = (tmNow - m_tmRainStart ) / m_fRainAppearLen ; #line 111 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 112 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 113 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return fRainFactor ; #line 114 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 117 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" FLOAT CEnvironmentParticlesHolder::GetSnowFactor(void) #line 118 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 119 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" FLOAT fSnowFactor = 0.0f; #line 120 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" TIME tmNow = _pTimer -> GetLerpedCurrentTick (); #line 122 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(tmNow > m_tmSnowStart && tmNow < m_tmSnowEnd + m_fSnowAppearLen ) #line 123 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 125 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(tmNow > m_tmSnowStart + m_fSnowAppearLen && tmNow < m_tmSnowEnd ) #line 126 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 127 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" fSnowFactor = 1.0f; #line 128 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 130 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" else if(tmNow > m_tmSnowEnd ) #line 131 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 132 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" fSnowFactor = 1.0f - (tmNow - m_tmSnowEnd ) / m_fSnowAppearLen ; #line 133 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 135 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" else #line 136 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 137 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" fSnowFactor = (tmNow - m_tmSnowStart ) / m_fSnowAppearLen ; #line 138 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 139 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 140 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return fSnowFactor ; #line 141 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 144 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" void CEnvironmentParticlesHolder::GetHeightMapData(CTextureData * & ptdHeightMap,FLOATaabbox3D & boxHeightMap) #line 145 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 146 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" ptdHeightMap = (CTextureData *) m_moHeightMapHolder . mo_toTexture . GetData (); #line 147 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(ptdHeightMap != NULL ){ #line 148 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" ptdHeightMap -> Force (TEX_CONSTANT | TEX_STATIC | TEX_KEEPCOLOR ); #line 149 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 150 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" boxHeightMap = m_boxHeightMap ; #line 151 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" boxHeightMap += GetPlacement () . pl_PositionVector ; #line 152 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 154 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" void CEnvironmentParticlesHolder::GetParticleTexture() #line 155 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 157 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } BOOL CEnvironmentParticlesHolder:: #line 160 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CEnvironmentParticlesHolder_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CEnvironmentParticlesHolder::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 163 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" InitAsEditorModel (); #line 164 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" SetPhysicsFlags (EPF_MODEL_IMMATERIAL ); #line 165 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" SetCollisionFlags (ECF_IMMATERIAL ); #line 168 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(m_fnHeightMap != CTString ("")) #line 169 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 170 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" try #line 171 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 172 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_moHeightMapHolder . mo_toTexture . SetData_t (m_fnHeightMap ); #line 173 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" }catch (char * strError ){ #line 174 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" WarningMessage (strError ); #line 175 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 176 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 178 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(m_fnTexture != CTString ("")) #line 179 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 180 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" try #line 181 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" { #line 182 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_moParticleTextureHolder . mo_toTexture . SetData_t (m_fnTexture ); #line 183 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" }catch (char * strError ){ #line 184 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" WarningMessage (strError ); #line 185 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 186 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 190 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" if(m_fGrowthRenderingRadius < m_fGrowthRenderingRadiusFade ){ #line 191 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_fGrowthRenderingRadiusFade = m_fGrowthRenderingRadius ; #line 192 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 193 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_fParticlesSinkFactor = Clamp (m_fParticlesSinkFactor , 0.0f , 1.0f); #line 196 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" SetModel (MODEL_ENVIRONMENT_PARTICLES_HOLDER ); #line 197 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" SetModelMainTexture (TEXTURE_ENVIRONMENT_PARTICLES_HOLDER ); #line 199 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmRainStart = 1e5 - 1.0f; #line 200 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmRainEnd = 1e5; #line 201 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmSnowStart = 1e5 - 1.0f; #line 202 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmSnowEnd = 1e5; #line 204 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" switch(m_eptType ){ #line 205 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" case EPTH_GROWTH : #line 206 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_strDescription = "Growth"; #line 207 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" break ; #line 208 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" case EPTH_RAIN : #line 209 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_strDescription = "Rain"; #line 210 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" break ; #line 211 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" case EPTH_NONE : #line 212 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_strDescription = "None"; #line 213 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" break ; #line 214 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" } #line 216 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" SetTimerAt(THINKTIME_NEVER); Jump(STATE_CURRENT, 0x00ed0000, FALSE, EBegin());return TRUE;}BOOL CEnvironmentParticlesHolder::H0x00ed0000_Main_01(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT 0x00ed0000 switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin): #line 219 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" {const EBegin&e= (EBegin&)__eeInput; #line 220 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return TRUE; #line 221 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" }ASSERT(FALSE);break;case(EVENTCODE_EStart): #line 223 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" {const EStart&e= (EStart&)__eeInput; #line 224 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" TIME tmNow = _pTimer -> CurrentTick (); #line 225 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmRainStart = tmNow ; #line 226 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmRainEnd = 1e6; #line 227 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmSnowStart = tmNow ; #line 228 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmSnowEnd = 1e6; #line 229 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return TRUE; #line 230 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" }ASSERT(FALSE);break;case(EVENTCODE_EStop): #line 232 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" {const EStop&e= (EStop&)__eeInput; #line 233 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" TIME tmNow = _pTimer -> CurrentTick (); #line 234 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmRainEnd = tmNow ; #line 235 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" m_tmSnowEnd = tmNow ; #line 236 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return TRUE; #line 237 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" }ASSERT(FALSE);break;default: return FALSE; break; #line 238 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" }return TRUE;}BOOL CEnvironmentParticlesHolder::H0x00ed0001_Main_02(const CEntityEvent &__eeInput){ ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal); #undef STATE_CURRENT #define STATE_CURRENT 0x00ed0001 #line 240 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" Return(STATE_CURRENT,EVoid()); #line 240 "D:/SE1_GPL/Sources/EntitiesMP/EnvironmentParticlesHolder.es" return TRUE; ASSERT(FALSE); return TRUE;};