Beispiel #1
0
// display switching stuff ----------------------------------------------------
//
INLINE
void User_ViewKillStats()
{
	if ( GAME_MODE_ACTIVE() && AUX_HUD_ADVANCED_KILLSTATS ) {

		if ( DepressedKeys->key_ShowKillStats ) {
			SlideInListWindow();
		} else {
			SlideOutListWindow();
		}
	}
}
Beispiel #2
0
// perform self running ship actions ------------------------------------------
//
void OBJ_PerformShipActions()
{
	//NOTE:
	// this function gets called once per
	// frame by the game loop (G_MAIN.C).

	ASSERT( GAME_MODE_ACTIVE() );

	// walk all ship objects
	ShipObject *scanpo = FetchFirstShip();
	for ( ; scanpo; scanpo = (ShipObject *) scanpo->NextObj ) {

		ASSERT( OBJECT_TYPE_SHIP( scanpo ) );

		// perform bouncing for non-local ship
		if ( scanpo->BounceCount > 0 ) {
			scanpo->ObjPosition[ 0 ][ 3 ] += scanpo->BounceVec.X * CurScreenRefFrames;
			scanpo->ObjPosition[ 1 ][ 3 ] += scanpo->BounceVec.Y * CurScreenRefFrames;
			scanpo->ObjPosition[ 2 ][ 3 ] += scanpo->BounceVec.Z * CurScreenRefFrames;
			scanpo->BounceCount -= CurScreenRefFrames;
		}
	}

	// perform bouncing for local ship
	if ( MyShip->BounceCount > 0 ) {

		Vector3 mybounce;
		mybounce.X = MyShip->BounceVec.X * CurScreenRefFrames;
		mybounce.Y = MyShip->BounceVec.Y * CurScreenRefFrames;
		mybounce.Z = MyShip->BounceVec.Z * CurScreenRefFrames;

		ShipViewCamera[ 0 ][ 3 ] -= mybounce.X;
		ShipViewCamera[ 1 ][ 3 ] -= mybounce.Y;
		ShipViewCamera[ 2 ][ 3 ] -= mybounce.Z;

		if ( !ObjCameraActive ) {

			PseudoStarMovement[ 0 ][ 3 ] -= mybounce.X;
			PseudoStarMovement[ 1 ][ 3 ] -= mybounce.Y;
			PseudoStarMovement[ 2 ][ 3 ] -= mybounce.Z;

		} else {

			Vector3 dirvec;
			MtxVctMULt( ObjectCamera, &mybounce, &dirvec );
			PseudoStarMovement[ 0 ][ 3 ] -= dirvec.X;
			PseudoStarMovement[ 1 ][ 3 ] -= dirvec.Y;
			PseudoStarMovement[ 2 ][ 3 ] -= dirvec.Z;
		}

		MyShip->BounceCount -= CurScreenRefFrames;
	}
}
Beispiel #3
0
// handle object camera enabling/disabling via keypress -----------------------
//
void ObjectCameraControl()
{
	// toggle object camera
	if ( DepressedKeys->key_ToggleObjCamera ) {
		DepressedKeys->key_ToggleObjCamera = 0;

		// toggling only allowed outside entrymode/floating menu
		if ( GAME_MODE_ACTIVE() ) {

			if ( ObjCameraActive ) {
				ObjCamOff();
			} else {
				ObjCamOn();
			}
		}
	}
}
Beispiel #4
0
// select crosshair target ----------------------------------------------------
//
PRIVATE
int Cmd_CROSSTARGET( char *paramstr )
{
	//NOTE:
	//CONCOM:
	// crosstarget_command ::= 'crosstarget'

	ASSERT( paramstr != NULL );
	HANDLE_COMMAND_DOMAIN_SEP( paramstr );

	if ( strtok( paramstr, " " ) == NULL ) {

		if ( GAME_MODE_ACTIVE() ) {
			SelectCrosshairTarget();
		}

	} else {
		CON_AddLine( too_many_args );
	}

	return TRUE;
}