#include "config.h"
#include "mech.h"
#include "muxevent.h"
#include "mech.events.h"
#include "mech.tech.h"
#include "failures.h"
#include "p.econ.h"
#include "p.mech.utils.h"
#include "p.mech.tech.do.h"
#include "p.mech.status.h"
Include dependency graph for mech.tech.events.c:
Go to the source code of this file.
Defines | |
#define | VERBOSE_ENDS |
Functions | |
static int | completely_intact_int (MECH *mech) |
void | muxevent_tickmech_removesection (MUXEVENT *e) |
void | muxevent_tickmech_removegun (MUXEVENT *e) |
void | muxevent_tickmech_removepart (MUXEVENT *e) |
void | muxevent_tickmech_repairarmor (MUXEVENT *e) |
void | muxevent_tickmech_repairinternal (MUXEVENT *e) |
void | muxevent_tickmech_reattach (MUXEVENT *e) |
void | muxevent_tickmech_replacesuit (MUXEVENT *e) |
void | muxevent_tickmech_reseal (MUXEVENT *e) |
void | muxevent_tickmech_replacegun (MUXEVENT *e) |
void | muxevent_tickmech_repairgun (MUXEVENT *e) |
void | muxevent_tickmech_repairenhcrit (MUXEVENT *e) |
void | muxevent_tickmech_repairpart (MUXEVENT *e) |
void | muxevent_tickmech_reload (MUXEVENT *e) |
void | muxevent_tickmech_mountbomb (MUXEVENT *e) |
void | muxevent_tickmech_umountbomb (MUXEVENT *e) |
#define VERBOSE_ENDS |
Definition at line 22 of file mech.tech.events.c.
static int completely_intact_int | ( | MECH * | mech | ) | [static] |
Definition at line 24 of file mech.tech.events.c.
References GetSectInt, GetSectOInt, and NUM_SECTIONS.
Referenced by muxevent_tickmech_reattach(), muxevent_tickmech_repairarmor(), and muxevent_tickmech_repairinternal().
00025 { 00026 int i; 00027 00028 for(i = 0; i < NUM_SECTIONS; i++) 00029 if(!GetSectInt(mech, i) && GetSectOInt(mech, i)) 00030 return 0; 00031 return 1; 00032 }
void muxevent_tickmech_mountbomb | ( | MUXEVENT * | e | ) |
Definition at line 466 of file mech.tech.events.c.
Referenced by loadrepairs().
00467 { 00468 00469 /* MECH *mech = (MECH *) e->data; */ 00470 00471 /* int earg = (int) (e->data2) % PLAYERPOS; */ 00472 }
void muxevent_tickmech_reattach | ( | MUXEVENT * | e | ) |
Definition at line 271 of file mech.tech.events.c.
References ArmorStringFromIndex(), completely_intact_int(), my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, do_magic(), MBUF_SIZE, mech_printf(), mech_ReAttach(), MECHALL, MechMove, MechStatus, MechType, and PLAYERPOS.
Referenced by loadrepairs(), and TECHCOMMANDH().
00272 { 00273 MECH *mech = (MECH *) e->data; 00274 int earg = (int) (e->data2) % PLAYERPOS; 00275 char buf[MBUF_SIZE]; 00276 00277 /* Basically: Unset the limb destroyed, without doing a thing to 00278 damaged parts */ 00279 mech_ReAttach(mech, earg); 00280 ArmorStringFromIndex(earg, buf, MechType(mech), MechMove(mech)); 00281 if(completely_intact_int(mech)) 00282 do_magic(mech); 00283 do { 00284 int i = 0; 00285 00286 if(Destroyed(mech)) 00287 i = 1; 00288 MechStatus(mech) &= ~DESTROYED; 00289 mech_printf(mech, MECHALL, "%s has been reattached.", buf); 00290 if(i) 00291 MechStatus(mech) |= DESTROYED; 00292 } while (0); 00293 }
void muxevent_tickmech_reload | ( | MUXEVENT * | e | ) |
Definition at line 432 of file mech.tech.events.c.
References AddPartsM, ArmorStringFromIndex(), my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, FindAmmoType(), GetPartBrand, loc, MBUF_SIZE, mech_FillPartAmmo(), mech_printf(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, pos_part_name(), SetPartData, and UNPACK_LOCPOS_E.
Referenced by loadrepairs(), and TECHCOMMANDH().
00433 { 00434 MECH *mech = (MECH *) e->data; 00435 int earg = (int) (e->data2) % PLAYERPOS; 00436 int loc, pos, extra; 00437 char buf[MBUF_SIZE]; 00438 00439 UNPACK_LOCPOS_E(earg, loc, pos, extra); 00440 if(extra) { 00441 SetPartData(mech, loc, pos, 0); 00442 if(extra > 1) 00443 #ifndef BT_COMPLEXREPAIRS 00444 AddPartsM(mech, FindAmmoType(mech, loc, pos), 00445 GetPartBrand(mech, loc, pos), 1); 00446 #else 00447 AddPartsM(mech, loc, FindAmmoType(mech, loc, pos), 00448 GetPartBrand(mech, loc, pos), 1); 00449 #endif 00450 } else 00451 mech_FillPartAmmo(mech, loc, pos); 00452 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00453 do { 00454 int i = 0; 00455 00456 if(Destroyed(mech)) 00457 i = 1; 00458 MechStatus(mech) &= ~DESTROYED; 00459 mech_printf(mech, MECHALL, "%s on %s has been %sloaded.", 00460 pos_part_name(mech, loc, pos), buf, extra ? "un" : "re"); 00461 if(i) 00462 MechStatus(mech) |= DESTROYED; 00463 } while (0); 00464 }
void muxevent_tickmech_removegun | ( | MUXEVENT * | e | ) |
Definition at line 72 of file mech.tech.events.c.
References AddPartsM, ArmorStringFromIndex(), my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, DestroyPart, FindAmmoType(), my_event_type::function, GetPartBrand, GetPartType, GetWeaponCrits(), loc, MBUF_SIZE, mech_printf(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, pos_part_name(), UNPACK_LOCPOS_E, very_fake_func(), and Weapon2I.
Referenced by loadrepairs(), and TECHCOMMANDH().
00073 { 00074 MECH *mech = (MECH *) e->data; 00075 int earg = (int) (e->data2) % PLAYERPOS; 00076 int loc, pos, i, extra; 00077 char buf[MBUF_SIZE]; 00078 00079 UNPACK_LOCPOS_E(earg, loc, pos, extra); 00080 for(i = pos; 00081 i < (pos + GetWeaponCrits(mech, Weapon2I(GetPartType(mech, loc, 00082 pos)))); i++) 00083 DestroyPart(mech, loc, i); 00084 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00085 if(extra == 2 && (e->function != very_fake_func)) { 00086 #ifndef BT_COMPLEXREPAIRS 00087 AddPartsM(mech, FindAmmoType(mech, loc, pos), GetPartBrand(mech, 00088 loc, pos), 00089 1); 00090 #else 00091 AddPartsM(mech, loc, FindAmmoType(mech, loc, pos), GetPartBrand(mech, 00092 loc, 00093 pos), 00094 1); 00095 #endif 00096 do { 00097 int i = 0; 00098 00099 if(Destroyed(mech)) 00100 i = 1; 00101 MechStatus(mech) &= ~DESTROYED; 00102 mech_printf(mech, MECHALL, 00103 "%s from %s has been removed.", pos_part_name(mech, 00104 loc, 00105 pos), 00106 buf); 00107 if(i) 00108 MechStatus(mech) |= DESTROYED; 00109 } while (0); 00110 } else { 00111 do { 00112 int i = 0; 00113 00114 if(Destroyed(mech)) 00115 i = 1; 00116 MechStatus(mech) &= ~DESTROYED; 00117 mech_printf(mech, MECHALL, 00118 "%s from %s has been removed and scrapped.", 00119 pos_part_name(mech, loc, pos), buf); 00120 if(i) 00121 MechStatus(mech) |= DESTROYED; 00122 } while (0); 00123 } 00124 }
void muxevent_tickmech_removepart | ( | MUXEVENT * | e | ) |
Definition at line 126 of file mech.tech.events.c.
References AddPartsM, ArmorStringFromIndex(), CLASS_MECH, my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, DestroyPart, do_magic(), FindAmmoType(), my_event_type::function, GetPartBrand, loc, MBUF_SIZE, mech_printf(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, pos_part_name(), UNPACK_LOCPOS_E, and very_fake_func().
Referenced by loadrepairs(), and TECHCOMMANDH().
00127 { 00128 MECH *mech = (MECH *) e->data; 00129 int earg = (int) (e->data2) % PLAYERPOS; 00130 int loc, pos, extra; 00131 char buf[MBUF_SIZE]; 00132 00133 UNPACK_LOCPOS_E(earg, loc, pos, extra); 00134 DestroyPart(mech, loc, pos); 00135 if(MechType(mech) == CLASS_MECH) 00136 do_magic(mech); 00137 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00138 if(extra == 2 && (e->function != very_fake_func)) { 00139 #ifndef BT_COMPLEXREPAIRS 00140 AddPartsM(mech, FindAmmoType(mech, loc, pos), GetPartBrand(mech, 00141 loc, pos), 00142 1); 00143 #else 00144 AddPartsM(mech, loc, FindAmmoType(mech, loc, pos), GetPartBrand(mech, 00145 loc, 00146 pos), 00147 1); 00148 #endif 00149 do { 00150 int i = 0; 00151 00152 if(Destroyed(mech)) 00153 i = 1; 00154 MechStatus(mech) &= ~DESTROYED; 00155 mech_printf(mech, MECHALL, 00156 "%s from %s has been removed.", pos_part_name(mech, 00157 loc, 00158 pos), 00159 buf); 00160 if(i) 00161 MechStatus(mech) |= DESTROYED; 00162 } while (0); 00163 } else { 00164 do { 00165 int i = 0; 00166 00167 if(Destroyed(mech)) 00168 i = 1; 00169 MechStatus(mech) &= ~DESTROYED; 00170 mech_printf(mech, MECHALL, 00171 "%s from %s has been removed and scrapped.", 00172 pos_part_name(mech, loc, pos), buf); 00173 if(i) 00174 MechStatus(mech) |= DESTROYED; 00175 } while (0); 00176 } 00177 }
void muxevent_tickmech_removesection | ( | MUXEVENT * | e | ) |
Definition at line 34 of file mech.tech.events.c.
References AddPartsM, ArmorStringFromIndex(), Cargo, my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, GetSectArmor, GetSectInt, loc, MBUF_SIZE, mech_Detach(), mech_printf(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, ProperArmor, ProperInternal, S_ELECTRONIC, and UNPACK_LOCPOS_E.
Referenced by loadrepairs(), and TECHCOMMANDH().
00035 { 00036 MECH *mech = (MECH *) e->data; 00037 int earg = (int) (e->data2) % PLAYERPOS; 00038 char buf[MBUF_SIZE]; 00039 int loc, pos, extra; 00040 00041 /* changed Special2I to Special on AddPartsM statements */ 00042 UNPACK_LOCPOS_E(earg, loc, pos, extra); 00043 #ifndef BT_COMPLEXREPAIRS 00044 AddPartsM(mech, ProperInternal(mech), 0, (2 * GetSectInt(mech, 00045 loc)) / extra); 00046 AddPartsM(mech, ProperArmor(mech), 0, (2 * GetSectArmor(mech, 00047 loc)) / extra); 00048 AddPartsM(mech, Cargo(S_ELECTRONIC), 0, (GetSectInt(mech, loc)) / extra); 00049 #else 00050 AddPartsM(mech, loc, ProperInternal(mech), 0, (2 * GetSectInt(mech, 00051 loc)) / 00052 extra); 00053 AddPartsM(mech, loc, ProperArmor(mech), 0, 00054 (2 * GetSectArmor(mech, loc)) / extra); 00055 AddPartsM(mech, loc, Cargo(S_ELECTRONIC), 0, 00056 (GetSectInt(mech, loc)) / extra); 00057 #endif 00058 mech_Detach(mech, loc); 00059 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00060 do { 00061 int i = 0; 00062 00063 if(Destroyed(mech)) 00064 i = 1; 00065 MechStatus(mech) &= ~DESTROYED; 00066 mech_printf(mech, MECHALL, "%s has been removed.", buf); 00067 if(i) 00068 MechStatus(mech) |= DESTROYED; 00069 } while (0); 00070 }
void muxevent_tickmech_repairarmor | ( | MUXEVENT * | e | ) |
Definition at line 179 of file mech.tech.events.c.
References ArmorStringFromIndex(), CLASS_MECH, completely_intact_int(), my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, do_magic(), EVENT_REPAIR_FIX, FIXARMOR_TIME, GetSectArmor, GetSectOArmor, GetSectORArmor, GetSectRArmor, loc, MBUF_SIZE, mech_printf(), MECHALL, MechMove, MechStatus, MechType, MIN, muxevent_tickmech_repairarmor(), PLAYERPOS, REPAIREVENT, SetSectArmor, and SetSectRArmor.
Referenced by loadrepairs(), muxevent_tickmech_repairarmor(), and TECHCOMMANDH().
00180 { 00181 MECH *mech = (MECH *) e->data; 00182 int earg = (int) (e->data2) % PLAYERPOS; 00183 int loc = earg % 16; 00184 int amount = (earg / 16) % 256; 00185 int player = ((int) e->data2) / PLAYERPOS; 00186 char buf[MBUF_SIZE]; 00187 00188 if(loc >= 8) { 00189 SetSectRArmor(mech, loc % 8, MIN(GetSectRArmor(mech, loc % 8) + 1, 00190 GetSectORArmor(mech, loc % 8))); 00191 } else { 00192 SetSectArmor(mech, loc, MIN(GetSectArmor(mech, loc) + 1, 00193 GetSectOArmor(mech, loc))); 00194 } 00195 amount--; 00196 if(amount < 0) 00197 return; 00198 if(amount <= 0) { 00199 ArmorStringFromIndex(loc % 8, buf, MechType(mech), MechMove(mech)); 00200 if(loc >= 8) { 00201 do { 00202 int i = 0; 00203 00204 if(Destroyed(mech)) 00205 i = 1; 00206 MechStatus(mech) &= ~DESTROYED; 00207 mech_printf(mech, MECHALL, 00208 "%s's rear armor repairs have been finished.", 00209 buf); 00210 if(i) 00211 MechStatus(mech) |= DESTROYED; 00212 } while (0); 00213 } else { 00214 do { 00215 int i = 0; 00216 00217 if(Destroyed(mech)) 00218 i = 1; 00219 MechStatus(mech) &= ~DESTROYED; 00220 mech_printf(mech, MECHALL, 00221 "%s's armor repairs have been finished.", buf); 00222 if(i) 00223 MechStatus(mech) |= DESTROYED; 00224 } while (0); 00225 } 00226 00227 if(MechType(mech) != CLASS_MECH && completely_intact_int(mech)) 00228 do_magic(mech); 00229 return; 00230 } 00231 REPAIREVENT(FIXARMOR_TIME, mech, (amount * 16 + loc), 00232 muxevent_tickmech_repairarmor, EVENT_REPAIR_FIX); 00233 }
void muxevent_tickmech_repairenhcrit | ( | MUXEVENT * | e | ) |
Definition at line 383 of file mech.tech.events.c.
References ArmorStringFromIndex(), my_event_type::data, my_event_type::data2, FindFirstWeaponCrit(), GetPartType, GetWeaponCrits(), loc, MBUF_SIZE, mech_printf(), MECHALL, MechMove, MechType, PLAYERPOS, pos_part_name(), SetPartTempNuke, UnDamagePart, UNPACK_LOCPOS, and Weapon2I.
Referenced by loadrepairs(), and TECHCOMMANDH().
00384 { 00385 MECH *mech = (MECH *) e->data; 00386 int earg = (int) (e->data2) % PLAYERPOS; 00387 int loc, pos; 00388 char buf[MBUF_SIZE]; 00389 int wCritType, wWeapSize, wFirstCrit; 00390 00391 UNPACK_LOCPOS(earg, loc, pos); 00392 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00393 mech_printf(mech, MECHALL, "%s on %s has been repaired.", 00394 pos_part_name(mech, loc, pos), buf); 00395 UnDamagePart(mech, loc, pos); 00396 00397 /* Get the crit type */ 00398 wCritType = GetPartType(mech, loc, pos); 00399 00400 /* Get the max number of crits for this weapon */ 00401 wWeapSize = GetWeaponCrits(mech, Weapon2I(wCritType)); 00402 00403 /* Find the first crit */ 00404 wFirstCrit = FindFirstWeaponCrit(mech, loc, pos, 0, wCritType, wWeapSize); 00405 00406 SetPartTempNuke(mech, loc, wFirstCrit, 0); 00407 }
void muxevent_tickmech_repairgun | ( | MUXEVENT * | e | ) |
Definition at line 355 of file mech.tech.events.c.
References ArmorStringFromIndex(), ClearTempNuke, my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, GetPartType, GetWeaponCrits(), loc, MBUF_SIZE, mech_printf(), mech_RepairPart(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, pos_part_name(), UNPACK_LOCPOS, and Weapon2I.
Referenced by loadrepairs(), and TECHCOMMANDH().
00356 { 00357 MECH *mech = (MECH *) e->data; 00358 int earg = (int) (e->data2) % PLAYERPOS; 00359 int loc, pos, i; 00360 char buf[MBUF_SIZE]; 00361 00362 UNPACK_LOCPOS(earg, loc, pos); 00363 for(i = pos; 00364 i < (pos + GetWeaponCrits(mech, Weapon2I(GetPartType(mech, loc, 00365 pos)))); i++) { 00366 mech_RepairPart(mech, loc, i); 00367 ClearTempNuke(mech, loc, i); 00368 } 00369 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00370 do { 00371 int i = 0; 00372 00373 if(Destroyed(mech)) 00374 i = 1; 00375 MechStatus(mech) &= ~DESTROYED; 00376 mech_printf(mech, MECHALL, "%s on %s has been repaired.", 00377 pos_part_name(mech, loc, pos), buf); 00378 if(i) 00379 MechStatus(mech) |= DESTROYED; 00380 } while (0); 00381 }
void muxevent_tickmech_repairinternal | ( | MUXEVENT * | e | ) |
Definition at line 235 of file mech.tech.events.c.
References ArmorStringFromIndex(), CLASS_MECH, completely_intact_int(), my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, do_magic(), EVENT_REPAIR_FIXI, FIXINTERNAL_TIME, GetSectInt, GetSectOInt, loc, MBUF_SIZE, mech_printf(), MECHALL, MechMove, MechStatus, MechType, muxevent_tickmech_repairinternal(), PLAYERPOS, REPAIREVENT, and SetSectInt.
Referenced by loadrepairs(), muxevent_tickmech_repairinternal(), and TECHCOMMANDH().
00236 { 00237 MECH *mech = (MECH *) e->data; 00238 int earg = (int) (e->data2) % PLAYERPOS; 00239 int loc = earg % 16; 00240 int amount = (earg / 16) % 256; 00241 int player = ((int) e->data2) / PLAYERPOS; 00242 char buf[MBUF_SIZE]; 00243 00244 SetSectInt(mech, loc, GetSectInt(mech, loc) + 1); 00245 if(GetSectInt(mech, loc) > GetSectOInt(mech, loc)) 00246 SetSectInt(mech, loc, GetSectOInt(mech, loc)); 00247 amount--; 00248 if(amount < 0) 00249 return; 00250 if(amount <= 0) { 00251 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00252 do { 00253 int i = 0; 00254 00255 if(Destroyed(mech)) 00256 i = 1; 00257 MechStatus(mech) &= ~DESTROYED; 00258 mech_printf(mech, MECHALL, 00259 "%s's internal repairs have been finished.", buf); 00260 if(i) 00261 MechStatus(mech) |= DESTROYED; 00262 } while (0); 00263 if(MechType(mech) != CLASS_MECH && completely_intact_int(mech)) 00264 do_magic(mech); 00265 return; 00266 } 00267 REPAIREVENT(FIXINTERNAL_TIME, mech, (amount * 16 + loc), 00268 muxevent_tickmech_repairinternal, EVENT_REPAIR_FIXI); 00269 }
void muxevent_tickmech_repairpart | ( | MUXEVENT * | e | ) |
Definition at line 409 of file mech.tech.events.c.
References ArmorStringFromIndex(), my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, loc, MBUF_SIZE, mech_printf(), mech_RepairPart(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, pos_part_name(), and UNPACK_LOCPOS.
Referenced by loadrepairs(), and TECHCOMMANDH().
00410 { 00411 MECH *mech = (MECH *) e->data; 00412 int earg = (int) (e->data2) % PLAYERPOS; 00413 int loc, pos; 00414 char buf[MBUF_SIZE]; 00415 00416 UNPACK_LOCPOS(earg, loc, pos); 00417 mech_RepairPart(mech, loc, pos); 00418 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00419 do { 00420 int i = 0; 00421 00422 if(Destroyed(mech)) 00423 i = 1; 00424 MechStatus(mech) &= ~DESTROYED; 00425 mech_printf(mech, MECHALL, "%s on %s has been repaired.", 00426 pos_part_name(mech, loc, pos), buf); 00427 if(i) 00428 MechStatus(mech) |= DESTROYED; 00429 } while (0); 00430 }
void muxevent_tickmech_replacegun | ( | MUXEVENT * | e | ) |
Definition at line 324 of file mech.tech.events.c.
References ArmorStringFromIndex(), ClearTempNuke, my_event_type::data, my_event_type::data2, Destroyed, DESTROYED, GetPartType, GetWeaponCrits(), loc, MBUF_SIZE, mech_printf(), mech_RepairPart(), MECHALL, MechMove, MechStatus, MechType, PLAYERPOS, pos_part_name(), SetPartBrand, UNPACK_LOCPOS_E, and Weapon2I.
Referenced by loadrepairs(), and TECHCOMMANDH().
00325 { 00326 MECH *mech = (MECH *) e->data; 00327 int earg = (int) (e->data2) % PLAYERPOS; 00328 int loc, pos, i, brand; 00329 char buf[MBUF_SIZE]; 00330 00331 UNPACK_LOCPOS_E(earg, loc, pos, brand); 00332 for(i = pos; 00333 i < (pos + GetWeaponCrits(mech, Weapon2I(GetPartType(mech, loc, 00334 pos)))); i++) { 00335 mech_RepairPart(mech, loc, i); 00336 ClearTempNuke(mech, loc, i); 00337 if(brand) { 00338 SetPartBrand(mech, loc, i, brand); 00339 } 00340 } 00341 ArmorStringFromIndex(loc, buf, MechType(mech), MechMove(mech)); 00342 do { 00343 int i = 0; 00344 00345 if(Destroyed(mech)) 00346 i = 1; 00347 MechStatus(mech) &= ~(DESTROYED); 00348 mech_printf(mech, MECHALL, "%s on %s has been replaced.", 00349 pos_part_name(mech, loc, pos), buf); 00350 if(i) 00351 MechStatus(mech) |= DESTROYED; 00352 } while (0); 00353 }
void muxevent_tickmech_replacesuit | ( | MUXEVENT * | e | ) |
Definition at line 295 of file mech.tech.events.c.
References ArmorStringFromIndex(), my_event_type::data, my_event_type::data2, do_magic(), MBUF_SIZE, mech_printf(), mech_ReplaceSuit(), MECHALL, MechMove, MechType, and PLAYERPOS.
Referenced by loadrepairs(), and TECHCOMMANDH().
00296 { 00297 MECH *mech = (MECH *) e->data; 00298 int earg = (int) (e->data2) % PLAYERPOS; 00299 char buf[MBUF_SIZE]; 00300 00301 ArmorStringFromIndex(earg, buf, MechType(mech), MechMove(mech)); 00302 mech_ReplaceSuit(mech, earg); 00303 do_magic(mech); 00304 00305 mech_printf(mech, MECHALL, "%s has been replaced.", buf); 00306 }
void muxevent_tickmech_reseal | ( | MUXEVENT * | e | ) |
Definition at line 313 of file mech.tech.events.c.
References ArmorStringFromIndex(), my_event_type::data, my_event_type::data2, MBUF_SIZE, mech_printf(), mech_ReSeal(), MECHALL, MechMove, MechType, and PLAYERPOS.
Referenced by TECHCOMMANDH().
00314 { 00315 MECH *mech = (MECH *) e->data; 00316 int earg = (int) (e->data2) % PLAYERPOS; 00317 char buf[MBUF_SIZE]; 00318 00319 mech_ReSeal(mech, earg); 00320 ArmorStringFromIndex(earg, buf, MechType(mech), MechMove(mech)); 00321 mech_printf(mech, MECHALL, "%s has been resealed.", buf); 00322 }
void muxevent_tickmech_umountbomb | ( | MUXEVENT * | e | ) |
Definition at line 474 of file mech.tech.events.c.
Referenced by loadrepairs().
00475 { 00476 00477 /* MECH *mech = (MECH *) e->data; */ 00478 00479 /* int earg = (int) (e->data2) % PLAYERPOS; */ 00480 }