/* * This file is generated by Entity Class Compiler, (c) CroTeam 1997-98 */ #line 4 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" #include "StdH.h" #include #include #line 8 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" extern DECL_DLL void JumpFromBouncer(CEntity *penToBounce, CEntity *penBouncer) { CEntity *pen = penToBounce; CBouncer *pbo = (CBouncer *)penBouncer; // if it is a movable model and some time has passed from the last jump if ( (pen->GetRenderType()==CEntity::RT_MODEL) && (pen->GetPhysicsFlags()&EPF_MOVABLE) ) { CMovableEntity *pmen = (CMovableEntity *)pen; if (pmen->en_penReference==NULL) { return; } // give it speed FLOAT3D vDir; AnglesToDirectionVector(pbo->m_aDirection, vDir); pmen->FakeJump(pmen->en_vIntendedTranslation, vDir, pbo->m_fSpeed, -pbo->m_fParallelComponentMultiplier, pbo->m_fNormalComponentMultiplier, pbo->m_fMaxExitSpeed, pbo->m_tmControl); } } void CBouncer::SetDefaultProperties(void) { m_strName = "Bouncer"; m_strDescription = ""; m_fSpeed = 20.0f; m_aDirection = ANGLE3D(0 , 90 , 0); m_tmControl = 5.0f; m_bEntrySpeed = TRUE ; m_fMaxExitSpeed = 200.0f; m_fNormalComponentMultiplier = 1.0f; m_fParallelComponentMultiplier = 0.0f; CRationalEntity::SetDefaultProperties(); } BOOL CBouncer:: #line 51 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" Main(const CEntityEvent &__eeInput) { #undef STATE_CURRENT #define STATE_CURRENT STATE_CBouncer_Main ASSERTMSG(__eeInput.ee_slEvent==EVENTCODE_EVoid, "CBouncer::Main expects 'EVoid' as input!"); const EVoid &e = (const EVoid &)__eeInput; #line 53 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" InitAsBrush (); #line 54 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" SetPhysicsFlags (EPF_BRUSH_FIXED | EPF_NOIMPACT ); #line 55 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" SetCollisionFlags (ECF_BRUSH ); #line 58 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" if(! m_bEntrySpeed ) #line 59 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" { #line 61 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" m_fNormalComponentMultiplier = 0.0f; #line 62 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" m_bEntrySpeed = TRUE ; #line 63 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" } #line 64 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" Return(STATE_CURRENT,EVoid()); #line 64 "D:/SE1_GPL/Sources/EntitiesMP/Bouncer.es" return TRUE; ASSERT(FALSE); return TRUE;};