src/hcode/btech/mech.h

Go to the documentation of this file.
00001 /*
00002  * Author: Markus Stenberg <fingon@iki.fi>
00003  *
00004  *  Copyright (c) 1996 Markus Stenberg
00005  *  Copyright (c) 1998-2002 Thomas Wouters
00006  *  Copyright (c) 2000-2002 Cord Awtry
00007  *  Copyright (c) 1999-2005 Kevin Stevens
00008  *       All rights reserved
00009  */
00010 
00011 #include "config.h"
00012 
00013 #ifndef MECH_H
00014 #define MECH_H
00015 
00016 #include "externs.h"
00017 #include "db.h"
00018 #include "attrs.h"
00019 #include "powers.h"
00020 #include "mech.stat.h"
00021 #include "muxevent.h"
00022 #include "p.event.h"
00023 
00024 #include "btconfig.h"
00025 #include "mymath.h"
00026 
00027 #define NUM_ITEMS       1024
00028 #define NUM_ITEMS_M     512
00029 #define NUM_BAYS        4
00030 #define NUM_TURRETS     3
00031 #define C3I_NETWORK_SIZE 5
00032 #define C3_NETWORK_SIZE 11      /* Constant for the max size of the network */
00033 #define BRANDCOUNT      5
00034 
00035 #define LEFTSIDE        1
00036 #define RIGHTSIDE       2
00037 #define FRONT           3
00038 #define BACK            4
00039 
00040 #define STAND           1
00041 #define FALL            0
00042 
00043 #define TURN            30              /* 30 sec turn */
00044 #define KPH_PER_MP      10.75
00045 #define MP_PER_KPH      0.0930233       /* 1/KPH_PER_MP  */
00046 #define MP_PER_UPDATE_PER_KPH 0.003100777       /* MP_PER_KPH/30 */
00047 #define SCALEMAP        322.5           /* 1/update      */
00048 #define HEXLEVEL        5               /* levels/hex    */
00049 #define ZSCALE          64.5            /* scalemap/hexlevel */
00050 #define XSCALE          0.1547          /* hex constant  */
00051 #define YSCALE2         9.61482e-6      /* update**2     */
00052 #define MP1             10.75           /* 2*MS_PER_MP   */
00053 #define MP2             21.50           /* 2*MS_PER_MP   */
00054 #define MP3             32.25           /* 3*MS_PER_MP   */
00055 #define MP4             43.00           /* 4*MS_PER_MP   */
00056 #define MP5             53.75           /* 5*MS_PER_MP   */
00057 #define MP6             64.50           /* 6*MS_PER_MP   */
00058 #define MP9             96.75           /* 9*MS_PER_MP   */
00059 #define DELTAFACING     1440.0
00060 
00061 #define DEFAULT_FREQS   5
00062 #define FREQS           16
00063 
00064 #define FREQ_DIGITAL    1
00065 #define FREQ_MUTE       2       /* For digital transmissions */
00066 #define FREQ_RELAY      4       /* For digital transmissions */
00067 #define FREQ_INFO       8       /* For digital transmissions */
00068 #define FREQ_SCAN       16
00069 #define FREQ_REST       32
00070 
00071 #define RADIO_RELAY     1       /* ability to relay things */
00072 #define RADIO_INFO      2       /* ability to see where (digital) message comes from */
00073 #define RADIO_SCAN      4       /* ability to scan for frequencies */
00074 #define RADIO_NODIGITAL 8       /* lacks the ability to hear or set digital freqs */
00075 
00076 #define CHTITLELEN      15
00077 
00078 #define NOT_FOUND       -1
00079 #define NUM_CRITICALS   12
00080 
00081 #define ARMOR           1
00082 #define INTERNAL        2
00083 #define REAR            3
00084 
00085 #define NOARC           0
00086 #define FORWARDARC      1
00087 #define LSIDEARC        2
00088 #define RSIDEARC        4
00089 #define REARARC         8
00090 #define TURRETARC       16
00091 
00092 /*
00093    Critical Types
00094    0       Empty
00095    1-192   Weapons
00096    193-384 Ammo
00097    385-394 Bombs (Aero/VTOL droppable)
00098    395-511 Special startings...
00099  */
00100 
00101 /* Critical Types... */
00102 #define NUM_WEAPONS     192
00103 #define NUM_BOMBS       9
00104 
00105 #define EMPTY                   0
00106 #define WEAPON_BASE_INDEX       1
00107 #define AMMO_BASE_INDEX         (WEAPON_BASE_INDEX + NUM_WEAPONS)       /* 193 */
00108 #define BOMB_BASE_INDEX         (AMMO_BASE_INDEX + NUM_WEAPONS)         /* 385 */
00109 #define SPECIAL_BASE_INDEX      (BOMB_BASE_INDEX + NUM_BOMBS)           /* 394 */
00110 #define OSPECIAL_BASE_INDEX     220
00111 #define CARGO_BASE_INDEX        512
00112 
00113 #ifdef BT_ADVANCED_ECON
00114 #define SPECIALCOST_SIZE        (CARGO_BASE_INDEX - SPECIAL_BASE_INDEX)
00115 #define AMMOCOST_SIZE           NUM_WEAPONS
00116 #define WEAPCOST_SIZE           NUM_WEAPONS
00117 #define CARGOCOST_SIZE          (NUM_ITEMS - NUM_ITEMS_M)
00118 #define BOMBCOST_SIZE           NUM_BOMBS
00119 #endif
00120 
00121 #define IsAmmo(a)           ((a) >= AMMO_BASE_INDEX && (a) < BOMB_BASE_INDEX)
00122 #define IsBomb(a)           ((a) >= BOMB_BASE_INDEX && (a) < SPECIAL_BASE_INDEX)
00123 #define IsSpecial(a)        ((a) >= SPECIAL_BASE_INDEX && (a) < CARGO_BASE_INDEX)
00124 #define IsCargo(a)          ((a) >= CARGO_BASE_INDEX)
00125 #define IsActuator(a)       (IsSpecial(a) && a <= I2Special(HAND_OR_FOOT_ACTUATOR))
00126 #define IsWeapon(a)         ((a) >= WEAPON_BASE_INDEX && (a) < AMMO_BASE_INDEX)
00127 #define IsArtillery(a)      (MechWeapons[a].type==TARTILLERY)
00128 #define IsMissile(a)        (MechWeapons[a].type==TMISSILE)
00129 #define IsBallistic(a)      (MechWeapons[a].type==TAMMO)
00130 #define IsEnergy(a)         (MechWeapons[a].type==TBEAM)
00131 
00132 /* Fun Weapons that do affects */
00133 #define IsFlamer(a)         (strstr(MechWeapons[a].name, "Flamer"))
00134 #define IsCoolant(a)        (strstr(MechWeapons[a].name, "Coolant"))
00135 #define IsAcid(a)           (strstr(MechWeapons[a].name, "Acid"))
00136 
00137 #ifdef BT_EXILE_MW3STATS
00138 #endif
00139 
00140 #define GunRangeWithCheck(mech,sec,a) (SectionUnderwater(mech,sec) > 0 ? GunWaterRange(a) : IsArtillery(a)?(ARTILLERY_MAPSHEET_SIZE * MechWeapons[a].longrange):(MechWeapons[a].longrange))
00141 #define EGunRangeWithCheck(mech,sec,a) ((SectionUnderwater(mech,sec) > 0) ? EGunWaterRange(a) : (mudconf.btech_erange && (MechWeapons[a].medrange * 2) > GunRange(a)) ? (MechWeapons[a].medrange * 2) : GunRange(a))
00142 #define GunRange(a)     (IsArtillery(a)?(ARTILLERY_MAPSHEET_SIZE * MechWeapons[a].longrange):(MechWeapons[a].longrange))
00143 #define EGunRange(a)    ((mudconf.btech_erange && (MechWeapons[a].medrange * 2) > GunRange(a)) ? (MechWeapons[a].medrange * 2) : GunRange(a))
00144 #define GunWaterRange(a)        (MechWeapons[a].longrange_water > 0 ? MechWeapons[a].longrange_water : MechWeapons[a].medrange_water > 0 ? MechWeapons[a].medrange_water : MechWeapons[a].shortrange_water > 0 ? MechWeapons[a].shortrange_water : 0)
00145 #define EGunWaterRange(a)       ((mudconf.btech_erange && ((MechWeapons[a].medrange_water * 2) > GunWaterRange(a)) && (MechWeapons[a].longrange_water > 0)) ? (MechWeapons[a].medrange_water * 2) : GunWaterRange(a))
00146 #define SectionUnderwater(mech,sec) (MechZ(mech) >= 0 ? 0 : (MechZ(mech) < -1) || (Fallen(mech)) ? 1 : ((sec == LLEG) || (sec == RLEG)) || (MechIsQuad(mech) && ((sec == LARM) || (sec == RARM))) ? 1 : 0)
00147 
00148 #define Ammo2WeaponI(a) ((a) - AMMO_BASE_INDEX)
00149 #define Ammo2Weapon(a)  Ammo2WeaponI(a)
00150 #define Ammo2I(a)       Ammo2Weapon(a)
00151 #define Bomb2I(a)       ((a) - BOMB_BASE_INDEX)
00152 #define Special2I(a)    ((a) - SPECIAL_BASE_INDEX)
00153 #define Cargo2I(a)      ((a) - CARGO_BASE_INDEX)
00154 #define Weapon2I(a)     ((a) - WEAPON_BASE_INDEX)
00155 #define I2Bomb(a)       ((a) + BOMB_BASE_INDEX)
00156 #define I2Weapon(a)     ((a) + WEAPON_BASE_INDEX)
00157 #define I2Ammo(a)       ((a) + AMMO_BASE_INDEX)
00158 #define I2Special(a)    ((a) + SPECIAL_BASE_INDEX)
00159 #define I2Cargo(a)      ((a) + CARGO_BASE_INDEX)
00160 #define Special         I2Special
00161 #define Cargo           I2Cargo
00162 
00163 /* To define one of these-> x=SPECIAL_BASE_INDEX+SHOULDER_OR_HIP */
00164 #define SHOULDER_OR_HIP               0
00165 #define UPPER_ACTUATOR                1
00166 #define LOWER_ACTUATOR                2
00167 #define HAND_OR_FOOT_ACTUATOR         3
00168 #define LIFE_SUPPORT                  4
00169 #define SENSORS                       5
00170 #define COCKPIT                       6
00171 #define ENGINE                        7
00172 #define GYRO                          8
00173 #define HEAT_SINK                     9
00174 #define JUMP_JET                     10
00175 #define CASE                         11
00176 #define FERRO_FIBROUS                12
00177 #define ENDO_STEEL                   13
00178 #define TRIPLE_STRENGTH_MYOMER       14
00179 #define TARGETING_COMPUTER           15
00180 #define MASC                         16
00181 #define C3_MASTER                    17
00182 #define C3_SLAVE                     18
00183 #define BEAGLE_PROBE                 19
00184 #define ARTEMIS_IV                   20
00185 #define ECM                          21
00186 #define AXE                          22
00187 #define SWORD                        23
00188 #define MACE                         24
00189 #define CLAW                         25
00190 #define DS_AERODOOR                  26
00191 #define DS_MECHDOOR                  27
00192 #define FUELTANK                     28
00193 #define TAG                          29
00194 #define DS_TANKDOOR                  30
00195 #define DS_CARGODOOR                 31
00196 #define LAMEQUIP                     32
00197 #define CASE_II                      33
00198 #define STEALTH_ARMOR                34
00199 #define NULL_SIGNATURE_SYSTEM        35
00200 #define C3I                          36
00201 #define ANGELECM                     37
00202 #define HVY_FERRO_FIBROUS            38
00203 #define LT_FERRO_FIBROUS             39
00204 #define BLOODHOUND_PROBE             40
00205 #define PURIFIER_ARMOR               41
00206 #define KAGE_STEALTH_UNIT            42
00207 #define ACHILEUS_STEALTH_UNIT        43
00208 #define INFILTRATOR_STEALTH_UNIT     44
00209 #define INFILTRATORII_STEALTH_UNIT   45
00210 #define SUPERCHARGER                 46
00211 #define DUAL_SAW                     47
00212 
00213 #define LBX2_AMMO               0
00214 #define LBX5_AMMO               1
00215 #define LBX10_AMMO              2
00216 #define LBX20_AMMO              3
00217 #define LRM_AMMO                4
00218 #define SRM_AMMO                5
00219 #define SSRM_AMMO               6
00220 #define NARC_LRM_AMMO           7
00221 #define NARC_SRM_AMMO           8
00222 #define NARC_SSRM_AMMO          9
00223 #define ARTEMIS_LRM_AMMO        10
00224 #define ARTEMIS_SRM_AMMO        11
00225 #define ARTEMIS_SSRM_AMMO       12
00226 
00227 #define PETROLEUM               13
00228 #define PHOSPHORUS              14
00229 #define HYDROGEN                15
00230 #define GOLD                    16
00231 #define NATURAL_EXTRACTS        17
00232 #define MARIJUANA               18
00233 #define SULFUR                  19
00234 #define SODIUM                  20
00235 #define PLUTONIUM               21
00236 #define ORE                     22
00237 #define METAL                   23
00238 #define PLASTICS                24
00239 #define MEDICAL_SUPPLIES        25
00240 #define COMPUTERS               26
00241 #define EXPLOSIVES              27
00242 
00243 #define ES_INTERNAL             28
00244 #define FF_ARMOR                29
00245 #define XL_ENGINE               30
00246 #define DOUBLE_HEAT_SINK        31
00247 #define IC_ENGINE               32
00248 
00249 #define S_ELECTRONIC            33
00250 #define S_INTERNAL              34
00251 #define S_ARMOR                 35
00252 #define S_ACTUATOR              36
00253 #define S_AERO_FUEL             37
00254 #define S_DS_FUEL               38
00255 #define S_VTOL_FUEL             39
00256 
00257 #define SWARM_LRM_AMMO          40
00258 #define SWARM1_LRM_AMMO         41
00259 #define INFERNO_SRM_AMMO        42
00260 
00261 #define XXL_ENGINE              43
00262 #define COMP_ENGINE             44
00263 
00264 #define HD_ARMOR                45
00265 #define RE_INTERNAL             46
00266 #define CO_INTERNAL             47
00267 #define MRM_AMMO                48
00268 #define LIGHT_ENGINE            49
00269 #define CASEII                  50
00270 #define STH_ARMOR               51
00271 #define NULLSIGSYS              52
00272 #define SILICON                 53
00273 #define HVY_FF_ARMOR            54
00274 #define LT_FF_ARMOR             55
00275 
00276 #define INARC_EXPLO_AMMO        56
00277 #define INARC_HAYWIRE_AMMO      57
00278 #define INARC_ECM_AMMO          58
00279 #define INARC_NEMESIS_AMMO      59
00280 
00281 #define AC2_AP_AMMO             60
00282 #define AC5_AP_AMMO             61
00283 #define AC10_AP_AMMO            62
00284 #define AC20_AP_AMMO            63
00285 #define LAC2_AP_AMMO            64
00286 #define LAC5_AP_AMMO            65
00287 #define AC2_FLECHETTE_AMMO      66
00288 #define AC5_FLECHETTE_AMMO      67
00289 #define AC10_FLECHETTE_AMMO     68
00290 #define AC20_FLECHETTE_AMMO     69
00291 #define LAC2_FLECHETTE_AMMO     70
00292 #define LAC5_FLECHETTE_AMMO     71
00293 #define AC2_INCENDIARY_AMMO     72
00294 #define AC5_INCENDIARY_AMMO     73
00295 #define AC10_INCENDIARY_AMMO    74
00296 #define AC20_INCENDIARY_AMMO    75
00297 #define LAC2_INCENDIARY_AMMO    76
00298 #define LAC5_INCENDIARY_AMMO    77
00299 #define AC2_PRECISION_AMMO      78
00300 #define AC5_PRECISION_AMMO      79
00301 #define AC10_PRECISION_AMMO     80
00302 #define AC20_PRECISION_AMMO     81
00303 #define LAC2_PRECISION_AMMO     82
00304 #define LAC5_PRECISION_AMMO     83
00305 #define LR_DFM_AMMO             84
00306 #define SR_DFM_AMMO             85
00307 #define SLRM_AMMO               86
00308 #define ELRM_AMMO               87
00309 #define BSUIT_SENSOR            88
00310 #define BSUIT_LIFESUPPORT       89
00311 #define BSUIT_ELECTRONIC        90
00312 #define CARGO_OIL               91
00313 #define CARGO_WATER             92
00314 #define CARGO_EARTH             93
00315 #define CARGO_OXYGEN            94
00316 #define CARGO_NITROGEN          95
00317 #define CARGO_NICKEL            96
00318 #define CARGO_STEEL             97
00319 #define CARGO_IRON              98
00320 #define CARGO_BRASS             99
00321 #define CARGO_PLATINUM          100
00322 #define CARGO_COPPER            101
00323 #define CARGO_ALUMINUM          102
00324 #define CARGO_CONSUMER_GOOD     103
00325 #define CARGO_MACHINERY         104
00326 #define CARGO_SLAVES            105
00327 #define CARGO_TIMBIQUI_DARK     106
00328 #define CARGO_COCAINE           107
00329 #define CARGO_HEROINE           108
00330 #define CARGO_MARBLE            109
00331 #define CARGO_GLASS             110
00332 #define CARGO_DIAMOND           111
00333 #define CARGO_COAL              112
00334 #define CARGO_FOOD              113
00335 #define CARGO_ZINC              114
00336 #define CARGO_FABRIC            115
00337 #define CARGO_CLOTHING          116
00338 #define CARGO_WOOD              117
00339 #define CARGO_PULP              118
00340 #define CARGO_LUMBER            119
00341 #define CARGO_RUBBER            120
00342 #define CARGO_SEEDS             121
00343 #define CARGO_FERTILIZER        122
00344 #define CARGO_SALT              123
00345 #define CARGO_LITHIUM           124
00346 #define CARGO_HELIUM            125
00347 #define CARGO_LARIUM            126
00348 #define CARGO_URANIUM           127
00349 #define CARGO_IRIDIUM           128
00350 #define CARGO_TITANIUM          129
00351 #define CARGO_CONCRETE          130
00352 #define CARGO_FERROCRETE        131
00353 #define CARGO_BUILDING_SUPPLIES 132
00354 #define CARGO_KEVLAR            133
00355 #define CARGO_WASTE             134
00356 #define CARGO_LIVESTOCK         135
00357 #define CARGO_PAPER             136
00358 #define XL_GYRO                 137
00359 #define HD_GYRO                 138
00360 #define COMP_GYRO               139
00361 #define COMPACT_HEAT_SINK       140
00362 #define AMMO_LRM_STINGER        141
00363 #define AC2_CASELESS_AMMO       142
00364 #define AC5_CASELESS_AMMO       143
00365 #define AC10_CASELESS_AMMO      144
00366 #define AC20_CASELESS_AMMO      145
00367 #define LAC2_CASELESS_AMMO      146
00368 #define LAC5_CASELESS_AMMO      147
00369 #define AMMO_LRM_SGUIDED        148
00370 
00371 #ifdef BT_COMPLEXREPAIRS
00372 #define TON_SENSORS_FIRST       149
00373 #define TON_SENSORS_LAST        (TON_SENSORS_FIRST + 9)
00374 
00375 #define TON_MYOMER_FIRST        (TON_SENSORS_LAST + 1)
00376 #define TON_MYOMER_LAST         (TON_MYOMER_FIRST + 9)
00377 
00378 #define TON_TRIPLEMYOMER_FIRST  (TON_MYOMER_LAST + 1)
00379 #define TON_TRIPLEMYOMER_LAST   (TON_TRIPLEMYOMER_FIRST + 9)
00380 
00381 #define TON_INTERNAL_FIRST      (TON_TRIPLEMYOMER_LAST + 1)
00382 #define TON_INTERNAL_LAST       (TON_INTERNAL_FIRST + 9)
00383 
00384 #define TON_ESINTERNAL_FIRST    (TON_INTERNAL_LAST + 1)
00385 #define TON_ESINTERNAL_LAST     (TON_ESINTERNAL_FIRST + 9)
00386 
00387 #define TON_JUMPJET_FIRST       (TON_ESINTERNAL_LAST + 1)
00388 #define TON_JUMPJET_LAST        (TON_JUMPJET_FIRST + 9)
00389 
00390 #define TON_ARMUPPER_FIRST      (TON_JUMPJET_LAST + 1)
00391 #define TON_ARMUPPER_LAST       (TON_ARMUPPER_FIRST + 9)
00392 
00393 #define TON_ARMLOWER_FIRST      (TON_ARMUPPER_LAST + 1)
00394 #define TON_ARMLOWER_LAST       (TON_ARMLOWER_FIRST + 9)
00395 
00396 #define TON_ARMHAND_FIRST       (TON_ARMLOWER_LAST + 1)
00397 #define TON_ARMHAND_LAST        (TON_ARMHAND_FIRST + 9)
00398 
00399 #define TON_LEGUPPER_FIRST      (TON_ARMHAND_LAST + 1)
00400 #define TON_LEGUPPER_LAST       (TON_LEGUPPER_FIRST + 9)
00401 
00402 #define TON_LEGLOWER_FIRST      (TON_LEGUPPER_LAST + 1)
00403 #define TON_LEGLOWER_LAST       (TON_LEGLOWER_FIRST + 9)
00404 
00405 #define TON_LEGFOOT_FIRST       (TON_LEGLOWER_LAST + 1)
00406 #define TON_LEGFOOT_LAST        (TON_LEGFOOT_FIRST + 9)
00407 
00408 #define TON_ENGINE_FIRST        (TON_LEGFOOT_LAST + 1)
00409 #define TON_ENGINE_LAST         (TON_ENGINE_FIRST + 19)
00410 
00411 #define TON_ENGINE_XL_FIRST     (TON_ENGINE_LAST + 1)
00412 #define TON_ENGINE_XL_LAST      (TON_ENGINE_XL_FIRST + 19)
00413 
00414 #define TON_ENGINE_ICE_FIRST    (TON_ENGINE_XL_LAST + 1)
00415 #define TON_ENGINE_ICE_LAST     (TON_ENGINE_ICE_FIRST + 19)
00416 
00417 
00418 #define TON_ENGINE_LIGHT_FIRST  (TON_ENGINE_ICE_LAST + 1)
00419 #define TON_ENGINE_LIGHT_LAST   (TON_ENGINE_LIGHT_FIRST + 19)
00420 
00421 #define TON_COINTERNAL_FIRST    (TON_ENGINE_LIGHT_LAST + 1)
00422 #define TON_COINTERNAL_LAST     (TON_COINTERNAL_FIRST + 9)
00423 
00424 
00425 #define TON_REINTERNAL_FIRST    (TON_COINTERNAL_LAST + 1)
00426 #define TON_REINTERNAL_LAST     (TON_REINTERNAL_FIRST + 9)
00427 
00428 #define TON_GYRO_FIRST          (TON_REINTERNAL_LAST + 1)
00429 #define TON_GYRO_LAST           (TON_GYRO_FIRST + 3)
00430 
00431 #define TON_XLGYRO_FIRST        (TON_GYRO_LAST + 1)
00432 #define TON_XLGYRO_LAST         (TON_XLGYRO_FIRST + 3)
00433 
00434 #define TON_HDGYRO_FIRST        (TON_XLGYRO_LAST + 1)
00435 #define TON_HDGYRO_LAST         (TON_HDGYRO_FIRST + 3)
00436 
00437 #define TON_CGYRO_FIRST         (TON_HDGYRO_LAST + 1)
00438 #define TON_CGYRO_LAST          (TON_CGYRO_FIRST + 3)
00439 
00440 #define TON_ENGINE_XXL_FIRST    (TON_CGYRO_LAST + 1)
00441 #define TON_ENGINE_XXL_LAST     (TON_ENGINE_XXL_FIRST + 19)
00442 
00443 #define TON_ENGINE_COMP_FIRST   (TON_ENGINE_XXL_LAST + 1)
00444 #define TON_ENGINE_COMP_LAST    (TON_ENGINE_COMP_FIRST + 19)
00445 #endif
00446 
00447 
00448 /* Weapons structure and array... */
00449 #define TBEAM           0
00450 #define TMISSILE        1
00451 #define TARTILLERY      2
00452 #define TAMMO           3
00453 #define THAND           4
00454 
00455 /* Tic status */
00456 
00457 #define TIC_NUM_DESTROYED       -2
00458 #define TIC_NUM_RELOADING       -3
00459 #define TIC_NUM_RECYCLING       -4
00460 #define TIC_NUM_PHYSICAL        -5
00461 
00462 /* This is the max weapons per area- assuming 12 critical location and */
00463  /* the smallest weapon requires 1 */
00464 #define MAX_WEAPS_SECTION       12
00465 
00466 struct weapon_struct {
00467     char *name;
00468     char vrt;
00469     char type;
00470     char heat;
00471     char damage;
00472     char min;
00473     int shortrange;
00474     int medrange;
00475     int longrange;
00476     char min_water;
00477     int shortrange_water;
00478     int medrange_water;
00479     int longrange_water;
00480     char criticals;
00481     unsigned char ammoperton;
00482     unsigned short weight;      /* in 1/100ths tons */
00483     short explosiondamage;      /* Damage done when exploding (GR/LGR/HGR) */
00484     long special;
00485     int battlevalue;
00486 };
00487 
00488 /* special weapon effects */
00489 #define NONE            0x00000000
00490 #define PULSE           0x00000001      /* Pulse laser */
00491 #define LBX             0x00000002      /* LBX AC */
00492 #define ULTRA           0x00000004      /* Ultra AC */
00493 #define STREAK          0x00000008      /* Streak missile */
00494 #define GAUSS           0x00000010      /* Gauss weapon */
00495 #define NARC            0x00000020      /* NARC launcher */
00496 #define IDF             0x00000040      /* Can be used w/ IDF */
00497 #define DAR             0x00000080      /* Has artillery-level delay on hit (1sec/2hex) */
00498 #define HYPER           0x00000100      /* Hyper AC */
00499 #define A_POD           0x00000200      /* Anti-infantry Pod */
00500 #define CLAT            0x00000400      /* Clan-tech */
00501 #define NOSPA           0x00000800      /* Does not allow special ammo (swarm, etc) */
00502 #define PC_HEAT         0x00001000      /* Heat-based PC weapon (laser/inferno/..) */
00503 #define PC_IMPA         0x00002000      /* Impact (weapons) */
00504 #define PC_SHAR         0x00004000      /* Shrapnel / slash (various kinds of weapons) */
00505 #define AMS             0x00008000      /* AntiMissileSystem */
00506 #define NOBOOM          0x00010000      /* No ammo boom */
00507 #define CASELESS        0x00020000      /* Caseless AC */
00508 #define DFM             0x00040000      /* DFM - 2 worst rolls outta 3 for missiles */
00509 #define ELRM            0x00080000      /* ELRM - 2 worst rolls outta 3 for missiles under */
00510 #define MRM             0x00100000      /* MRM - +1 BTH */
00511 #define CHEAT           0x00200000      /* Can cause heat or damage */
00512 #define HVYW            0x00400000      /* Clam HeavyWeapons (call 'm so cuz FA$A will undoubtly bring more variants to the lasers) */
00513 #define RFAC            0x00800000      /* Rapid fire ACs */
00514 #define GMG             0x01000000      /* Gattling MGs */
00515 #define INARC           0x02000000      /* iNARC launcher */
00516 #define RAC             0x04000000      /* Rotary AC */
00517 #define HVYGAUSS        0x08000000      /* Heavy Gauss */
00518 #define ROCKET          0x10000000      /* Rocket launchers. +1 to hit, one shot wonders */
00519 
00520 #define PCOMBAT         (PC_HEAT|PC_IMPA|PC_SHAR)
00521 
00522 #define MAX_ROLL 11
00523 struct missile_hit_table_struct {
00524     char *name;
00525     int key;
00526     int num_missiles[MAX_ROLL];
00527 };
00528 
00529 /* Section #defs... */
00530 
00531 /* The unusual order is related to the locations of weapons of high */
00532 
00533 /* magnitude versus weapons of low mag */
00534 #define LARM            0
00535 #define RARM            1
00536 #define LTORSO          2
00537 #define RTORSO          3
00538 #define CTORSO          4
00539 #define LLEG            5
00540 #define RLEG            6
00541 #define HEAD            7
00542 #define NUM_SECTIONS    8
00543 
00544 /*  These defs are for Vehicles */
00545 #define LSIDE           0
00546 #define RSIDE           1
00547 #define FSIDE           2
00548 #define BSIDE           3
00549 #define TURRET          4
00550 #define ROTOR           5
00551 #define NUM_VEH_SECTIONS 6
00552 
00553 /* Aerofighter */
00554 #define AERO_NOSE       0
00555 #define AERO_LWING      1
00556 #define AERO_RWING      2
00557 #define AERO_AFT        3
00558 #define NUM_AERO_SECTIONS 4
00559 
00560 #define NUM_BSUIT_MEMBERS 8
00561 
00562 #define DS_RWING        0       /* Right Front Side / Right Wing */
00563 #define DS_LWING        1       /* Left Front Side / Left Wing */
00564 #define DS_LRWING       2       /* Left Rear Side */
00565 #define DS_RRWING       3       /* Right Rear Side / Right Wing */
00566 #define DS_AFT          4
00567 #define DS_NOSE         5
00568 
00569 #define NUM_DS_SECTIONS 6
00570 #define SpheroidDS(a) (MechType(a)==CLASS_SPHEROID_DS)
00571 #define SpheroidToRear(mech,a) \
00572 if (MechType(mech) == CLASS_SPHEROID_DS) \
00573         (a) = ((a) == DS_LWING ? DS_LRWING : DS_RRWING)
00574 
00575 
00576 #define NUM_TICS                4
00577 #define MAX_WEAPONS_PER_MECH    96      /* Thanks to crit limits */
00578 #define SINGLE_TICLONG_SIZE     32
00579 #define TICLONGS                (MAX_WEAPONS_PER_MECH / SINGLE_TICLONG_SIZE)
00580 
00581 /* structure for each critical hit section */
00582 struct critical_slot {
00583     unsigned char brand;        /* Hold brand number, and damage (upper 4 bits) */
00584     unsigned char data;         /* Holds information like ammo remaining, etc */
00585     unsigned short type;        /* Type of item that this is a critical for */
00586     unsigned int firemode;      /* Holds info like rear mount, ultra mode... */
00587     unsigned int ammomode;      /* Holds info for the special ammo type in use */
00588     unsigned int weapDamageFlags;       /* Holds the enhanced critical damage flags */
00589     short desiredAmmoLoc;       /* Location of the desired ammo bin */
00590 //    unsigned int recycle;   /* time when it will finish recycling */
00591 };
00592 
00593 /* Fire modes */
00594 #define DESTROYED_MODE          0x00000001  /* the part is destroyed */
00595 #define DISABLED_MODE           0x00000002  /* the part is disabled */
00596 #define BROKEN_MODE             0x00000004  /* the part is part of a destroyed weapon/item */
00597 #define DAMAGED_MODE            0x00000008  /* the part is damaged from an enhanced critical */
00598 #define ON_TC                   0x00000010  /* (T) Set if the wepons mounted with TC */
00599 #define REAR_MOUNT              0x00000020  /* (R) set if weapon is rear mounted */
00600 #define HOTLOAD_MODE            0x00000040  /* (H) Weapon's being hotloaded */
00601 #define HALFTON_MODE            0x00000080  /* Weapon is in halfton mode */
00602 #define OS_MODE                 0x00000100  /* (O) In weapon itself : Weapon's one-shot */
00603 #define OS_USED                 0x00000200  /* One-shot ammo _has_ been already used */
00604 #define ULTRA_MODE              0x00000400  /* (U) set if weapon is in Ultra firing mode */
00605 #define RFAC_MODE               0x00000800  /* (F) the weapon is set as a rapid fire AC */
00606 #define GATTLING_MODE           0x00001000  /* (G) For Gattling MGs */
00607 #define RAC_TWOSHOT_MODE        0x00002000  /* (2) RAC in two shot mode */
00608 #define RAC_FOURSHOT_MODE       0x00004000  /* (4) RAC in four shot mode */
00609 #define RAC_SIXSHOT_MODE        0x00008000  /* (6) RAC in six shot mode */
00610 #define HEAT_MODE               0x00010000  /* (H) Toggle a flamer into heat mode */
00611 #define WILL_JETTISON_MODE      0x00020000  /* Set if the slot will get destroyed during a backpack jettison (BSuits) */
00612 #define IS_JETTISONED_MODE      0x00040000  /* Set if the slot has been jettisoned (BSuits) */
00613 #define OMNI_BASE_MODE          0x00080000  /* Set if the slot part of the base config of an omni mech */
00614 #define ROCKET_FIRED            0x00100000  /* Set if the slot's rocket launcher has been fired */
00615 
00616 #define RAC_MODES       (RAC_TWOSHOT_MODE|RAC_FOURSHOT_MODE|RAC_SIXSHOT_MODE)
00617 #define FIRE_MODES      (HOTLOAD_MODE|ULTRA_MODE|RFAC_MODE|GATTLING_MODE|RAC_MODES|HEAT_MODE)
00618 
00619 /* Ammo modes */
00620 #define LBX_MODE                0x00000001  /* (L) set if weapon is firing LBX ammo */
00621 #define ARTEMIS_MODE            0x00000002  /* (A) artemis compatible missiles/laucher */
00622 #define NARC_MODE               0x00000004  /* (N) narc compatible missiles/launcher */
00623 #define CLUSTER_MODE            0x00000008  /* (C) Set if weapon is firing cluster ammo */
00624 #define MINE_MODE               0x00000010  /* (M) Set if weapon's firing mines */
00625 #define SMOKE_MODE              0x00000020  /* (S) Set if weapon's firing smoke rounds */
00626 #define INFERNO_MODE            0x00000040  /* (I) SRM's loaded with Inferno rounds (cause heat) */
00627 #define SWARM_MODE              0x00000080  /* (W) LRM's loaded with Swarm rounds */
00628 #define SWARM1_MODE             0x00000100  /* (1) LRM's loaded with Swarm1 rounds (FoF) */
00629 #define INARC_EXPLO_MODE        0x00000200  /* (X) inarc launcher firing explosive pods */
00630 #define INARC_HAYWIRE_MODE      0x00000400  /* (Y) inarc launcher firing haywire pods */
00631 #define INARC_ECM_MODE          0x00000800  /* (E) inarc launcher firing ecm pods */
00632 #define INARC_NEMESIS_MODE      0x00001000  /* (Z) inarc launcher firing nemesis pods */
00633 #define AC_AP_MODE              0x00002000  /* (R) autocannon firing armor piercing rounds */
00634 #define AC_FLECHETTE_MODE       0x00004000  /* (F) autocannon firing flechette rounds */
00635 #define AC_INCENDIARY_MODE      0x00008000  /* (D) autocannon firing incendiary rounds */
00636 #define AC_PRECISION_MODE       0x00010000  /* (P) autocannon firing precision rounds */
00637 #define STINGER_MODE            0x00020000  /* (T) AntiAir LRM */
00638 #define AC_CASELESS_MODE        0x00040000  /* (U) autocannon firing caseless rounds */
00639 #define SGUIDED_MODE            0x00080000  /* (G) LRM's loaded with Semi-Guided rounds (benefits only if unit is lit by 'TAG' */
00640 
00641 #define ARTILLERY_MODES         (CLUSTER_MODE|MINE_MODE|SMOKE_MODE)
00642 #define INARC_MODES             (INARC_EXPLO_MODE|INARC_HAYWIRE_MODE|INARC_ECM_MODE|INARC_NEMESIS_MODE)
00643 #define MISSILE_MODES           (ARTEMIS_MODE|NARC_MODE|INFERNO_MODE|SWARM_MODE|SWARM1_MODE|STINGER_MODE|SGUIDED_MODE)
00644 #define AC_MODES                (AC_AP_MODE|AC_FLECHETTE_MODE|AC_INCENDIARY_MODE|AC_PRECISION_MODE|AC_CASELESS_MODE)
00645 #define AMMO_MODES              (LBX_MODE|AC_MODES|MISSILE_MODES|INARC_MODES|ARTILLERY_MODES)
00646 
00647 /* Enhanced critical damage flags */
00648 #define WEAP_DAM_MODERATE       0x00000001      /* +1 to hit */
00649 #define WEAP_DAM_EN_FOCUS       0x00000002      /* Energy weapons: Focus misaligned. -1 damage, +1 BTH at med and long range */
00650 #define WEAP_DAM_EN_CRYSTAL     0x00000004      /* Energy weapons: Crystal damaged. +1 heat. Roll of 2 results in ammo like explosion */
00651 #define WEAP_DAM_BALL_BARREL    0x00000008      /* Ballistic weapons: Barrel damaged. Roll of 2 results in weapon jam */
00652 #define WEAP_DAM_BALL_AMMO      0x00000010      /* Ballistic weapons: Ammo feed damaged. Can not switch ammo type. Roll of 2 results in ammo explosion */
00653 #define WEAP_DAM_MSL_RANGING    0x00000020      /* Missile weapons: Ranging system hit. +1 BTH at med and long ranges */
00654 #define WEAP_DAM_MSL_AMMO       0x00000040      /* Missile weapons: Ammo feed damaged. Can not switch ammo type. Roll of 2 results in ammo explosion */
00655 
00656 /* Structure for each of the 8 sections */
00657 struct section_struct {
00658     unsigned char armor;        /* External armor value */
00659     unsigned char internal;     /* Internal armor value */
00660     unsigned char rear;         /* Rear armor value */
00661     unsigned char armor_orig;
00662     unsigned char internal_orig;
00663     unsigned char rear_orig;
00664     char basetohit;             /* Holds to hit modifiers for weapons in section */
00665     char config;                /* flags for CASE, etc. */
00666     char recycle;               /* after physical attack, set counter */
00667     unsigned short specials;    /* specials for this section, like attached NARC pods, etc... */
00668     struct critical_slot criticals[NUM_CRITICALS];      /* Criticals */
00669 };
00670 
00671 /* Section configurations */
00672 #define CASE_TECH               0x01    /* section has CASE technology */
00673 #define SECTION_DESTROYED       0x02    /* section has been destroyed */
00674 #define SECTION_BREACHED        0x04    /* section has been exposed to vacuum */
00675 #define SECTION_FLOODED         0x08    /* section has been flooded with water - Kipsta. 8/3/99 */
00676 #define AXED                    0x10    /* arm was used to axe/sword someone */
00677 #define STABILIZERS_DESTROYED   0x20    /* vehicle only. Double attacker mod for weapons from the section */
00678 #define CASEII_TECH             0x40    /* section has CASE II technology */
00679 
00680 /* Section specials */
00681 #define NARC_ATTACHED           0x00000001      /* set if mech has a NARC beacon attached. */
00682 #define INARC_HOMING_ATTACHED   0x00000002      /* set if mech has an iNARC homing beacon attached. */
00683 #define INARC_HAYWIRE_ATTACHED  0x00000004      /* set if mech has an iNARC haywire beacon attached. */
00684 #define INARC_ECM_ATTACHED      0x00000008      /* set if mech has an iNARC ecm beacon attached. */
00685 #define INARC_NEMESIS_ATTACHED  0x00000010      /* set if mech has an iNARC nemesis beacon attached. */
00686 #define CARRYING_CLUB           0x00000020      /* carrying a club in this location */
00687 
00688 /* ground combat types */
00689 #define CLASS_MECH              0
00690 #define CLASS_VEH_GROUND        1
00691 #define CLASS_VEH_NAVAL         3
00692 
00693 /* Air types */
00694 #define CLASS_VTOL              2
00695 #define CLASS_SPHEROID_DS       4       /* Spheroid DropShip */
00696 #define CLASS_AERO              5
00697 #define CLASS_MW                6       /* Ejected MechWarrior */
00698 #define CLASS_DS                7       /* AeroDyne DropShip */
00699 #define CLASS_BSUIT             8
00700 #define CLASS_LAST              8
00701 
00702 #define DropShip(a) ((a)==CLASS_DS || (a)==CLASS_SPHEROID_DS)
00703 #define IsDS(m)             (DropShip(MechType(m)))
00704 
00705 /* ground movement types */
00706 #define MOVE_BIPED              0
00707 #define MOVE_QUAD               8
00708 #define MOVE_TRACK              1
00709 #define MOVE_WHEEL              2
00710 #define MOVE_HOVER              3
00711 #define MOVE_HULL               5
00712 #define MOVE_FOIL               6
00713 #define MOVE_SUB                9
00714 
00715 /* Air movenement types */
00716 #define MOVE_VTOL               4
00717 #define MOVE_FLY                7
00718 
00719 #define MOVE_NONE               10      /* Stationary, for one reason or another */
00720 
00721 #define MOVENEMENT_LAST         10
00722 
00723 /* Mech Preferences list */
00724 #define MECHPREF_PKILL          0x01    /* Kill MWs anyway */
00725 #define MECHPREF_SLWARN         0x02    /* Warn when lit by slite */
00726 #define MECHPREF_AUTOFALL       0x04    /* Jump off cliffs (don't try to avoid) */
00727 #define MECHPREF_NOARMORWARN    0x08    /* Don't warn when armor is getting low */
00728 #define MECHPREF_NOAMMOWARN     0x10    /* Don't warn when ammo is getting low */
00729 #define MECHPREF_STANDANYWAY    0x20    /* Try to stand even when BTH too high */
00730 #define MECHPREF_AUTOCON_SD     0x40    /* Autocon on non-started units */
00731 #define MECHPREF_NOFRIENDLYFIRE 0x80    /* Disallow firing on teammates */
00732 #define MECHPREF_TURNMODE       0x100   /* Tight or Normal for Maneuvering Ace */
00733 
00734 typedef struct {
00735     char mech_name[31];         /* Holds the 30 char ID for the mech */
00736     char mech_type[15];         /* Holds the mechref for the mech */
00737     char type;                  /* The type of this unit */
00738     char move;                  /* The movement type of this unit */
00739     char tac_range;             /* Tactical range for sensors */
00740     char lrs_range;             /* Long range for sensors */
00741     char scan_range;            /* Range for scanners */
00742     char numsinks;              /* number of heatsinks (also engine */
00743     char computer;              /* Partially replaces tac/lrs/scan/radiorange */
00744     char radio;
00745     unsigned char radioinfo;
00746     /* crits ( - from heatsinks) ) */
00747     char si;                    /* Structural integrity of a craft */
00748     char si_orig;               /* maximum struct. int */
00749 
00750     short radio_range;          /* Can read/write comfortably at that distance */
00751 
00752     struct section_struct sections[NUM_SECTIONS];       /* armor */
00753     int fuel;                   /* Fuel left */
00754     int fuel_orig;              /* Fuel tank capacity */
00755 
00756     int tons;                   /* How much I weigh */
00757     int walkspeed;              /* Future expansion to do speed correctly */
00758     int runspeed;
00759     float maxspeed;             /* Maxspeed (running) in KPH */
00760     float template_maxspeed;    /* we should read this in */
00761 
00762     int mechbv;                 /* Fasa BattleValue of this unit */
00763     int cargospace;             /* Assigned cargo space * 100 for half and quarter tons */
00764 #ifndef BT_CALCULATE_BV
00765     int unused[8];              /* Space for future expansion */
00766 #else
00767     int mechbv_last;            /* BV caclulation cacher */
00768 #endif
00769     char targcomp;              /* Targeting comp mode. */
00770     char unused_char[3];
00771     char carmaxton;             /* Max Tonnage variable for carrier sizing */
00772 } mech_ud;
00773 
00774 typedef struct {
00775     char jumptop;               /* How many MPs we've left for vertical stuff? */
00776     char aim;                   /* section of target aimed at */
00777     char basetohit;             /* total to hit modifiers from critical hits */
00778     char pilotskillbase;        /* holds constant skills mods */
00779     char engineheat;            /* +5 per critical hit there */
00780     char masc_value;            /* MASC roll .. updated up/down as needed */
00781     char aim_type;              /* Type we aim at */
00782 
00783     char sensor[2];             /* Primary mode, secondary mode */
00784     byte fire_adjustment;       /* For artillery mostly */
00785     char vis_mod;               /* Should be in range of 0 to 100 ; basically, this
00786                                    is used as _base_ of random element in each sensor type, altered
00787                                    once every heat update (and when mech's sensor mode changes) */
00788     char chargetimer;           /* # of movement ticks since 'charge' command */
00789     float chargedist;           /* # of hexes moved since 'charge' command */
00790     char staggerstamp;          /* When in last turn this 'mech staggered */
00791 
00792     short mech_prefs;           /* Mech preferences */
00793     short jumplength;           /* in real coords (for jump and goto) */
00794     short goingx, goingy;       /* in map coords (for jump and goto) */
00795     short desiredfacing;        /* You are turning if this != facing */
00796     short angle;                /* For DS / Aeros */
00797     short jumpheading;          /* Jumping head */
00798     short targx, targy, targz;  /* in map coords, target squares */
00799     short turretfacing;         /* Jumping head */
00800     short turndamage;           /* holds damge taken in 5 sec interval */
00801     short lateral;              /* Quad lateral move mode */
00802     short num_seen;             /* Number of enemies seen */
00803     short lx, ly;
00804 
00805 
00806     dbref chgtarget;            /* My CHARGE target */
00807     dbref dfatarget;            /* My DFA target */
00808     dbref target;               /* My default target */
00809     dbref swarming;             /* Swarm target */
00810     dbref swarmedby;            /* Who's swarming/mounting us */
00811     dbref carrying;             /* Who are we lugging about? */
00812     dbref spotter;              /* Who's spotting for us? */
00813 
00814     float heat;                 /* Heat index */
00815     float weapheat;             /* Weapon heat factor-> see manifesto */
00816     float plus_heat;            /* how much heat I am producing */
00817     float minus_heat;           /* how much heat I can dissipate */
00818 
00819     float startfx, startfy;     /* in real coords (for jump and goto) */
00820     float startfz, endfz;       /* startstuff's also aeros' speed */
00821     float verticalspeed;        /* VTOL vertical speed in KPH */
00822     float speed;                /* Speed in KPH */
00823     float desired_speed;        /* Desired speed in KPH */
00824     float jumpspeed;            /* Jumping distance or current height in km */
00825 
00826     int critstatus;             /* see key below */
00827     int status;                 /* see key below */
00828     int status2;                /* see key below */
00829     int specials;               /* see key below */
00830     int specials2;              /* More tech specials */
00831     int specialsstatus;         /* status element specials, like ECM, etc... */
00832     int tankcritstatus;         /* status element for crits that are specific to vehicles. see key below */
00833 
00834     time_t last_weapon_recycle; /* This updated only on 'as needed' basis ;
00835                                    basically, all weapon recycling events
00836                                    compare the current time to the
00837                                    last_weapon_recycle, and send recycled-messages
00838                                    for all recycled weapons. */
00839     int cargo_weight;           /* How much stuff do we have? */
00840 
00841     /* BTHRandomization stuff (rok) ;) */
00842     int lastrndu;
00843     int rnd;
00844 
00845     int last_ds_msg;            /* Used for DS-spam */
00846     int boom_start;             /* Used for Stackpole-effect */
00847 
00848     int maxfuel;                /* How much fuel fits to this thing anyway? */
00849     int lastused;               /* Idle timeout thing */
00850     int cocoon;                 /* OOD cocoon */
00851     int commconv;               /* Evil magic related to commconv, p1 */
00852     int commconv_last;          /* Evil magic related to commconv, p2 */
00853     int onumsinks;              /* Original HS (?) */
00854     int disabled_hs;            /* Disabled (on purpose, not destroyed) HS */
00855     int autopilot_num;
00856     int heatboom_last;
00857     int sspin;                  /* Start of aero spin */
00858     int can_see;
00859     int row;                    /* _Own_ weight */
00860     int rcw;                    /* _Carried_ weight */
00861     float rspd;
00862     int erat;
00863     int per;
00864     int wxf;
00865     int last_startup;           /* timestamp of last 'startup' */
00866     int maxsuits;               /* Maximum number of bsuits in this unit */
00867     int infantry_specials;      /* Infantry related specials */
00868     char scharge_value;         /* Supercharger roll .. updated up/down as needed */
00869     int staggerDamage;          /* Damage for Stagger MkII */
00870     int lastStaggerNotify;      /* The level that we were last notified of a stagger */
00871     int critstatus2;            /* Starting to fill up. More CritStatus */
00872     int unused[5];              /* Space for future expansion */
00873     float xpmod;                /* Used to modify XP values per unit. Will default loading to 1 */
00874 } mech_rd;
00875 
00876 typedef struct {
00877     char pilotstatus;           /* damage pilot has taken */
00878     char terrain;               /* Terrain I am in */
00879     char elev;                  /* Elevation I am at */
00880     short hexes_walked;         /* Hexes walked counter */
00881     short facing;               /* 0-359.. */
00882     short x, y, z;              /* hex quantized x,y,z on the map in MP (hexes) */
00883     short last_x, last_y;       /* last hex entered */
00884     float fx, fy, fz;           /* exact x, y and z on the map */
00885     int team;                   /* Only for internal use */
00886     int unusable_arcs;          /* Horrid kludge for disallowing use of some arcs' guns */
00887     int stall;                  /* is this mech in a repair stall? */
00888     dbref pilot;                /* My pilot */
00889     dbref bay[NUM_BAYS];
00890     dbref turret[NUM_TURRETS];
00891 } mech_pd;
00892 
00893 typedef struct {
00894     char C3ChanTitle[CHTITLELEN + 1];   /* applies to C3 and C3i */
00895     dbref C3iNetwork[C3I_NETWORK_SIZE]; /* other mechs in the C3i network */
00896     int wC3iNetworkSize;        /* Current size of our network */
00897     dbref C3Network[C3_NETWORK_SIZE];   /* The whole network. We're sacrificing memory for speed. */
00898     int wC3NetworkSize;         /* Current size of the C3Network */
00899     int wTotalC3Masters;        /* How many masters are on this mech? */
00900     int wWorkingC3Masters;      /* How many working masters are on this mech? */
00901     int C3FreqMode;             /* applies to C3 and C3i */
00902     dbref tagTarget;            /* dbref of the target we're tagging */
00903     dbref taggedBy;             /* dbref of the person tagging us */
00904 } mech_sd;
00905 
00906 typedef struct {
00907     char ID[2];                 /* Only for internal use */
00908     char brief;                 /* toggle brievity */
00909     char chantitle[FREQS][CHTITLELEN + 1];      /* Channel titles */
00910     dbref mynum;                /* My dbref */
00911     int mapnumber;              /* My number on the map */
00912     dbref mapindex;             /* 0..MAX_MAPS (dbref of map object) */
00913     unsigned long tic[NUM_TICS][TICLONGS];      /* tics.. */
00914     int freq[FREQS];            /* channel frequencies */
00915     int freqmodes[FREQS];       /* flags for the freq */
00916     mech_ud ud;                 /* UnitData (mostly not bzero'able) */
00917     mech_pd pd;                 /* PositionData(mostly not bzero'able) */
00918     mech_rd rd;                 /* RSdata (mostly bzero'able) */
00919     mech_sd sd;                 /* SpecialsData (mostly not bzero'able) */
00920 
00921 } MECH;
00922 
00923 struct spot_data {
00924     float tarFX;
00925     float tarFY;
00926     float mechFX;
00927     float mechFY;
00928     MECH *target;
00929 };
00930 
00931 struct repair_data {
00932     int delta;
00933     int time;
00934     int target;
00935     int code;
00936 };
00937 
00938 /* status element... */
00939 
00940 #define LANDED                0x00000001  /* (a) For VTOL use only */
00941 #define TORSO_RIGHT           0x00000002  /* (b) Torso heading -= 60 degrees */
00942 #define TORSO_LEFT            0x00000004  /* (c) Torso heading += 60 degrees */
00943 #define STARTED               0x00000008  /* (d) Mech is warmed up */
00944 #define PARTIAL_COVER         0x00000010  /* (e) */
00945 #define DESTROYED             0x00000020  /* (f) */
00946 #define JUMPING               0x00000040  /* (g) Handled in UPDATE */
00947 #define FALLEN                0x00000080  /* (h) */
00948 #define DFA_ATTACK            0x00000100  /* (i) */
00949 #define PERFORMING_ACTION     0x00000200  /* (j) Set if the unit is performing some sort of action. Controlled by SCode */
00950 #define FLIPPED_ARMS          0x00000400  /* (k) */
00951 #define AMS_ENABLED           0x00000800  /* (l) only settable if mech has ANTI-MISSILE_TECH */
00952 #define EXPLODE_SAFE          0x00001000  /* (m) Used to prevent a unit from doing EXPLODE AMMO */
00953 #define UNCONSCIOUS           0x00002000  /* (n) Pilot is unconscious */
00954 #define TOWED                 0x00004000  /* (o) Someone's towing us */
00955 #define LOCK_TARGET           0x00008000  /* (p) We mean business */
00956 #define LOCK_BUILDING         0x00010000  /* (q) Hit building */
00957 #define LOCK_HEX              0x00020000  /* (r) Hit hex (clear / ignite, d'pend on weapon) */
00958 #define LOCK_HEX_IGN          0x00040000  /* (s) */
00959 #define LOCK_HEX_CLR          0x00080000  /* (t) */
00960 #define MASC_ENABLED          0x00100000  /* (u) Using MASC */
00961 #define BLINDED               0x00200000  /* (v) Pilot has been blinded momentarily by something */
00962 #define COMBAT_SAFE           0x00400000  /* (w) Can't be hurt */
00963 #define AUTOCON_WHEN_SHUTDOWN 0x00800000  /* (x) Autocon sees it even when shutdown */
00964 #define FIRED                 0x01000000  /* (y) Fired at something */
00965 #define SCHARGE_ENABLED       0x02000000  /* (z) */
00966 #define HULLDOWN              0x04000000  /* (A) */
00967 #define UNDERSPECIAL          0x08000000  /* (B) */
00968 #define UNDERGRAVITY          0x10000000  /* (C) */
00969 #define UNDERTEMPERATURE      0x20000000  /* (D) */
00970 #define UNDERVACUUM           0x40000000  /* (E) */
00971 /* UNUSED                     0x80000000     (F) */
00972 
00973 #define CONDITIONS      (UNDERSPECIAL | UNDERGRAVITY | UNDERTEMPERATURE | UNDERVACUUM)
00974 #define LOCK_MODES      (LOCK_TARGET|LOCK_BUILDING|LOCK_HEX|LOCK_HEX_IGN|LOCK_HEX_CLR)
00975 
00976 /* status2 element */
00977 
00978 /* Specials status element */
00979 #define ECM_ENABLED           0x00000001  /* (a) Unit ECM is enabled */
00980 #define ECCM_ENABLED          0x00000002  /* (b) Unit ECCM is enabled */
00981 #define ECM_DISTURBANCE       0x00000004  /* (c) Unit affected by ECM */
00982 #define ECM_PROTECTED         0x00000008  /* (d) Unit protected by ECM */
00983 #define ECM_COUNTERED         0x00000010  /* (e) ECM countered by ECCM.  
00984                                              This only happens if an enemy ECCM
00985                                              is within range. */
00986 #define SLITE_ON              0x00000020  /* (f) Unit SLITE is enabled */
00987 #define STH_ARMOR_ON          0x00000040  /* (g) Unit has steath armor enabled */
00988 #define NULLSIGSYS_ON         0x00000080  /* (h) Unit has nullsig enabled */
00989 #define ANGEL_ECM_ENABLED     0x00000100  /* (i) Unit Angel ECM is enabled */
00990 #define ANGEL_ECCM_ENABLED    0x00000200  /* (j) Unit Angel ECCM is enabled */
00991 #define ANGEL_ECM_PROTECTED   0x00000400  /* (k) Unit protected by Angel ECM */
00992 #define ANGEL_ECM_DISTURBED   0x00000800  /* (l) Unit affected by Angel ECM */
00993 #define PER_ECM_ENABLED       0x00001000  /* (m) Unit Personal ECM is enabled */
00994 #define PER_ECCM_ENABLED      0x00002000  /* (n) Unit Personal ECCM is enabled */
00995 #define AUTOTURN_TURRET       0x00004000  /* (o) Unit Auto-Turret enabled to locked target */
00996 /* UNUSED                     0x00008000     (p) */
00997 #define SPRINTING             0x00010000  /* (q) Unit is Sprinting */
00998 #define EVADING               0x00020000  /* (r) Unit is Evading */
00999 #define DODGING               0x00040000  /* (s) Unit is Dodging */
01000 #define ATTACKEMIT_MECH       0x00080000  /* (t) Units attacks sent to MechAttackEmits channel */
01001 #define UNIT_MOUNTED          0x00100000  /* (u) Unit has been mounted by a suit */
01002 #define UNIT_MOUNTING         0x00200000  /* (v) Unit is mounting another unit */
01003 /* UNUSED                     0x00400000     (w) */
01004 /* UNUSED                     0x00800000     (x) */
01005 /* UNUSED                     0x01000000     (y) */
01006 /* UNUSED                     0x02000000     (z) */
01007 /* UNUSED                     0x04000000     (A) */
01008 /* UNUSED                     0x08000000     (B) */
01009 /* UNUSED                     0x10000000     (C) */
01010 /* UNUSED                     0x20000000     (D) */
01011 /* UNUSED                     0x40000000     (E) */
01012 /* UNUSED                     0x80000000     (F) */
01013 
01014 /* Grouping masks */
01015 #define MOVE_MODES      (SPRINTING|EVADING|DODGING)
01016 #define MOVE_MODES_LOCK (SPRINTING|EVADING)
01017 
01018 /* Flags for mode handling */
01019 #define MODE_EVADE      0x1
01020 #define MODE_SPRINT     0x2
01021 #define MODE_ON         0x4
01022 #define MODE_OFF        0x8
01023 #define MODE_DODGE      0x10
01024 #define MODE_DG_USED    0x20
01025 
01026 /* MechFullRecycle check flags */
01027 #define CHECK_WEAPS     0x1
01028 #define CHECK_PHYS      0x2
01029 #define CHECK_BOTH      (CHECK_WEAPS|CHECK_PHYS)
01030 
01031 #define MechLockFire(mech) \
01032 ((MechStatus(mech) & LOCK_TARGET) && \
01033  !(MechStatus(mech) & (LOCK_BUILDING|LOCK_HEX|LOCK_HEX_IGN|LOCK_HEX_CLR)))
01034 
01035 /* Macros for accessing some parts */
01036 #define Blinded(a)      (MechStatus(a) & BLINDED)
01037 #define Started(a)      (MechStatus(a) & STARTED)
01038 #define Uncon(a)        (MechStatus(a) & UNCONSCIOUS)
01039 
01040 /* critstatus element */
01041 #define GYRO_DESTROYED          0x00000001  /* (a) */
01042 #define SENSORS_DAMAGED         0x00000002  /* (b) */
01043 #define TAG_DESTROYED           0x00000004  /* (c) */
01044 #define HIDDEN                  0x00000008  /* (d) */
01045 #define GYRO_DAMAGED            0x00000010  /* (e) */
01046 #define HIP_DAMAGED             0x00000020  /* (f) */
01047 #define LIFE_SUPPORT_DESTROYED  0x00000040  /* (g) */
01048 #define ANGEL_ECM_DESTROYED     0x00000080  /* (h) */
01049 #define C3I_DESTROYED           0x00000100  /* (i) */
01050 #define NSS_DESTROYED           0x00000200  /* (j) */
01051 #define SLITE_DEST              0x00000400  /* (k) */
01052 #define SLITE_LIT               0x00000800  /* (l) */
01053 #define LOAD_OK                 0x00001000  /* (m) Carried load recalculated */
01054 #define OWEIGHT_OK              0x00002000  /* (n) Own weight recalculated */
01055 #define SPEED_OK                0x00004000  /* (o) Total speed recalculated */
01056 #define HEATCUTOFF              0x00008000  /* (p) */
01057 #define TOWABLE                 0x00010000  /* (q) */
01058 #define HIP_DESTROYED           0x00020000  /* (r) */
01059 #define TC_DESTROYED            0x00040000  /* (s) */
01060 #define C3_DESTROYED            0x00080000  /* (t) */
01061 #define ECM_DESTROYED           0x00100000  /* (u) */
01062 #define BEAGLE_DESTROYED        0x00200000  /* (v) */
01063 #define JELLIED                 0x00400000  /* (w) Got inferno gel on us */
01064 #define PC_INITIALIZED          0x00800000  /* (x) PC-initialization done already */
01065 #define SPINNING                0x01000000  /* (y) */
01066 #define CLAIRVOYANT             0x02000000  /* (z) See everything, regardless of blocked */
01067 #define INVISIBLE               0x04000000  /* (A) Unable to be seen by anyone */
01068 #define CHEAD                   0x08000000  /* (B) Altered heading */
01069 #define OBSERVATORIC            0x10000000  /* (C) */
01070 #define BLOODHOUND_DESTROYED    0x20000000  /* (D) */
01071 #define MECH_STUNNED            0x40000000  /* (E) Is the mech stunned (Exile stun code) */
01072 
01073 /* tankcritstatus element */
01074 #define TURRET_LOCKED           0x01
01075 #define TURRET_JAMMED           0x02    /* can be fixed by player */
01076 #define DUG_IN                  0x04
01077 #define DIGGING_IN              0x08
01078 #define CREW_STUNNED            0x10    /* can't go over cruise speed, make any attacks at all, use radio. IE, can't do jack but turn */
01079 #define TAIL_ROTOR_DESTROYED    0x20
01080 
01081 /* specials element: used to tell quickly what type of tech the mech has */
01082 #define TRIPLE_MYOMER_TECH      0x01
01083 #define CL_ANTI_MISSILE_TECH    0x02
01084 #define IS_ANTI_MISSILE_TECH    0x04
01085 #define DOUBLE_HEAT_TECH        0x08
01086 #define MASC_TECH               0x10
01087 #define CLAN_TECH               0x20
01088 #define FLIPABLE_ARMS           0x40
01089 #define C3_MASTER_TECH          0x80
01090 #define C3_SLAVE_TECH           0x100
01091 #define ARTEMIS_IV_TECH         0x200
01092 #define ECM_TECH                0x400
01093 #define BEAGLE_PROBE_TECH       0x800
01094 #define SALVAGE_TECH            0x1000  /* 2x 'mech carrying capacity */
01095 #define CARGO_TECH              0x2000  /* 2x cargo carrying capacity */
01096 #define SLITE_TECH              0x4000
01097 #define LOADER_TECH             0x8000
01098 #define AA_TECH                 0x10000
01099 #define NS_TECH                 0x20000
01100 #define SS_ABILITY              0x40000 /* Has sixth sense */
01101 #define FF_TECH                 0x80000 /* Has ferro-fib. armor */
01102 #define ES_TECH                 0x100000        /* Has endo-steel internals */
01103 #define XL_TECH                 0x200000
01104 #define ICE_TECH                0x400000        /* ICE engine */
01105 #define LIFTER_TECH             0x800000
01106 #define LE_TECH                 0x1000000       /* Light engine */
01107 #define XXL_TECH                0x2000000
01108 #define CE_TECH                 0x4000000
01109 #define REINFI_TECH             0x8000000
01110 #define COMPI_TECH              0x10000000
01111 #define HARDA_TECH              0x20000000
01112 #define CRITPROOF_TECH          0x40000000
01113 /* 0x80000000 can not be used. */
01114 
01115 /*critstatus2 element */
01116 #define HDGYRO_DAMAGED          0x01        /* HDGYRO is damaged */
01117 
01118 /* specials2 element: used to tell quickly what type of tech the mech has */
01119 #define STEALTH_ARMOR_TECH      0x01        /* Stealth armor */
01120 #define HVY_FF_ARMOR_TECH       0x02        /* Heavy FF. 1.24 armor multi. 21 slots. */
01121 #define LASER_REF_ARMOR_TECH    0x04        /* Not yet implemented */
01122 #define REACTIVE_ARMOR_TECH     0x08        /* Not yet implemented */
01123 #define NULLSIGSYS_TECH         0x10        /* Null signature system */
01124 #define C3I_TECH                0x20        /* Improved C3 */
01125 #define SUPERCHARGER_TECH       0x40        /* Not yet implemented */
01126 #define IMPROVED_JJ_TECH        0x80        /* Not yet implemented */
01127 #define MECHANICAL_JJ_TECH      0x100       /* Not yet implemented */
01128 #define COMPACT_HS_TECH         0x200       /* Not yet implemented */
01129 #define LASER_HS_TECH           0x400       /* Not yet implemented */
01130 #define BLOODHOUND_PROBE_TECH   0x800       /* BLoodhound Active Probe */
01131 #define ANGEL_ECM_TECH          0x1000      /* Angel ECM suite */
01132 #define WATCHDOG_TECH           0x2000      /* Not yet implemented */
01133 #define LT_FF_ARMOR_TECH        0x4000      /* Heavy FF. 1.06 armor multi. 7 slots. */
01134 #define TAG_TECH                0x8000      /* Target Aquisition Gear */
01135 #define OMNIMECH_TECH           0x10000     /* Is an omni mech */
01136 #define ARTEMISV_TECH           0x20000     /* Not yet implemented */
01137 #define CAMO_TECH               0x40000     /* Allows any unit to 'hide' */
01138 #define CARRIER_TECH            0x80000     /* Can be used as a carrier of mechs */
01139 #define WATERPROOF_TECH         0x100000    /* Can the unit go underwater without problems 
01140                                                for use with tanks */
01141 #define XLGYRO_TECH             0x200000
01142 #define HDGYRO_TECH             0x400000
01143 #define CGYRO_TECH              0x800000
01144 #define TCOMP_TECH              0x1000000
01145 
01146 /* Infantry specials */
01147 #define INF_SWARM_TECH                  0x01    /* Infantry/BSuits can swarm unfriendlies */
01148 #define INF_MOUNT_TECH                  0x02    /* Infantry/BSuits can mount friendlies */
01149 #define INF_ANTILEG_TECH                0x04    /* Infantry/BSuits can make anti-leg attacks */
01150 #define CS_PURIFIER_STEALTH_TECH        0x08    /* CS Purifier stealth technology. +3 at 0MP, +2 at 1MP, +1 at 2MP, +3 at 3+MP. */
01151 #define DC_KAGE_STEALTH_TECH            0x10    /* DC stealth technology. +3 at med, +6 at long. No BAP. */
01152 #define FWL_ACHILEUS_STEALTH_TECH       0x20    /* FWL stealth technology. +1 at short, +4 at medium, +7 at long. No BAP. */
01153 #define FC_INFILTRATOR_STEALTH_TECH     0x40    /* FC stealth technology. +3 at med, +6 at long. No BAP. */
01154 #define FC_INFILTRATORII_STEALTH_TECH   0x80    /* FC stealth II technology. +1 at short, +3 at med, +6 at long. No BAP. ECM in same hex. */
01155 #define MUST_JETTISON_TECH              0x100   /* Special considerations for some suits. Must jettison backpack before they can jump/swarm/anti-leg */
01156 #define CAN_JETTISON_TECH               0x200   /* Whether or not the unit can jettison its backpack */
01157 
01158 #define STEALTH_TECH (CS_PURIFIER_STEALTH_TECH|DC_KAGE_STEALTH_TECH|FWL_ACHILEUS_STEALTH_TECH|FC_INFILTRATOR_STEALTH_TECH|FC_INFILTRATORII_STEALTH_TECH)
01159 
01160 /* TargComp types */
01161 #define TARGCOMP_NORMAL 0
01162 #define TARGCOMP_SHORT  1
01163 #define TARGCOMP_LONG   2
01164 #define TARGCOMP_MULTI  3
01165 #define TARGCOMP_AA     4
01166 
01167 /*
01168         Notes on unimplemented stuff:
01169  
01170         - Laser Reflective Armor:
01171                 - made for better protection against energy weapons
01172                 - 10 crits for IS, 5 for Clan
01173                 - 1 vehicle items for IS, 1 for Clan
01174                 - 16 pts/ton
01175                 - Absorbs 2 pts of damager per pt of armor from energy weapon attacks.
01176                         - Single pt attacks still use up 1 pt of armor.
01177                 - Due to brittleness, double damage from physical and falling
01178                 - Does not apply to unarmored sections
01179  
01180         - Reactive Armor:
01181                 - made for better protection against missile attacks
01182                 - 14 crits for IS, 7 for Clan
01183                 - 2 vehicle items for IS, 1 for Clan
01184                 - 16 pts/ton
01185                 - Can not be mounted on OmniMechs
01186                 - Absorbs 2 pts of damager per pt of armor from missile weapon attacks.
01187                         - Single pt attacks still use up 1 pt of armor.
01188                 - Critical hits on reactive armor slots should be re-rolled, but also
01189                         roll 2d6. On roll of 2 chain reaction occurs and destroys all remaining
01190                         armor on section (front and back) and cases 1 point of internal damage with
01191                         normal chance of critical hit.
01192                 - Does not apply to unarmored sections
01193 
01194         - Improved JJs
01195                 - Weigh twice as much as std JJs
01196                 -       Take up twice as many crits slots as std JJs
01197                 - Can jump as high as running movement
01198                 - Heat produced by jumping is 1 pt per 2 hexes
01199                         - Minimum of 3 heat
01200 
01201         - Mechanical Jump Boosters (Mattress Springs Of Doom)
01202                 - Water does not affect them -- can jump out of water
01203                 - System takes up all crits slots in all legs
01204                 - Any critical hit disabled whole system
01205                 - Weighs 5 percent of mech's tonnage * jumping range
01206                 - Range not limited by walking/running movement
01207                 - Mech can not turn while jumping
01208                 - Can not DFA
01209                 - Can mount std JJs and mechanical, but can not use both at the same time
01210 
01211         - Compact HS
01212                 - Weighs 1.5 tons
01213                 - Can fit 2 in each crit slot
01214                 - Still gets 10 'free heatsinks'
01215                 - Number of HS 'in engine' is doubled
01216                 - Critical hit destroys both HS
01217                 - IS only
01218                 - Can not be used by vehicles
01219 
01220         - Laser HS
01221                 - Not affected by water
01222                 - Act as DHS for heat dissipation
01223                 - Add 1 to ammo explosion roll
01224                 - At night/dusk
01225                         - If mech takes any action to generate heat, subtract 1 from
01226                                 night/dusk modifier
01227                         - If mech overheats, remove night/dusk modifier
01228                 - Can not be used by vehicles
01229                 - Clan only
01230 
01231         - Watchdog System
01232                 - Clan only
01233                 - Acts as ECM suite and active probe
01234                 - 1 ton, 1 crit
01235 
01236         - Artemis V
01237                 - Clan only
01238                 - Just like ArtemisIV
01239                 - Weighs 1.5 tons and takes up 2 crit slots
01240                 - Not compatible with ArtemisIV
01241                 - -1 BTH
01242                 - Add 3 to missile hit roll
01243                 - Blocked by ECM
01244 
01245         - iNarc Nemesis pods
01246                 - If friendly mech fires SemiGuided or NARC missiles...
01247                 - If Nemesis'd unit between firer and target, resolve attack
01248                   as if it was fired at the Nemesis'd unit. Add +1 BTH. If attack misses
01249                   missiles continue on to normal target.
01250                 - If multiple Nemesis'd units are between firer and target, resolve
01251                   attack on each in succession from closest unit until all shots hit
01252                   or attack continues on to real target
01253  */
01254 
01255 /* Status stuff for common_checks function */
01256 #define MECH_STARTED            0x1
01257 #define MECH_PILOT              0x2
01258 #define MECH_PILOT_CON          0x4
01259 #define MECH_MAP                0x8
01260 #define MECH_CONSISTENT         0x10
01261 #define MECH_PILOTONLY          0x20
01262 #define MECH_USUAL              (MECH_CONSISTENT|MECH_MAP|MECH_PILOT_CON|MECH_PILOT|MECH_STARTED)
01263 #define MECH_USUALS             (MECH_CONSISTENT|MECH_MAP|MECH_PILOT_CON|MECH_PILOT)
01264 #define MECH_USUALSP            (MECH_CONSISTENT|MECH_MAP|MECH_PILOT_CON)
01265 #define MECH_USUALSM            (MECH_CONSISTENT|MECH_PILOT_CON|MECH_PILOT)
01266 #define MECH_USUALM             (MECH_CONSISTENT|MECH_PILOT_CON|MECH_PILOT|MECH_STARTED)
01267 #define MECH_USUALO             (MECH_CONSISTENT|MECH_MAP|MECH_PILOT_CON|MECH_PILOT|MECH_STARTED|MECH_PILOTONLY)
01268 #define MECH_USUALSO            (MECH_CONSISTENT|MECH_MAP|MECH_PILOT_CON|MECH_PILOT|MECH_PILOTONLY)
01269 #define MECH_USUALSPO           (MECH_CONSISTENT|MECH_MAP|MECH_PILOT_CON|MECH_PILOTONLY)
01270 #define MECH_USUALSMO           (MECH_CONSISTENT|MECH_PILOT_CON|MECH_PILOT|MECH_PILOTONLY)
01271 #define MECH_USUALMO            (MECH_CONSISTENT|MECH_PILOT_CON|MECH_PILOT|MECH_STARTED|MECH_PILOTONLY)
01272 
01273 extern struct weapon_struct MechWeapons[];
01274 extern struct missile_hit_table_struct MissileHitTable[];
01275 
01276 #define TELE_ALL        1       /* Tele all, not just mortals */
01277 #define TELE_SLAVE      2       /* Make slaves in progress (not of wizzes, though) */
01278 #define TELE_LOUD       4       /* Loudly teleport */
01279 #define TELE_XP         8       /* Lose 1/3 XP */
01280 
01281 #define MINE_STEP       1       /* Someone steps to a hex */
01282 #define MINE_LAND       2       /* Someone lands in a hex */
01283 #define MINE_FALL       3       /* Someone falls in the hex */
01284 #define MINE_DROP       4       /* Someone drops to ground in the hex */
01285 
01286 extern void *FindObjectsData(dbref key);
01287 #ifndef ECMD
01288 #define ECMD(a) extern void a (dbref player, void *data, char *buffer)
01289 #endif
01290 
01291 #define destroy_object(obj)     destroy_thing(obj)
01292 #define create_object(name)     create_obj(GOD, TYPE_THING, name, 1)
01293 
01294 #define A_MECHREF A_MECHTYPE
01295 #define MECH_PATH mudconf.mech_db
01296 #define MAP_PATH mudconf.map_db
01297 
01298 #define WSDUMP_MASK_ER  "%-24s %2d     %2d           %2d  %2d    %2d  %3d  %3d %2d"
01299 #define WSDUMP_MASK_NOER "%-24s %2d     %2d           %2d    %2d     %2d  %3d   %2d"
01300 #define WSDUMP_MASKS_ER "%%cgWeapon Name             Heat  Damage  Range: Min Short Med Long Ext VRT"
01301 #define WSDUMP_MASKS_NOER "%%cgWeapon Name             Heat  Damage  Range: Min  Short  Med  Long  VRT"
01302 
01303 #define WDUMP_MASK      "%-24s %2d     %2d           %2d  %2d    %2d  %3d  %2d  %2d %d"
01304 #define WDUMP_MASKS     "%%cgWeapon Name             Heat  Damage  Range: Min Short Med Long VRT C  ApT"
01305 #include "btmacros.h"
01306 #include "p.glue.hcode.h"
01307 #include "map.h"
01308 #include "map.coding.h"
01309 #include "glue.h"
01310 #include "p.glue.h"
01311 #include "mech.notify.h"
01312 
01313 /* For mech.lostracer.c's TraceLOS() */
01314 typedef struct {
01315     int x;
01316     int y;
01317 } lostrace_info;
01318 
01319 #endif                          /* MECH_H */

Generated on Mon May 28 04:25:22 2007 for BattletechMUX by  doxygen 1.4.7