00001
00002
00003
00004
00005
00006
00007
00008
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
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
00044 #define KPH_PER_MP 10.75
00045 #define MP_PER_KPH 0.0930233
00046 #define MP_PER_UPDATE_PER_KPH 0.003100777
00047 #define SCALEMAP 322.5
00048 #define HEXLEVEL 5
00049 #define ZSCALE 64.5
00050 #define XSCALE 0.1547
00051 #define YSCALE2 9.61482e-6
00052 #define MP1 10.75
00053 #define MP2 21.50
00054 #define MP3 32.25
00055 #define MP4 43.00
00056 #define MP5 53.75
00057 #define MP6 64.50
00058 #define MP9 96.75
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
00066 #define FREQ_RELAY 4
00067 #define FREQ_INFO 8
00068 #define FREQ_SCAN 16
00069 #define FREQ_REST 32
00070
00071 #define RADIO_RELAY 1
00072 #define RADIO_INFO 2
00073 #define RADIO_SCAN 4
00074 #define RADIO_NODIGITAL 8
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
00094
00095
00096
00097
00098
00099
00100
00101
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)
00108 #define BOMB_BASE_INDEX (AMMO_BASE_INDEX + NUM_WEAPONS)
00109 #define SPECIAL_BASE_INDEX (BOMB_BASE_INDEX + NUM_BOMBS)
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
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
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
00449 #define TBEAM 0
00450 #define TMISSILE 1
00451 #define TARTILLERY 2
00452 #define TAMMO 3
00453 #define THAND 4
00454
00455
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
00463
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;
00483 short explosiondamage;
00484 long special;
00485 int battlevalue;
00486 };
00487
00488
00489 #define NONE 0x00000000
00490 #define PULSE 0x00000001
00491 #define LBX 0x00000002
00492 #define ULTRA 0x00000004
00493 #define STREAK 0x00000008
00494 #define GAUSS 0x00000010
00495 #define NARC 0x00000020
00496 #define IDF 0x00000040
00497 #define DAR 0x00000080
00498 #define HYPER 0x00000100
00499 #define A_POD 0x00000200
00500 #define CLAT 0x00000400
00501 #define NOSPA 0x00000800
00502 #define PC_HEAT 0x00001000
00503 #define PC_IMPA 0x00002000
00504 #define PC_SHAR 0x00004000
00505 #define AMS 0x00008000
00506 #define NOBOOM 0x00010000
00507 #define CASELESS 0x00020000
00508 #define DFM 0x00040000
00509 #define ELRM 0x00080000
00510 #define MRM 0x00100000
00511 #define CHEAT 0x00200000
00512 #define HVYW 0x00400000
00513 #define RFAC 0x00800000
00514 #define GMG 0x01000000
00515 #define INARC 0x02000000
00516 #define RAC 0x04000000
00517 #define HVYGAUSS 0x08000000
00518 #define ROCKET 0x10000000
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
00530
00531
00532
00533
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
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
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
00563 #define DS_LWING 1
00564 #define DS_LRWING 2
00565 #define DS_RRWING 3
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
00578 #define SINGLE_TICLONG_SIZE 32
00579 #define TICLONGS (MAX_WEAPONS_PER_MECH / SINGLE_TICLONG_SIZE)
00580
00581
00582 struct critical_slot {
00583 unsigned char brand;
00584 unsigned char data;
00585 unsigned short type;
00586 unsigned int firemode;
00587 unsigned int ammomode;
00588 unsigned int weapDamageFlags;
00589 short desiredAmmoLoc;
00590
00591 };
00592
00593
00594 #define DESTROYED_MODE 0x00000001
00595 #define DISABLED_MODE 0x00000002
00596 #define BROKEN_MODE 0x00000004
00597 #define DAMAGED_MODE 0x00000008
00598 #define ON_TC 0x00000010
00599 #define REAR_MOUNT 0x00000020
00600 #define HOTLOAD_MODE 0x00000040
00601 #define HALFTON_MODE 0x00000080
00602 #define OS_MODE 0x00000100
00603 #define OS_USED 0x00000200
00604 #define ULTRA_MODE 0x00000400
00605 #define RFAC_MODE 0x00000800
00606 #define GATTLING_MODE 0x00001000
00607 #define RAC_TWOSHOT_MODE 0x00002000
00608 #define RAC_FOURSHOT_MODE 0x00004000
00609 #define RAC_SIXSHOT_MODE 0x00008000
00610 #define HEAT_MODE 0x00010000
00611 #define WILL_JETTISON_MODE 0x00020000
00612 #define IS_JETTISONED_MODE 0x00040000
00613 #define OMNI_BASE_MODE 0x00080000
00614 #define ROCKET_FIRED 0x00100000
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
00620 #define LBX_MODE 0x00000001
00621 #define ARTEMIS_MODE 0x00000002
00622 #define NARC_MODE 0x00000004
00623 #define CLUSTER_MODE 0x00000008
00624 #define MINE_MODE 0x00000010
00625 #define SMOKE_MODE 0x00000020
00626 #define INFERNO_MODE 0x00000040
00627 #define SWARM_MODE 0x00000080
00628 #define SWARM1_MODE 0x00000100
00629 #define INARC_EXPLO_MODE 0x00000200
00630 #define INARC_HAYWIRE_MODE 0x00000400
00631 #define INARC_ECM_MODE 0x00000800
00632 #define INARC_NEMESIS_MODE 0x00001000
00633 #define AC_AP_MODE 0x00002000
00634 #define AC_FLECHETTE_MODE 0x00004000
00635 #define AC_INCENDIARY_MODE 0x00008000
00636 #define AC_PRECISION_MODE 0x00010000
00637 #define STINGER_MODE 0x00020000
00638 #define AC_CASELESS_MODE 0x00040000
00639 #define SGUIDED_MODE 0x00080000
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
00648 #define WEAP_DAM_MODERATE 0x00000001
00649 #define WEAP_DAM_EN_FOCUS 0x00000002
00650 #define WEAP_DAM_EN_CRYSTAL 0x00000004
00651 #define WEAP_DAM_BALL_BARREL 0x00000008
00652 #define WEAP_DAM_BALL_AMMO 0x00000010
00653 #define WEAP_DAM_MSL_RANGING 0x00000020
00654 #define WEAP_DAM_MSL_AMMO 0x00000040
00655
00656
00657 struct section_struct {
00658 unsigned char armor;
00659 unsigned char internal;
00660 unsigned char rear;
00661 unsigned char armor_orig;
00662 unsigned char internal_orig;
00663 unsigned char rear_orig;
00664 char basetohit;
00665 char config;
00666 char recycle;
00667 unsigned short specials;
00668 struct critical_slot criticals[NUM_CRITICALS];
00669 };
00670
00671
00672 #define CASE_TECH 0x01
00673 #define SECTION_DESTROYED 0x02
00674 #define SECTION_BREACHED 0x04
00675 #define SECTION_FLOODED 0x08
00676 #define AXED 0x10
00677 #define STABILIZERS_DESTROYED 0x20
00678 #define CASEII_TECH 0x40
00679
00680
00681 #define NARC_ATTACHED 0x00000001
00682 #define INARC_HOMING_ATTACHED 0x00000002
00683 #define INARC_HAYWIRE_ATTACHED 0x00000004
00684 #define INARC_ECM_ATTACHED 0x00000008
00685 #define INARC_NEMESIS_ATTACHED 0x00000010
00686 #define CARRYING_CLUB 0x00000020
00687
00688
00689 #define CLASS_MECH 0
00690 #define CLASS_VEH_GROUND 1
00691 #define CLASS_VEH_NAVAL 3
00692
00693
00694 #define CLASS_VTOL 2
00695 #define CLASS_SPHEROID_DS 4
00696 #define CLASS_AERO 5
00697 #define CLASS_MW 6
00698 #define CLASS_DS 7
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
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
00716 #define MOVE_VTOL 4
00717 #define MOVE_FLY 7
00718
00719 #define MOVE_NONE 10
00720
00721 #define MOVENEMENT_LAST 10
00722
00723
00724 #define MECHPREF_PKILL 0x01
00725 #define MECHPREF_SLWARN 0x02
00726 #define MECHPREF_AUTOFALL 0x04
00727 #define MECHPREF_NOARMORWARN 0x08
00728 #define MECHPREF_NOAMMOWARN 0x10
00729 #define MECHPREF_STANDANYWAY 0x20
00730 #define MECHPREF_AUTOCON_SD 0x40
00731 #define MECHPREF_NOFRIENDLYFIRE 0x80
00732 #define MECHPREF_TURNMODE 0x100
00733
00734 typedef struct {
00735 char mech_name[31];
00736 char mech_type[15];
00737 char type;
00738 char move;
00739 char tac_range;
00740 char lrs_range;
00741 char scan_range;
00742 char numsinks;
00743 char computer;
00744 char radio;
00745 unsigned char radioinfo;
00746
00747 char si;
00748 char si_orig;
00749
00750 short radio_range;
00751
00752 struct section_struct sections[NUM_SECTIONS];
00753 int fuel;
00754 int fuel_orig;
00755
00756 int tons;
00757 int walkspeed;
00758 int runspeed;
00759 float maxspeed;
00760 float template_maxspeed;
00761
00762 int mechbv;
00763 int cargospace;
00764 #ifndef BT_CALCULATE_BV
00765 int unused[8];
00766 #else
00767 int mechbv_last;
00768 #endif
00769 char targcomp;
00770 char unused_char[3];
00771 char carmaxton;
00772 } mech_ud;
00773
00774 typedef struct {
00775 char jumptop;
00776 char aim;
00777 char basetohit;
00778 char pilotskillbase;
00779 char engineheat;
00780 char masc_value;
00781 char aim_type;
00782
00783 char sensor[2];
00784 byte fire_adjustment;
00785 char vis_mod;
00786
00787
00788 char chargetimer;
00789 float chargedist;
00790 char staggerstamp;
00791
00792 short mech_prefs;
00793 short jumplength;
00794 short goingx, goingy;
00795 short desiredfacing;
00796 short angle;
00797 short jumpheading;
00798 short targx, targy, targz;
00799 short turretfacing;
00800 short turndamage;
00801 short lateral;
00802 short num_seen;
00803 short lx, ly;
00804
00805
00806 dbref chgtarget;
00807 dbref dfatarget;
00808 dbref target;
00809 dbref swarming;
00810 dbref swarmedby;
00811 dbref carrying;
00812 dbref spotter;
00813
00814 float heat;
00815 float weapheat;
00816 float plus_heat;
00817 float minus_heat;
00818
00819 float startfx, startfy;
00820 float startfz, endfz;
00821 float verticalspeed;
00822 float speed;
00823 float desired_speed;
00824 float jumpspeed;
00825
00826 int critstatus;
00827 int status;
00828 int status2;
00829 int specials;
00830 int specials2;
00831 int specialsstatus;
00832 int tankcritstatus;
00833
00834 time_t last_weapon_recycle;
00835
00836
00837
00838
00839 int cargo_weight;
00840
00841
00842 int lastrndu;
00843 int rnd;
00844
00845 int last_ds_msg;
00846 int boom_start;
00847
00848 int maxfuel;
00849 int lastused;
00850 int cocoon;
00851 int commconv;
00852 int commconv_last;
00853 int onumsinks;
00854 int disabled_hs;
00855 int autopilot_num;
00856 int heatboom_last;
00857 int sspin;
00858 int can_see;
00859 int row;
00860 int rcw;
00861 float rspd;
00862 int erat;
00863 int per;
00864 int wxf;
00865 int last_startup;
00866 int maxsuits;
00867 int infantry_specials;
00868 char scharge_value;
00869 int staggerDamage;
00870 int lastStaggerNotify;
00871 int critstatus2;
00872 int unused[5];
00873 float xpmod;
00874 } mech_rd;
00875
00876 typedef struct {
00877 char pilotstatus;
00878 char terrain;
00879 char elev;
00880 short hexes_walked;
00881 short facing;
00882 short x, y, z;
00883 short last_x, last_y;
00884 float fx, fy, fz;
00885 int team;
00886 int unusable_arcs;
00887 int stall;
00888 dbref pilot;
00889 dbref bay[NUM_BAYS];
00890 dbref turret[NUM_TURRETS];
00891 } mech_pd;
00892
00893 typedef struct {
00894 char C3ChanTitle[CHTITLELEN + 1];
00895 dbref C3iNetwork[C3I_NETWORK_SIZE];
00896 int wC3iNetworkSize;
00897 dbref C3Network[C3_NETWORK_SIZE];
00898 int wC3NetworkSize;
00899 int wTotalC3Masters;
00900 int wWorkingC3Masters;
00901 int C3FreqMode;
00902 dbref tagTarget;
00903 dbref taggedBy;
00904 } mech_sd;
00905
00906 typedef struct {
00907 char ID[2];
00908 char brief;
00909 char chantitle[FREQS][CHTITLELEN + 1];
00910 dbref mynum;
00911 int mapnumber;
00912 dbref mapindex;
00913 unsigned long tic[NUM_TICS][TICLONGS];
00914 int freq[FREQS];
00915 int freqmodes[FREQS];
00916 mech_ud ud;
00917 mech_pd pd;
00918 mech_rd rd;
00919 mech_sd sd;
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
00939
00940 #define LANDED 0x00000001
00941 #define TORSO_RIGHT 0x00000002
00942 #define TORSO_LEFT 0x00000004
00943 #define STARTED 0x00000008
00944 #define PARTIAL_COVER 0x00000010
00945 #define DESTROYED 0x00000020
00946 #define JUMPING 0x00000040
00947 #define FALLEN 0x00000080
00948 #define DFA_ATTACK 0x00000100
00949 #define PERFORMING_ACTION 0x00000200
00950 #define FLIPPED_ARMS 0x00000400
00951 #define AMS_ENABLED 0x00000800
00952 #define EXPLODE_SAFE 0x00001000
00953 #define UNCONSCIOUS 0x00002000
00954 #define TOWED 0x00004000
00955 #define LOCK_TARGET 0x00008000
00956 #define LOCK_BUILDING 0x00010000
00957 #define LOCK_HEX 0x00020000
00958 #define LOCK_HEX_IGN 0x00040000
00959 #define LOCK_HEX_CLR 0x00080000
00960 #define MASC_ENABLED 0x00100000
00961 #define BLINDED 0x00200000
00962 #define COMBAT_SAFE 0x00400000
00963 #define AUTOCON_WHEN_SHUTDOWN 0x00800000
00964 #define FIRED 0x01000000
00965 #define SCHARGE_ENABLED 0x02000000
00966 #define HULLDOWN 0x04000000
00967 #define UNDERSPECIAL 0x08000000
00968 #define UNDERGRAVITY 0x10000000
00969 #define UNDERTEMPERATURE 0x20000000
00970 #define UNDERVACUUM 0x40000000
00971
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
00977
00978
00979 #define ECM_ENABLED 0x00000001
00980 #define ECCM_ENABLED 0x00000002
00981 #define ECM_DISTURBANCE 0x00000004
00982 #define ECM_PROTECTED 0x00000008
00983 #define ECM_COUNTERED 0x00000010
00984
00985
00986 #define SLITE_ON 0x00000020
00987 #define STH_ARMOR_ON 0x00000040
00988 #define NULLSIGSYS_ON 0x00000080
00989 #define ANGEL_ECM_ENABLED 0x00000100
00990 #define ANGEL_ECCM_ENABLED 0x00000200
00991 #define ANGEL_ECM_PROTECTED 0x00000400
00992 #define ANGEL_ECM_DISTURBED 0x00000800
00993 #define PER_ECM_ENABLED 0x00001000
00994 #define PER_ECCM_ENABLED 0x00002000
00995 #define AUTOTURN_TURRET 0x00004000
00996
00997 #define SPRINTING 0x00010000
00998 #define EVADING 0x00020000
00999 #define DODGING 0x00040000
01000 #define ATTACKEMIT_MECH 0x00080000
01001 #define UNIT_MOUNTED 0x00100000
01002 #define UNIT_MOUNTING 0x00200000
01003
01004
01005
01006
01007
01008
01009
01010
01011
01012
01013
01014
01015 #define MOVE_MODES (SPRINTING|EVADING|DODGING)
01016 #define MOVE_MODES_LOCK (SPRINTING|EVADING)
01017
01018
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
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
01036 #define Blinded(a) (MechStatus(a) & BLINDED)
01037 #define Started(a) (MechStatus(a) & STARTED)
01038 #define Uncon(a) (MechStatus(a) & UNCONSCIOUS)
01039
01040
01041 #define GYRO_DESTROYED 0x00000001
01042 #define SENSORS_DAMAGED 0x00000002
01043 #define TAG_DESTROYED 0x00000004
01044 #define HIDDEN 0x00000008
01045 #define GYRO_DAMAGED 0x00000010
01046 #define HIP_DAMAGED 0x00000020
01047 #define LIFE_SUPPORT_DESTROYED 0x00000040
01048 #define ANGEL_ECM_DESTROYED 0x00000080
01049 #define C3I_DESTROYED 0x00000100
01050 #define NSS_DESTROYED 0x00000200
01051 #define SLITE_DEST 0x00000400
01052 #define SLITE_LIT 0x00000800
01053 #define LOAD_OK 0x00001000
01054 #define OWEIGHT_OK 0x00002000
01055 #define SPEED_OK 0x00004000
01056 #define HEATCUTOFF 0x00008000
01057 #define TOWABLE 0x00010000
01058 #define HIP_DESTROYED 0x00020000
01059 #define TC_DESTROYED 0x00040000
01060 #define C3_DESTROYED 0x00080000
01061 #define ECM_DESTROYED 0x00100000
01062 #define BEAGLE_DESTROYED 0x00200000
01063 #define JELLIED 0x00400000
01064 #define PC_INITIALIZED 0x00800000
01065 #define SPINNING 0x01000000
01066 #define CLAIRVOYANT 0x02000000
01067 #define INVISIBLE 0x04000000
01068 #define CHEAD 0x08000000
01069 #define OBSERVATORIC 0x10000000
01070 #define BLOODHOUND_DESTROYED 0x20000000
01071 #define MECH_STUNNED 0x40000000
01072
01073
01074 #define TURRET_LOCKED 0x01
01075 #define TURRET_JAMMED 0x02
01076 #define DUG_IN 0x04
01077 #define DIGGING_IN 0x08
01078 #define CREW_STUNNED 0x10
01079 #define TAIL_ROTOR_DESTROYED 0x20
01080
01081
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
01095 #define CARGO_TECH 0x2000
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
01101 #define FF_TECH 0x80000
01102 #define ES_TECH 0x100000
01103 #define XL_TECH 0x200000
01104 #define ICE_TECH 0x400000
01105 #define LIFTER_TECH 0x800000
01106 #define LE_TECH 0x1000000
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
01114
01115
01116 #define HDGYRO_DAMAGED 0x01
01117
01118
01119 #define STEALTH_ARMOR_TECH 0x01
01120 #define HVY_FF_ARMOR_TECH 0x02
01121 #define LASER_REF_ARMOR_TECH 0x04
01122 #define REACTIVE_ARMOR_TECH 0x08
01123 #define NULLSIGSYS_TECH 0x10
01124 #define C3I_TECH 0x20
01125 #define SUPERCHARGER_TECH 0x40
01126 #define IMPROVED_JJ_TECH 0x80
01127 #define MECHANICAL_JJ_TECH 0x100
01128 #define COMPACT_HS_TECH 0x200
01129 #define LASER_HS_TECH 0x400
01130 #define BLOODHOUND_PROBE_TECH 0x800
01131 #define ANGEL_ECM_TECH 0x1000
01132 #define WATCHDOG_TECH 0x2000
01133 #define LT_FF_ARMOR_TECH 0x4000
01134 #define TAG_TECH 0x8000
01135 #define OMNIMECH_TECH 0x10000
01136 #define ARTEMISV_TECH 0x20000
01137 #define CAMO_TECH 0x40000
01138 #define CARRIER_TECH 0x80000
01139 #define WATERPROOF_TECH 0x100000
01140
01141 #define XLGYRO_TECH 0x200000
01142 #define HDGYRO_TECH 0x400000
01143 #define CGYRO_TECH 0x800000
01144 #define TCOMP_TECH 0x1000000
01145
01146
01147 #define INF_SWARM_TECH 0x01
01148 #define INF_MOUNT_TECH 0x02
01149 #define INF_ANTILEG_TECH 0x04
01150 #define CS_PURIFIER_STEALTH_TECH 0x08
01151 #define DC_KAGE_STEALTH_TECH 0x10
01152 #define FWL_ACHILEUS_STEALTH_TECH 0x20
01153 #define FC_INFILTRATOR_STEALTH_TECH 0x40
01154 #define FC_INFILTRATORII_STEALTH_TECH 0x80
01155 #define MUST_JETTISON_TECH 0x100
01156 #define CAN_JETTISON_TECH 0x200
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
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
01169
01170
01171
01172
01173
01174
01175
01176
01177
01178
01179
01180
01181
01182
01183
01184
01185
01186
01187
01188
01189
01190
01191
01192
01193
01194
01195
01196
01197
01198
01199
01200
01201
01202
01203
01204
01205
01206
01207
01208
01209
01210
01211
01212
01213
01214
01215
01216
01217
01218
01219
01220
01221
01222
01223
01224
01225
01226
01227
01228
01229
01230
01231
01232
01233
01234
01235
01236
01237
01238
01239
01240
01241
01242
01243
01244
01245
01246
01247
01248
01249
01250
01251
01252
01253
01254
01255
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
01277 #define TELE_SLAVE 2
01278 #define TELE_LOUD 4
01279 #define TELE_XP 8
01280
01281 #define MINE_STEP 1
01282 #define MINE_LAND 2
01283 #define MINE_FALL 3
01284 #define MINE_DROP 4
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
01314 typedef struct {
01315 int x;
01316 int y;
01317 } lostrace_info;
01318
01319 #endif