sin-2015/PlayerStart.cpp
1999-04-22 00:00:00 +00:00

144 lines
No EOL
4 KiB
C++

// Copyright (C) 1997 by Ritual Entertainment, Inc.
// All rights reserved.
//
// This source is may not be distributed and/or modified without
// expressly written permission by Ritual Entertainment, Inc.
//
// DESCRIPTION:
// Player start location entity declarations
//
#include "g_local.h"
#include "entity.h"
#include "trigger.h"
#include "PlayerStart.h"
//### added start on bike flag
/*****************************************************************************/
/*SINED info_player_start (1 0 0) (-16 -16 0) (16 16 64) ONBIKE
The normal starting point for a level.
/*****************************************************************************/
CLASS_DECLARATION( Entity, PlayerStart, "info_player_start" );
ResponseDef PlayerStart::Responses[] =
{
{ NULL, NULL }
};
PlayerStart::PlayerStart()
{
float angle;
angle = G_GetFloatArg( "angle", 0 );
angles = Vector( 0, angle, 0 );
}
//### added start on bike flag
/*****************************************************************************/
/*SINED info_player_progressivestart (1 0 0) (-16 -16 0) (16 16 64) ONBIKE
Starting point for a level. When triggered, sets next spawnpoint to itself.
Used for respawn point in Sin Arcade. This must have a targetname for it to work.
"starthere" set to 1 to make this the default spawnpoint. (Note: multiple progressive
starts with starthere set will override each other).
/*****************************************************************************/
CLASS_DECLARATION( PlayerStart, ProgressiveStart, "info_player_progressivestart" );
ResponseDef ProgressiveStart::Responses[] =
{
{ &EV_Activate, ( Response )ProgressiveStart::SetSpawnpoint },
{ NULL, NULL }
};
ProgressiveStart::ProgressiveStart()
{
if ( !targetname.length() )
{
gi.error( "ProgressiveStart without targetname at (%f,%f,%f)\n", origin.x, origin.y, origin.z );
}
if ( G_GetIntArg( "starthere" ) )
{
game.spawnpoint = targetname;
}
}
void ProgressiveStart::SetSpawnpoint
(
Event *ev
)
{
game.spawnpoint = targetname;
}
/*****************************************************************************/
/* saved out by quaked in region mode
/*****************************************************************************/
CLASS_DECLARATION( PlayerStart, TestPlayerStart, "testplayerstart" );
ResponseDef TestPlayerStart::Responses[] =
{
{ NULL, NULL }
};
//### added start on bike flag
/*****************************************************************************/
/*SINED info_player_deathmatch (1 0 1) (-16 -16 0) (16 16 64) ONBIKE
potential spawning position for deathmatch games
/*****************************************************************************/
CLASS_DECLARATION( PlayerStart, PlayerDeathmatchStart, "info_player_deathmatch" );
ResponseDef PlayerDeathmatchStart::Responses[] =
{
{ NULL, NULL }
};
//### added start on bike flag
/*****************************************************************************/
/*SINED info_player_coop (1 0 1) (-16 -16 0) (16 16 64) ONBIKE
potential spawning position for coop games
/*****************************************************************************/
CLASS_DECLARATION( PlayerStart, PlayerCoopStart, "info_player_coop" );
ResponseDef PlayerCoopStart::Responses[] =
{
{ NULL, NULL }
};
/*****************************************************************************/
/*SINED info_player_intermission (1 0 1) (-16 -16 0) (16 16 64)
viewing point in between deathmatch levels
/*****************************************************************************/
CLASS_DECLARATION( Camera, PlayerIntermission, "info_player_intermission" );
ResponseDef PlayerIntermission::Responses[] =
{
{ NULL, NULL }
};
PlayerIntermission::PlayerIntermission
(
)
{
currentstate.watch.splineangles = false;
newstate.watch.splineangles = false;
}