mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 10:20:26 +01:00
372 lines
17 KiB
C++
372 lines
17 KiB
C++
/*
|
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
|
*/
|
|
|
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
|
|
#include "StdH.h"
|
|
#include "Models/Items/ItemHolder/ItemHolder.h"
|
|
|
|
#include <EntitiesMP/ArmorItem.h>
|
|
#include <EntitiesMP/ArmorItem_tables.h>
|
|
CEntityEvent *EArmor::MakeCopy(void) { CEntityEvent *peeCopy = new EArmor(*this); return peeCopy;}
|
|
EArmor::EArmor() : CEntityEvent(EVENTCODE_EArmor) {;
|
|
ClearToDefault(fArmor);
|
|
ClearToDefault(bOverTopArmor);
|
|
};
|
|
void CArmorItem::SetDefaultProperties(void) {
|
|
m_EaitType = ARIT_SHARD ;
|
|
m_bOverTopArmor = FALSE ;
|
|
m_iSoundComponent = 0;
|
|
CItem::SetDefaultProperties();
|
|
}
|
|
|
|
#line 82 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
void CArmorItem::Precache(void) {
|
|
#line 83 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
switch(m_EaitType ){
|
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SHARD : PrecacheSound (SOUND_SHARD );break ;
|
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SMALL : PrecacheSound (SOUND_SMALL );break ;
|
|
#line 86 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_MEDIUM : PrecacheSound (SOUND_MEDIUM );break ;
|
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_STRONG : PrecacheSound (SOUND_STRONG );break ;
|
|
#line 88 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SUPER : PrecacheSound (SOUND_SUPER );break ;
|
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_HELM : PrecacheSound (SOUND_HELM );break ;
|
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 91 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
|
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
BOOL CArmorItem::FillEntityStatistics(EntityStats * pes)
|
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
{
|
|
#line 95 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
pes -> es_strName = "Armor";
|
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
pes -> es_ctCount = 1;
|
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
pes -> es_ctAmmount = m_fValue ;
|
|
#line 98 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
pes -> es_fValue = m_fValue * 2;
|
|
#line 99 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
pes -> es_iScore = 0;
|
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
switch(m_EaitType ){
|
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SHARD : pes -> es_strName += " shard";break ;
|
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SMALL : pes -> es_strName += " small";break ;
|
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_MEDIUM : pes -> es_strName += " medium";break ;
|
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_STRONG : pes -> es_strName += " strong";break ;
|
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SUPER : pes -> es_strName += " super";break ;
|
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_HELM : pes -> es_strName += " helm";break ;
|
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
return TRUE ;
|
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
|
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
void CArmorItem::RenderParticles(void) {
|
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(GetRenderType () != CEntity :: RT_MODEL || GetSP () -> sp_gmGameMode > CSessionProperties :: GM_COOPERATIVE
|
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
|| ! ShowItemParticles ())
|
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
{
|
|
#line 117 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
return ;
|
|
#line 118 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
switch(m_EaitType ){
|
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SHARD :
|
|
#line 121 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Particles_Emanate (this , 0.75f * 0.75 , 0.75f * 0.75 , PT_STAR04 , 8 , 7.0f);
|
|
#line 122 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SMALL :
|
|
#line 124 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Particles_Emanate (this , 1.0f * 0.75 , 1.0f * 0.75 , PT_STAR04 , 32 , 7.0f);
|
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_MEDIUM :
|
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Particles_Emanate (this , 1.5f * 0.75 , 1.5f * 0.75 , PT_STAR04 , 64 , 7.0f);
|
|
#line 128 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_STRONG :
|
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Particles_Emanate (this , 2.0f * 0.75 , 1.25f * 0.75 , PT_STAR04 , 96 , 7.0f);
|
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 132 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SUPER :
|
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Particles_Emanate (this , 2.5f * 0.75 , 1.5f * 0.75 , PT_STAR04 , 128 , 7.0f);
|
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_HELM :
|
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Particles_Emanate (this , 0.875f * 0.75 , 0.875f * 0.75 , PT_STAR04 , 16 , 7.0f);
|
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
|
|
#line 142 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
void CArmorItem::SetProperties(void) {
|
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
switch(m_EaitType ){
|
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SHARD :
|
|
#line 145 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_SMALL );
|
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fValue = 1.0f;
|
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_bOverTopArmor = TRUE ;
|
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 10.0f;
|
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_strDescription . PrintF ("Shard - H:%g T:%g" , m_fValue , m_fRespawnTime );
|
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddItem (MODEL_1 , TEXTURE_1 , 0 , TEX_SPEC_MEDIUM , 0);
|
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.4f , 0) , FLOAT3D (1.0 , 1.0 , 0.3f));
|
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StretchItem (FLOAT3D (0.75f * 0.75 , 0.75f * 0.75 , 0.75f * 0.75));
|
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_iSoundComponent = SOUND_SHARD ;
|
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SMALL :
|
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_MEDIUM );
|
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fValue = 25.0f;
|
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_bOverTopArmor = FALSE ;
|
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 10.0f;
|
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_strDescription . PrintF ("Small - H:%g T:%g" , m_fValue , m_fRespawnTime );
|
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddItem (MODEL_25 , TEXTURE_25 , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.6f , 0) , FLOAT3D (2 , 2 , 0.5f));
|
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StretchItem (FLOAT3D (2.0f , 2.0f , 2.0f));
|
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_iSoundComponent = SOUND_SMALL ;
|
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_MEDIUM : {
|
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_MEDIUM );
|
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fValue = 50.0f;
|
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_bOverTopArmor = FALSE ;
|
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 25.0f;
|
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_strDescription . PrintF ("Medium - H:%g T:%g" , m_fValue , m_fRespawnTime );
|
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddItem (MODEL_50 , TEXTURE_50 , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 1.0f , 0) , FLOAT3D (3 , 3 , 0.5f));
|
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StretchItem (FLOAT3D (2.0f , 2.0f , 2.0f));
|
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_iSoundComponent = SOUND_MEDIUM ;
|
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}break ;
|
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_STRONG :
|
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_MEDIUM );
|
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fValue = 100.0f;
|
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_bOverTopArmor = FALSE ;
|
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 60.0f;
|
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_strDescription . PrintF ("Strong - H:%g T:%g" , m_fValue , m_fRespawnTime );
|
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddItem (MODEL_100 , TEXTURE_100 , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (3.5 , 3.5 , 1.0f));
|
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StretchItem (FLOAT3D (2.5f , 2.5f , 2.5f));
|
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_iSoundComponent = SOUND_STRONG ;
|
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SUPER :
|
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_MEDIUM );
|
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fValue = 200.0f;
|
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_bOverTopArmor = TRUE ;
|
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 120.0f;
|
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_strDescription . PrintF ("Super - H:%g T:%g" , m_fValue , m_fRespawnTime );
|
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddItem (MODEL_200 , TEXTURE_200 , TEX_REFL_LIGHTMETAL01 , TEX_SPEC_MEDIUM , 0);
|
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.75f , 0) , FLOAT3D (3 , 3 , 1.0f));
|
|
#line 202 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StretchItem (FLOAT3D (2.5f , 2.5f , 2.5f));
|
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_iSoundComponent = SOUND_SUPER ;
|
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_HELM :
|
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_SMALL );
|
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fValue = 5.0f;
|
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_bOverTopArmor = FALSE ;
|
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 10.0f;
|
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_strDescription . PrintF ("Helm - H:%g T:%g" , m_fValue , m_fRespawnTime );
|
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddItem (MODEL_5 , TEXTURE_5 , 0 , TEX_SPEC_MEDIUM , 0);
|
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.5f , 0) , FLOAT3D (1.5 , 1.5 , 0.4f));
|
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StretchItem (FLOAT3D (0.875f * 0.75 , 0.875f * 0.75 , 0.875f * 0.75));
|
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_iSoundComponent = SOUND_HELM ;
|
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
break ;
|
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
|
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
void CArmorItem::AdjustDifficulty(void)
|
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
{
|
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(! GetSP () -> sp_bAllowArmor && m_penTarget == NULL ){
|
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Destroy ();
|
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
BOOL CArmorItem::
|
|
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ItemCollected(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CArmorItem_ItemCollected
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EPass, "CArmorItem::ItemCollected expects 'EPass' as input!"); const EPass &epass = (const EPass &)__eeInput;
|
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
ASSERT (epass . penOther != NULL );
|
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(GetSP () -> sp_bHealthArmorStays && ! (m_bPickupOnce || m_bRespawn )){
|
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
BOOL bWasPicked = MarkPickedBy (epass . penOther );
|
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(bWasPicked ){
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
return TRUE;
|
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 242 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
EArmor eArmor ;
|
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
eArmor . fArmor = m_fValue ;
|
|
#line 244 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
eArmor . bOverTopArmor = m_bOverTopArmor ;
|
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(epass . penOther -> ReceiveItem (eArmor )){
|
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(_pNetwork -> IsPlayerLocal (epass . penOther ))
|
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
{
|
|
#line 250 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
switch(m_EaitType )
|
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
{
|
|
#line 252 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SHARD : IFeel_PlayEffect ("PU_ArmourShard");break ;
|
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SMALL : IFeel_PlayEffect ("PU_ArmourSmall");break ;
|
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_MEDIUM : IFeel_PlayEffect ("PU_ArmourMedium");break ;
|
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_STRONG : IFeel_PlayEffect ("PU_ArmourStrong");break ;
|
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_SUPER : IFeel_PlayEffect ("PU_ArmourSuper");break ;
|
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
case ARIT_HELM : IFeel_PlayEffect ("PU_ArmourHelm");break ;
|
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_soPick . Set3DParameters (50.0f , 1.0f , 1.0f , 1.0f);
|
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
PlaySound (m_soPick , m_iSoundComponent , SOF_3D );
|
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
m_fPickSoundLen = GetSoundLength (m_iSoundComponent );
|
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
if(! GetSP () -> sp_bHealthArmorStays || (m_bPickupOnce || m_bRespawn )){
|
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Jump(STATE_CURRENT, STATE_CItem_ItemReceived, FALSE, EVoid());return TRUE;
|
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
}
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Return(STATE_CURRENT,EVoid());
|
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CArmorItem::
|
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Main(const CEntityEvent &__eeInput) {
|
|
#undef STATE_CURRENT
|
|
#define STATE_CURRENT STATE_CArmorItem_Main
|
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CArmorItem::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Initialize ();
|
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
StartModelAnim (ITEMHOLDER_ANIM_SMALLOSCILATION , AOF_LOOPING | AOF_NORESTART );
|
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
SetProperties ();
|
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/ArmorItem.es"
|
|
Jump(STATE_CURRENT, STATE_CItem_ItemLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;}; |