mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-22 18:30:27 +01:00
424 lines
18 KiB
C++
424 lines
18 KiB
C++
|
/*
|
||
|
* This file is generated by Entity Class Compiler, (c) CroTeam 1997-98
|
||
|
*/
|
||
|
|
||
|
#line 4 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
|
||
|
#include "StdH.h"
|
||
|
#include "Models/Items/ItemHolder/ItemHolder.h"
|
||
|
|
||
|
#include <EntitiesMP/Item.h>
|
||
|
#include <EntitiesMP/Item_tables.h>
|
||
|
#line 9 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
|
||
|
// used to render certain entities only for certain players (like picked items, etc.)
|
||
|
extern ULONG _ulPlayerRenderingMask;
|
||
|
|
||
|
void CItem::SetDefaultProperties(void) {
|
||
|
m_strName = "Item";
|
||
|
m_strDescription = "";
|
||
|
m_fValue = 0.0f;
|
||
|
m_fRespawnTime = 0.0f;
|
||
|
m_fCustomRespawnTime = 0.0f;
|
||
|
m_bRespawn = FALSE ;
|
||
|
m_penTarget = NULL;
|
||
|
m_bPickupOnce = FALSE ;
|
||
|
m_soPick.SetOwner(this);
|
||
|
m_soPick.Stop_internal();
|
||
|
m_fPickSoundLen = 0.0f;
|
||
|
m_bDropped = FALSE ;
|
||
|
m_ulPickedMask = 0;
|
||
|
m_bFloating = FALSE ;
|
||
|
m_penPrediction = NULL;
|
||
|
CMovableModelEntity::SetDefaultProperties();
|
||
|
}
|
||
|
void CItem::AdjustDifficulty(void)
|
||
|
#line 41 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 42 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 45 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::AdjustMipFactor(FLOAT & fMipFactor)
|
||
|
#line 46 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 48 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
CAttachmentModelObject * pamo = GetModelObject () -> GetAttachmentModel (ITEMHOLDER_ATTACHMENT_FLARE );
|
||
|
#line 49 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(pamo != NULL )
|
||
|
#line 50 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 51 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
FLOAT fRatio = (Clamp (fMipFactor , 5.0f , 7.0f) - 5.0f) / 2.0f;
|
||
|
#line 52 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
UBYTE ubRatio = UBYTE (255 * fRatio );
|
||
|
#line 53 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
COLOR colMutiply = RGBToColor (ubRatio , ubRatio , ubRatio ) | CT_OPAQUE ;
|
||
|
#line 54 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
pamo -> amo_moModelObject . mo_colBlendColor = colMutiply ;
|
||
|
#line 55 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 58 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(m_ulPickedMask == 0){
|
||
|
#line 60 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return ;
|
||
|
#line 61 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 63 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
BOOL bFlare = TRUE ;
|
||
|
#line 65 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(_ulPlayerRenderingMask & m_ulPickedMask ){
|
||
|
#line 67 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
extern INDEX plr_bRenderPicked ;
|
||
|
#line 68 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! plr_bRenderPicked ){
|
||
|
#line 70 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
fMipFactor = UpperLimit (0.0f);
|
||
|
#line 71 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 73 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
extern INDEX plr_bRenderPickedParticles ;
|
||
|
#line 74 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! plr_bRenderPickedParticles ){
|
||
|
#line 76 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
bFlare = FALSE ;
|
||
|
#line 77 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 78 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 81 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 84 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
BOOL CItem::ShowItemParticles(void)
|
||
|
#line 85 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 87 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(_ulPlayerRenderingMask & m_ulPickedMask ){
|
||
|
#line 89 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
extern INDEX plr_bRenderPickedParticles ;
|
||
|
#line 90 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! plr_bRenderPickedParticles ){
|
||
|
#line 92 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return FALSE ;
|
||
|
#line 93 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 94 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 96 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return TRUE ;
|
||
|
#line 97 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 100 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
BOOL CItem::MarkPickedBy(CEntity * pen)
|
||
|
#line 101 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 102 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! IsOfClass (pen , "Player")){
|
||
|
#line 103 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return FALSE ;
|
||
|
#line 104 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 105 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
INDEX iPlayer = ((CPlayerEntity *) pen ) -> GetMyPlayerIndex ();
|
||
|
#line 106 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
BOOL bPickedAlready = (1 << iPlayer ) & m_ulPickedMask ;
|
||
|
#line 107 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
m_ulPickedMask |= (1 << iPlayer );
|
||
|
#line 108 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return bPickedAlready ;
|
||
|
#line 109 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 112 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
FLOAT CItem::GetPredictionRange(void)
|
||
|
#line 113 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 114 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
extern FLOAT cli_fPredictItemsRange ;
|
||
|
#line 115 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return cli_fPredictItemsRange ;
|
||
|
#line 116 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 119 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
BOOL CItem::AdjustShadingParameters(FLOAT3D & vLightDirection,COLOR & colLight,COLOR & colAmbient)
|
||
|
#line 120 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 123 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 125 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
colLight = 0x40404040;
|
||
|
#line 126 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
colAmbient = 0x60606060;
|
||
|
#line 127 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 138 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
vLightDirection = FLOAT3D (- 1 , - 1 , - 1);
|
||
|
#line 139 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
vLightDirection . Normalize ();
|
||
|
#line 140 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
vLightDirection *= GetRotationMatrix ();
|
||
|
#line 143 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return FALSE ;
|
||
|
#line 144 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 149 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::Initialize(void) {
|
||
|
#line 150 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
InitAsModel ();
|
||
|
#line 151 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetFlags (GetFlags () | ENF_SEETHROUGH );
|
||
|
#line 153 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(m_bFloating ){
|
||
|
#line 154 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_FLYING );
|
||
|
#line 155 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}else {
|
||
|
#line 156 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetPhysicsFlags (EPF_MODEL_SLIDING );
|
||
|
#line 157 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 159 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetCollisionFlags (ECF_ITEM );
|
||
|
#line 162 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
en_fDeceleration = 60.0f;
|
||
|
#line 165 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetModel (MODEL_ITEM );
|
||
|
#line 166 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetDesiredTranslation (FLOAT3D (0 , 0 , 0));
|
||
|
#line 167 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 175 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::AddItem(ULONG ulIDModel,ULONG ulIDTexture,
|
||
|
#line 176 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ULONG ulIDReflectionTexture,ULONG ulIDSpecularTexture,ULONG ulIDBumpTexture) {
|
||
|
#line 177 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
AddAttachmentToModel (this , * GetModelObject () , ITEMHOLDER_ATTACHMENT_ITEM , ulIDModel , ulIDTexture ,
|
||
|
#line 178 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ulIDReflectionTexture , ulIDSpecularTexture , ulIDBumpTexture );
|
||
|
#line 179 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 180 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::AddItemSpecial(INDEX iAttachmentPos,ULONG ulIDModel,ULONG ulIDTexture,
|
||
|
#line 181 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ULONG ulIDReflectionTexture,ULONG ulIDSpecularTexture,ULONG ulIDBumpTexture) {
|
||
|
#line 182 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
AddAttachmentToModel (this , * GetModelObject () , iAttachmentPos , ulIDModel , ulIDTexture ,
|
||
|
#line 183 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ulIDReflectionTexture , ulIDSpecularTexture , ulIDBumpTexture );
|
||
|
#line 184 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 187 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::AddItemAttachment(INDEX iAttachment,ULONG ulIDModel,ULONG ulIDTexture,
|
||
|
#line 188 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ULONG ulIDReflectionTexture,ULONG ulIDSpecularTexture,ULONG ulIDBumpTexture) {
|
||
|
#line 189 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
CModelObject & mo = GetModelObject () -> GetAttachmentModel (ITEMHOLDER_ATTACHMENT_ITEM ) -> amo_moModelObject ;
|
||
|
#line 190 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
AddAttachmentToModel (this , mo , iAttachment , ulIDModel , ulIDTexture ,
|
||
|
#line 191 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ulIDReflectionTexture , ulIDSpecularTexture , ulIDBumpTexture );
|
||
|
#line 192 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 194 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::SetItemAttachmentAnim(INDEX iAttachment,INDEX iAnim)
|
||
|
#line 195 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 196 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
CModelObject & mo =
|
||
|
#line 197 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
GetModelObject () -> GetAttachmentModel (ITEMHOLDER_ATTACHMENT_ITEM ) -> amo_moModelObject .
|
||
|
#line 198 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
GetAttachmentModel (iAttachment ) -> amo_moModelObject ;
|
||
|
#line 199 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
mo . PlayAnim (iAnim , 0);
|
||
|
#line 200 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 203 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::AddFlare(ULONG ulIDModel,ULONG ulIDTexture,
|
||
|
#line 204 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
const FLOAT3D & vPos,const FLOAT3D & vStretch)
|
||
|
#line 205 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 207 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! m_bRespawn && ! m_bDropped )
|
||
|
#line 208 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 209 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
AddAttachmentToModel (this , * GetModelObject () ,
|
||
|
#line 210 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ITEMHOLDER_ATTACHMENT_FLARE , ulIDModel , ulIDTexture , 0 , 0 , 0);
|
||
|
#line 211 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
CAttachmentModelObject & amo = * GetModelObject () -> GetAttachmentModel (ITEMHOLDER_ATTACHMENT_FLARE );
|
||
|
#line 212 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
amo . amo_moModelObject . StretchModel (vStretch );
|
||
|
#line 213 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
amo . amo_plRelative . pl_PositionVector = vPos ;
|
||
|
#line 214 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 215 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 218 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
void CItem::StretchItem(const FLOAT3D & vStretch) {
|
||
|
#line 219 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
CModelObject & mo = GetModelObject () -> GetAttachmentModel (ITEMHOLDER_ATTACHMENT_ITEM ) -> amo_moModelObject ;
|
||
|
#line 220 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
mo . StretchModel (vStretch );
|
||
|
#line 221 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ModelChangeNotify ();
|
||
|
#line 222 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
|
||
|
#line 227 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SLONG CItem::GetUsedMemory(void)
|
||
|
#line 228 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
{
|
||
|
#line 230 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SLONG slUsedMemory = sizeof (CItem ) - sizeof (CMovableModelEntity ) + CMovableModelEntity :: GetUsedMemory ();
|
||
|
#line 232 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
slUsedMemory += m_strDescription . Length ();
|
||
|
#line 233 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
slUsedMemory += m_strName . Length ();
|
||
|
#line 234 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
slUsedMemory += 1 * sizeof (CSoundObject);
|
||
|
#line 235 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return slUsedMemory ;
|
||
|
#line 236 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
BOOL CItem::
|
||
|
#line 245 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ItemCollected(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CItem_ItemCollected
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EPass, "CItem::ItemCollected expects 'EPass' as input!"); const EPass &epass = (const EPass &)__eeInput;Return(STATE_CURRENT,EVoid());return TRUE; ASSERT(FALSE); return TRUE;};BOOL CItem::
|
||
|
#line 253 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ItemLoop(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CItem_ItemLoop
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CItem::ItemLoop expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 255 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
m_fCustomRespawnTime = ClampDn (m_fCustomRespawnTime , 0.0f);
|
||
|
#line 256 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetTimerAfter(0.1f);
|
||
|
Jump(STATE_CURRENT, 0x03200002, FALSE, EBegin());return TRUE;}BOOL CItem::H0x03200002_ItemLoop_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200002
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x03200003, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CItem::H0x03200003_ItemLoop_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200003
|
||
|
;
|
||
|
#line 258 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetPredictable (TRUE );
|
||
|
#line 259 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
AdjustDifficulty ();
|
||
|
#line 261 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetTimerAt(THINKTIME_NEVER);
|
||
|
Jump(STATE_CURRENT, 0x03200004, FALSE, EBegin());return TRUE;}BOOL CItem::H0x03200004_ItemLoop_03(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200004
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_EPass):{const EPass&epass= (EPass&)__eeInput;
|
||
|
|
||
|
#line 264 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! IsOfClass (epass . penOther , "Player")){
|
||
|
#line 265 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return FALSE;
|
||
|
#line 266 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 267 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(! (m_bPickupOnce || m_bRespawn )){
|
||
|
#line 268 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SendToTarget (m_penTarget , EET_TRIGGER , epass . penOther );
|
||
|
#line 269 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
m_penTarget = NULL ;
|
||
|
#line 270 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 271 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
Call(STATE_CURRENT, STATE_CItem_ItemCollected, TRUE, epass );return TRUE;
|
||
|
#line 272 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}ASSERT(FALSE);break;case(EVENTCODE_EEnd):{const EEnd&e= (EEnd&)__eeInput;
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x03200005, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default: return FALSE; break;
|
||
|
#line 274 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}return TRUE;}BOOL CItem::H0x03200005_ItemLoop_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200005
|
||
|
|
||
|
#line 276 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetTimerAfter(m_fPickSoundLen + 0.5f);
|
||
|
Jump(STATE_CURRENT, 0x03200006, FALSE, EBegin());return TRUE;}BOOL CItem::H0x03200006_ItemLoop_05(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200006
|
||
|
switch(__eeInput.ee_slEvent) {case EVENTCODE_EBegin: return TRUE;case EVENTCODE_ETimer: Jump(STATE_CURRENT,0x03200007, FALSE, EInternal()); return TRUE;default: return FALSE; }}BOOL CItem::H0x03200007_ItemLoop_06(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200007
|
||
|
;
|
||
|
#line 278 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
Destroy ();
|
||
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 279 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};BOOL CItem::
|
||
|
#line 283 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ItemReceived(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT STATE_CItem_ItemReceived
|
||
|
ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CItem::ItemReceived expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput;
|
||
|
#line 286 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SwitchToEditorModel ();
|
||
|
#line 287 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if((m_bPickupOnce || m_bRespawn )){
|
||
|
#line 288 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SendToTarget (m_penTarget , EET_TRIGGER , NULL );
|
||
|
#line 289 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}
|
||
|
#line 292 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
if(!(m_bRespawn )){ Jump(STATE_CURRENT,0x0320000c, FALSE, EInternal());return TRUE;}
|
||
|
#line 293 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
ASSERT (m_fRespawnTime > 0.0f);
|
||
|
#line 296 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SetTimerAfter(m_fRespawnTime );
|
||
|
Jump(STATE_CURRENT, 0x03200009, FALSE, EBegin());return TRUE;}BOOL CItem::H0x03200009_ItemReceived_01(const CEntityEvent &__eeInput) {
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x03200009
|
||
|
switch(__eeInput.ee_slEvent){case(EVENTCODE_EBegin):{const EBegin&e= (EBegin&)__eeInput;
|
||
|
return TRUE;}ASSERT(FALSE);break;case(EVENTCODE_ETimer):{const ETimer&e= (ETimer&)__eeInput;
|
||
|
UnsetTimer();Jump(STATE_CURRENT,0x0320000a, FALSE, EInternal());return TRUE;}ASSERT(FALSE);break;default:{return TRUE;}ASSERT(FALSE);break;
|
||
|
#line 300 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}return TRUE;}BOOL CItem::H0x0320000a_ItemReceived_02(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0320000a
|
||
|
|
||
|
#line 302 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
SwitchToModel ();Jump(STATE_CURRENT,0x0320000b, FALSE, EInternal());return TRUE;}BOOL CItem::H0x0320000c_ItemReceived_04(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0320000c
|
||
|
{
|
||
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
Return(STATE_CURRENT,EEnd ());
|
||
|
#line 306 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return TRUE;
|
||
|
#line 307 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
}Jump(STATE_CURRENT,0x0320000b, FALSE, EInternal());return TRUE;}
|
||
|
BOOL CItem::H0x0320000b_ItemReceived_03(const CEntityEvent &__eeInput){
|
||
|
ASSERT(__eeInput.ee_slEvent==EVENTCODE_EInternal);
|
||
|
#undef STATE_CURRENT
|
||
|
#define STATE_CURRENT 0x0320000b
|
||
|
|
||
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
Return(STATE_CURRENT,EVoid());
|
||
|
#line 308 "D:/SE1_GPL/Sources/EntitiesMP/Item.es"
|
||
|
return TRUE; ASSERT(FALSE); return TRUE;};
|