mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-16 16:20:42 +02:00
71 lines
2.0 KiB
C++
71 lines
2.0 KiB
C++
//**************************************************************************
|
|
//**
|
|
//** PREY_SPIRITBRIDGE.CPP
|
|
//**
|
|
//** Game code for the spirit bridge
|
|
//**************************************************************************
|
|
|
|
// HEADER FILES ------------------------------------------------------------
|
|
|
|
#include "precompiled.h"
|
|
#pragma hdrstop
|
|
|
|
#include "prey_local.h"
|
|
|
|
// MACROS ------------------------------------------------------------------
|
|
|
|
// TYPES -------------------------------------------------------------------
|
|
|
|
// CLASS DECLARATIONS ------------------------------------------------------
|
|
|
|
CLASS_DECLARATION( idEntity, hhSpiritBridge )
|
|
EVENT( EV_Activate, hhSpiritBridge::Event_Activate )
|
|
END_CLASS
|
|
|
|
// EXTERNAL FUNCTION PROTOTYPES --------------------------------------------
|
|
|
|
// PRIVATE FUNCTION PROTOTYPES ---------------------------------------------
|
|
|
|
// EXTERNAL DATA DECLARATIONS ----------------------------------------------
|
|
|
|
// PUBLIC DATA DEFINITIONS -------------------------------------------------
|
|
|
|
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
|
|
|
// CODE --------------------------------------------------------------------
|
|
|
|
//==========================================================================
|
|
//
|
|
// hhSpiritBridge::Spawn
|
|
//
|
|
//==========================================================================
|
|
|
|
void hhSpiritBridge::Spawn(void) {
|
|
fl.takedamage = false;
|
|
|
|
if ( !spawnArgs.GetInt( "start_off" ) ) {
|
|
GetPhysics()->SetContents( CONTENTS_SPIRITBRIDGE );
|
|
} else { // Start the bridge off
|
|
GetPhysics()->SetContents( 0 );
|
|
Hide();
|
|
}
|
|
|
|
SetShaderParm( SHADERPARM_MODE, gameLocal.random.CRandomFloat() );
|
|
}
|
|
|
|
//==========================================================================
|
|
//
|
|
// hhSpiritBridge::Event_Activate
|
|
//
|
|
//==========================================================================
|
|
|
|
void hhSpiritBridge::Event_Activate( idEntity *activator ) {
|
|
if ( IsHidden() ) {
|
|
Show();
|
|
GetPhysics()->SetContents( CONTENTS_SPIRITBRIDGE );
|
|
} else {
|
|
Hide();
|
|
GetPhysics()->SetContents( 0 );
|
|
}
|
|
}
|