mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-19 20:19:50 +02:00
Initial Prey Game integration support.
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
//**************************************************************************
|
||||
//**
|
||||
//** 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 );
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user