Files
fs2open.github.com/code/ship/subsysdamage.h
T
Goober5000 099b35c497 scale shield strength according to generator damage
git-svn-id: svn://svn.icculus.org/fs2open/trunk/fs2_open@4022 387891d4-d844-0410-90c0-e4c51a9137d3
2015-04-29 18:42:52 +10:00

121 lines
4.1 KiB
C

/*
* Copyright (C) Volition, Inc. 1999. All rights reserved.
*
* All source code herein is the property of Volition, Inc. You may not sell
* or otherwise commercially exploit the source or things you created based on the
* source.
*
*/
/*
* $Logfile: /Freespace2/code/Ship/SubsysDamage.h $
* $Revision: 2.5 $
* $Date: 2007-02-12 01:24:18 $
* $Author: Goober5000 $
*
* Header file for various subystem damage defines
*
* $Log: not supported by cvs2svn $
* Revision 2.4 2007/02/11 21:42:41 Goober5000
* change a number to a constant
*
* Revision 2.3 2005/11/24 08:46:10 Goober5000
* * cleaned up mission_do_departure
* * fixed a hidden crash (array index being -1; would only
* be triggered for ships w/o subspace drives under certain conditions)
* * removed finding a new fighterbay target because it might screw up missions
* * improved clarity, code flow, and readability :)
* * added custom AI flag for disabling warpouts if navigation subsystem fails
* --Goober5000
*
* Revision 2.2 2005/07/13 03:35:30 Goober5000
* remove PreProcDefine #includes in FS2
* --Goober5000
*
* Revision 2.1 2004/08/11 05:06:34 Kazan
* added preprocdefines.h to prevent what happened with fred -- make sure to make all fred2 headers include this file as the _first_ include -- i have already modified fs2 files to do this
*
* Revision 2.0 2002/06/03 04:02:29 penguin
* Warpcore CVS sync
*
* Revision 1.1 2002/05/02 18:03:13 mharris
* Initial checkin - converted filenames and includes to lower case
*
*
* 2 10/07/98 10:53a Dave
* Initial checkin.
*
* 1 10/07/98 10:51a Dave
*
* 4 4/07/98 5:30p Lawrance
* Player can't send/receive messages when comm is destroyed. Garble
* messages when comm is damaged.
*
* 3 10/13/97 7:42p Lawrance
* added MIN_COMM_STR_RECEIVE_OK
*
* 2 10/11/97 6:38p Lawrance
* move subsys damage #defines to SubsysDamage.h
*
* 1 10/10/97 7:57p Lawrance
*
* $NoKeywords: $
*/
#ifndef __SUBSYS_DAMAGE_H__
#define __SUBSYS_DAMAGE_H__
/////////////////////////////////////////
// engines
/////////////////////////////////////////
#define SHIP_MIN_ENGINES_FOR_FULL_SPEED 0.5f // % engine strength below which ships start slowing down
#define SHIP_MIN_ENGINES_TO_WARP 0.3f // % engine strength required to engage warp
#define ENGINE_MIN_STR 0.15f // if engines are below this level, still contribute this percent to total
// (unless destroyed, then contribute none).
/////////////////////////////////////////
// weapons
/////////////////////////////////////////
#define SUBSYS_WEAPONS_STR_FIRE_OK 0.7f // 70% strength or better, weapons always fire
#define SUBSYS_WEAPONS_STR_FIRE_FAIL 0.2f // below 20%, weapons will not fire
/////////////////////////////////////////
// sensors - targeting
/////////////////////////////////////////
#define SENSOR_STR_TARGET_NO_EFFECTS 0.3f // % strength of sensors at which no negative effects on targeting
#define MIN_SENSOR_STR_TO_TARGET 0.2f // % strength of sensors at which targeting ceases
// to function
/////////////////////////////////////////
// sensors - radar
/////////////////////////////////////////
#define SENSOR_STR_RADAR_NO_EFFECTS 0.4f // % strength of sensors at which no negative effects on radar
#define MIN_SENSOR_STR_TO_RADAR 0.1f // % strength of sensors at which radar ceases to function
/////////////////////////////////////////
// communications
/////////////////////////////////////////
#define MIN_COMM_STR_TO_MESSAGE 0.3f // % strength of communications at which player
// is unable to use squadmate messaging
#define COMM_DESTROYED 0
#define COMM_DAMAGED 1
#define COMM_OK 2
/////////////////////////////////////////
// navigation
/////////////////////////////////////////
#define SHIP_MIN_NAV_TO_WARP 0.3f // % navigation strength required to engage warp
/////////////////////////////////////////
// shields
/////////////////////////////////////////
#define MIN_SHIELDS_FOR_FULL_STRENGTH 0.5f // % shield subsystem strength below which shield becomes less effective
#define MIN_SHIELDS_FOR_FULL_COVERAGE 0.3f // % shield subsystem strength below which shield starts flickering
#endif