/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 4 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" #include "StdH.h" #include "Models/Items/ItemHolder/ItemHolder.h" #include #include CEntityEvent *EMessageItem::MakeCopy(void) { CEntityEvent *peeCopy = new EMessageItem(*this); return peeCopy;} EMessageItem::EMessageItem() : CEntityEvent(EVENTCODE_EMessageItem) {; ClearToDefault(fnmMessage); }; #line 16 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" void CMessageItem::SetDefaultProperties(void) { m_strName = "MessageItem"; m_strDescription = ""; m_fnmMessage = CTString(""); m_iSoundComponent = 0; CItem::SetDefaultProperties(); } #line 43 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" void CMessageItem::Precache(void) { #line 44 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" PrecacheSound (SOUND_KEY ); #line 45 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" } #line 47 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" BOOL CMessageItem::FillEntityStatistics(EntityStats * pes) #line 48 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" { #line 49 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" pes -> es_strName = "Pergament"; #line 50 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" pes -> es_ctCount = 1; #line 51 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" pes -> es_ctAmmount = 1; #line 52 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" pes -> es_fValue = 1; #line 53 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" pes -> es_iScore = 0; #line 54 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" return TRUE ; #line 55 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" } #line 57 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" void CMessageItem::RenderParticles(void) { #line 59 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" if(GetRenderType () != CEntity :: RT_MODEL ){ #line 60 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" return ; #line 61 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" } #line 62 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" Particles_Stardust (this , 0.9f , 0.70f , PT_STAR08 , 32); #line 63 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" } #line 67 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" void CMessageItem::SetProperties(void) #line 68 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" { #line 69 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 10.0f; #line 70 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" m_strDescription = m_fnmMessage . FileName (); #line 73 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" AddItem (MODEL_PERGAMENT , TEXTURE_PERGAMENT , 0 , 0 , 0); #line 75 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f)); #line 76 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f)); #line 77 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" m_iSoundComponent = SOUND_KEY ; #line 78 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" } BOOL CMessageItem:: #line 81 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" ItemCollected(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CMessageItem_ItemCollected ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EPass, "CMessageItem::ItemCollected expects 'EPass' as input!"); const EPass &epass = (const EPass &)__eeInput; #line 82 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" ASSERT (epass . penOther != NULL ); #line 85 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" EMessageItem eMessage ; #line 86 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" eMessage . fnmMessage = m_fnmMessage ; #line 88 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" if(epass . penOther -> ReceiveItem (eMessage )){ #line 90 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" m_soPick . Set3DParameters (50.0f , 1.0f , 1.0f , 1.0f); #line 91 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" PlaySound (m_soPick , m_iSoundComponent , SOF_3D ); #line 92 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" m_fPickSoundLen = GetSoundLength (m_iSoundComponent ); #line 93 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" Jump(STATE_CURRENT, STATE_CItem_ItemReceived, FALSE, EVoid());return TRUE; #line 94 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" } #line 95 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" Return(STATE_CURRENT,EVoid()); #line 95 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" return TRUE; ASSERT(FALSE); return TRUE;};BOOL CMessageItem:: #line 98 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CMessageItem_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CMessageItem::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 99 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" Initialize (); #line 100 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" StartModelAnim (ITEMHOLDER_ANIM_SMALLOSCILATION , AOF_LOOPING | AOF_NORESTART ); #line 101 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_SMALL ); #line 102 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" SetProperties (); #line 104 "D:/SE1_GPL/Sources/EntitiesMP/MessageItem.es" Jump(STATE_CURRENT, STATE_CItem_ItemLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};