mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-26 12:15:53 +01:00
389 lines
18 KiB
C++
389 lines
18 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
#include "Models/Items/ItemHolder/ItemHolder.h"
|
||
|
|
||
|
#include <EntitiesMP/KeyItem.h>
|
||
|
#include <EntitiesMP/KeyItem_tables.h>
|
||
|
CEntityEvent *EKey::MakeCopy(void) { CEntityEvent *peeCopy = new EKey(*this); return peeCopy;}
|
||
|
EKey::EKey() : CEntityEvent(EVENTCODE_EKey) {;
|
||
|
ClearToDefault(kitType);
|
||
|
};
|
||
|
#line 36 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
|
||
|
|
||
|
const char *GetKeyName(enum KeyItemType kit)
|
||
|
{
|
||
|
switch(kit) {
|
||
|
case KIT_BOOKOFWISDOM : return TRANS("Book of wisdom"); break;
|
||
|
case KIT_CROSSWOODEN : return TRANS("Wooden cross"); break;
|
||
|
case KIT_CROSSGOLD : return TRANS("Gold cross"); break;
|
||
|
case KIT_CROSSMETAL : return TRANS("Silver cross"); break;
|
||
|
case KIT_JAGUARGOLDDUMMY : return TRANS("Gold jaguar"); break;
|
||
|
case KIT_HAWKWINGS01DUMMY : return TRANS("Hawk wings - part 1"); break;
|
||
|
case KIT_HAWKWINGS02DUMMY : return TRANS("Hawk wings - part 2"); break;
|
||
|
case KIT_HOLYGRAIL : return TRANS("Holy grail"); break;
|
||
|
case KIT_TABLESDUMMY : return TRANS("Tablet of wisdom"); break;
|
||
|
case KIT_WINGEDLION : return TRANS("Winged lion"); break;
|
||
|
case KIT_ELEPHANTGOLD : return TRANS("Gold elephant"); break;
|
||
|
case KIT_STATUEHEAD01 : return TRANS("Seriously scary ceremonial mask"); break;
|
||
|
case KIT_STATUEHEAD02 : return TRANS("Hilariously happy ceremonial mask"); break;
|
||
|
case KIT_STATUEHEAD03 : return TRANS("Ix Chel mask"); break;
|
||
|
case KIT_KINGSTATUE : return TRANS("Statue of King Tilmun"); break;
|
||
|
case KIT_CRYSTALSKULL : return TRANS("Crystal Skull"); break;
|
||
|
default: return TRANS("unknown item"); break;
|
||
|
};
|
||
|
}
|
||
|
|
||
|
|
||
|
void CKeyItem::SetDefaultProperties(void) {
|
||
|
m_kitType = KIT_BOOKOFWISDOM ;
|
||
|
m_iSoundComponent = 0;
|
||
|
m_fSize = 1.0f;
|
||
|
CItem::SetDefaultProperties();
|
||
|
}
|
||
|
|
||
|
#line 129 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
void CKeyItem::Precache(void) {
|
||
|
#line 130 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
PrecacheSound (SOUND_KEY );
|
||
|
#line 131 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
|
||
|
#line 133 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
BOOL CKeyItem::FillEntityStatistics(EntityStats * pes)
|
||
|
#line 134 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
{
|
||
|
#line 135 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
pes -> es_strName = GetKeyName (m_kitType );
|
||
|
#line 136 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
pes -> es_ctCount = 1;
|
||
|
#line 137 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
pes -> es_ctAmmount = 1;
|
||
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
pes -> es_fValue = 1;
|
||
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
pes -> es_iScore = 0;
|
||
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
return TRUE ;
|
||
|
#line 141 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
|
||
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
void CKeyItem::RenderParticles(void) {
|
||
|
#line 146 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
if(GetRenderType () != CEntity :: RT_MODEL || ! ShowItemParticles ()){
|
||
|
#line 147 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
return ;
|
||
|
#line 148 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
switch(m_kitType ){
|
||
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_BOOKOFWISDOM :
|
||
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CRYSTALSKULL :
|
||
|
#line 152 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_HOLYGRAIL :
|
||
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Particles_Stardust (this , 1.0f , 0.5f , PT_STAR08 , 64);
|
||
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_JAGUARGOLDDUMMY :
|
||
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Particles_Stardust (this , 2.0f , 2.0f , PT_STAR08 , 64);
|
||
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 158 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CROSSWOODEN :
|
||
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CROSSMETAL :
|
||
|
#line 160 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CROSSGOLD :
|
||
|
#line 161 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_HAWKWINGS01DUMMY :
|
||
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_HAWKWINGS02DUMMY :
|
||
|
#line 163 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_TABLESDUMMY :
|
||
|
#line 164 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_WINGEDLION :
|
||
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_ELEPHANTGOLD :
|
||
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_STATUEHEAD01 :
|
||
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_STATUEHEAD02 :
|
||
|
#line 168 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_STATUEHEAD03 :
|
||
|
#line 169 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_KINGSTATUE :
|
||
|
#line 170 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
default :
|
||
|
#line 171 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Particles_Stardust (this , 1.5f , 1.1f , PT_STAR08 , 64);
|
||
|
#line 172 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 173 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
#line 174 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
|
||
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
void CKeyItem::SetProperties(void)
|
||
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
{
|
||
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_fRespawnTime = (m_fCustomRespawnTime > 0) ? m_fCustomRespawnTime : 10.0f;
|
||
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_strDescription = GetKeyName (m_kitType );
|
||
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
switch(m_kitType ){
|
||
|
#line 185 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_BOOKOFWISDOM :
|
||
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_BOOKOFWISDOM , TEXTURE_BOOKOFWISDOM , 0 , 0 , 0);
|
||
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 193 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CROSSWOODEN :
|
||
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_CROSSWOODEN , TEXTURE_CROSSWOODEN , 0 , 0 , 0);
|
||
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 201 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CROSSMETAL :
|
||
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_CROSSMETAL , TEXTURE_CROSSMETAL , TEX_REFL_METAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 206 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CROSSGOLD :
|
||
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_CROSSGOLD , TEXTURE_CROSSGOLD , TEX_REFL_GOLD01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 216 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 217 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_JAGUARGOLDDUMMY :
|
||
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_JAGUARGOLD , TEX_REFL_GOLD01 , TEX_REFL_GOLD01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.5f , 0) , FLOAT3D (2 , 2 , 0.3f));
|
||
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 223 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 224 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 225 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_HAWKWINGS01DUMMY :
|
||
|
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_HAWKWINGS01 , TEXTURE_HAWKWINGS , 0 , 0 , 0);
|
||
|
#line 229 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 231 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_HAWKWINGS02DUMMY :
|
||
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_HAWKWINGS02 , TEXTURE_HAWKWINGS , 0 , 0 , 0);
|
||
|
#line 237 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 238 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 239 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 240 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 241 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_HOLYGRAIL :
|
||
|
#line 243 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_HOLYGRAIL , TEXTURE_HOLYGRAIL , TEX_REFL_METAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 246 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 247 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 248 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 249 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_TABLESDUMMY :
|
||
|
#line 251 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_TABLESOFWISDOM , TEXTURE_TABLESOFWISDOM , TEX_REFL_METAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 254 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 257 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_WINGEDLION :
|
||
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_WINGEDLION , TEX_REFL_GOLD01 , TEX_REFL_GOLD01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 262 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 263 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_ELEPHANTGOLD :
|
||
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_ELEPHANTGOLD , TEX_REFL_GOLD01 , TEX_REFL_GOLD01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.5f , 0) , FLOAT3D (2 , 2 , 0.3f));
|
||
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 273 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_STATUEHEAD01 :
|
||
|
#line 275 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_STATUEHEAD01 , TEXTURE_STATUEHEAD01 , 0 , 0 , 0);
|
||
|
#line 277 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 280 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 281 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_STATUEHEAD02 :
|
||
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_STATUEHEAD02 , TEXTURE_STATUEHEAD02 , 0 , 0 , 0);
|
||
|
#line 285 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_STATUEHEAD03 :
|
||
|
#line 291 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_STATUEHEAD03 , TEXTURE_STATUEHEAD03 , 0 , 0 , 0);
|
||
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 294 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 295 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 297 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_KINGSTATUE :
|
||
|
#line 299 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_KINGSTATUE , TEX_REFL_GOLD01 , TEX_REFL_GOLD01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 301 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 303 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 304 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 305 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
case KIT_CRYSTALSKULL :
|
||
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddItem (MODEL_CRYSTALSKULL , TEXTURE_CRYSTALSKULL , TEX_REFL_METAL01 , TEX_SPEC_MEDIUM , 0);
|
||
|
#line 309 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
AddFlare (MODEL_FLARE , TEXTURE_FLARE , FLOAT3D (0 , 0.2f , 0) , FLOAT3D (1 , 1 , 0.3f));
|
||
|
#line 310 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StretchItem (FLOAT3D (1.0f , 1.0f , 1.0f));
|
||
|
#line 311 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_iSoundComponent = SOUND_KEY ;
|
||
|
#line 312 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
break ;
|
||
|
#line 313 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
#line 314 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
GetModelObject () -> StretchModel (FLOAT3D (m_fSize , m_fSize , m_fSize ));
|
||
|
#line 315 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
BOOL CKeyItem::
|
||
|
#line 318 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
ItemCollected(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CKeyItem_ItemCollected
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EPass, "CKeyItem::ItemCollected expects 'EPass' as input!"); const EPass &epass = (const EPass &)__eeInput;
|
||
|
#line 319 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
ASSERT (epass . penOther != NULL );
|
||
|
#line 322 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
EKey eKey ;
|
||
|
#line 323 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
eKey . kitType = m_kitType ;
|
||
|
#line 325 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
if(epass . penOther -> ReceiveItem (eKey )){
|
||
|
#line 326 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
if(_pNetwork -> IsPlayerLocal (epass . penOther )){IFeel_PlayEffect ("PU_Key");}
|
||
|
#line 328 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_soPick . Set3DParameters (50.0f , 1.0f , 1.0f , 1.0f);
|
||
|
#line 329 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
PlaySound (m_soPick , m_iSoundComponent , SOF_3D );
|
||
|
#line 330 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
m_fPickSoundLen = GetSoundLength (m_iSoundComponent );
|
||
|
#line 331 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Jump(STATE_CURRENT, STATE_CItem_ItemReceived, FALSE, EVoid());return TRUE;
|
||
|
#line 332 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
}
|
||
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 333 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CKeyItem::
|
||
|
#line 336 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Main(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CKeyItem_Main
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CKeyItem::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 337 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Initialize ();
|
||
|
#line 338 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
StartModelAnim (ITEMHOLDER_ANIM_SMALLOSCILATION , AOF_LOOPING | AOF_NORESTART );
|
||
|
#line 339 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
ForceCollisionBoxIndexChange (ITEMHOLDER_COLLISION_BOX_BIG );
|
||
|
#line 340 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
SetProperties ();
|
||
|
#line 342 "D:/SE1_GPL/Sources/EntitiesMP/KeyItem.es"
|
||
|
Jump(STATE_CURRENT, STATE_CItem_ItemLoop, FALSE, EVoid());return TRUE; ASSERT(FALSE); return TRUE;};
|