diff --git a/src/game/activemenu.c b/src/game/activemenu.c index 1d8d23f70..b2584caed 100644 --- a/src/game/activemenu.c +++ b/src/game/activemenu.c @@ -416,8 +416,8 @@ void am_get_slot_details(s32 slot, u32 *flags, char *label) s32 qty; s32 secs; s32 modulo; - struct weaponfunc *prifunc; - struct weaponfunc *secfunc; + struct funcdef *prifunc; + struct funcdef *secfunc; switch (g_AmMenus[g_AmIndex].screenindex) { case 0: // Weapon screen diff --git a/src/game/activemenutick.c b/src/game/activemenutick.c index e2afaf665..8f66944fe 100644 --- a/src/game/activemenutick.c +++ b/src/game/activemenutick.c @@ -307,8 +307,8 @@ void am_tick(void) // If weapon has no functions, skip past function screen if (g_AmMenus[g_AmIndex].screenindex == 1) { - struct weaponfunc *pri = gset_get_funcdef_by_gset_funcnum(&g_Vars.currentplayer->hands[0].gset, FUNC_PRIMARY); - struct weaponfunc *sec = gset_get_funcdef_by_gset_funcnum(&g_Vars.currentplayer->hands[0].gset, FUNC_SECONDARY); + struct funcdef *pri = gset_get_funcdef_by_gset_funcnum(&g_Vars.currentplayer->hands[0].gset, FUNC_PRIMARY); + struct funcdef *sec = gset_get_funcdef_by_gset_funcnum(&g_Vars.currentplayer->hands[0].gset, FUNC_SECONDARY); if (!pri && !sec) { am_change_screen(gotonextscreen); diff --git a/src/game/bondgun.c b/src/game/bondgun.c index 46acf1bea..81f254c4d 100644 --- a/src/game/bondgun.c +++ b/src/game/bondgun.c @@ -424,7 +424,7 @@ void bgun_execute_gun_vis_commands(struct hand *hand, struct modeldef *modeldef, void bgun_update_ammo_visibility(struct hand *hand, struct modeldef *modeldef) { - struct weapon *weapon = gset_get_weapondef(hand->gset.weaponnum); + struct weapondef *weapon = gset_get_weapondef(hand->gset.weaponnum); s32 i; s32 j; @@ -862,7 +862,7 @@ void bgun_get_weapon_info(struct handweaponinfo *info, s32 handnum) s32 bgun_get_ammo_state(s32 funcnum, struct handweaponinfo *info, struct hand *hand) { s32 state = GUNAMMOSTATE_CLIPFULL; - struct weaponfunc *func = gset_get_funcdef_by_gset_funcnum(&hand->gset, funcnum); + struct funcdef *func = gset_get_funcdef_by_gset_funcnum(&hand->gset, funcnum); if (!func) { return GUNAMMOSTATE_DEPLETED; @@ -903,7 +903,7 @@ s32 bgun_get_ammo_state(s32 funcnum, struct handweaponinfo *info, struct hand *h void bgun0f098df8(s32 weaponfunc, struct handweaponinfo *info, struct hand *hand, u8 onebullet, u8 checkunequipped) { - struct weaponfunc *func = gset_get_funcdef_by_gset_funcnum(&hand->gset, weaponfunc); + struct funcdef *func = gset_get_funcdef_by_gset_funcnum(&hand->gset, weaponfunc); if (func && func->ammoindex != -1) { s32 ammoindex = func->ammoindex; @@ -982,7 +982,7 @@ bool bgun_clip_has_ammo(s32 handnum) return false; } -bool bgun0f0990b0(struct weaponfunc *basefunc, struct weapon *weapon) +bool bgun0f0990b0(struct funcdef *basefunc, struct weapondef *weapon) { if (!basefunc) { return true; @@ -997,7 +997,7 @@ bool bgun0f0990b0(struct weaponfunc *basefunc, struct weapon *weapon) } if ((basefunc->type & 0xff) == INVENTORYFUNCTYPE_SPECIAL) { - struct weaponfunc_special *func = (struct weaponfunc_special *)basefunc; + struct funcdef_special *func = (struct funcdef_special *)basefunc; if (func->specialfunc != HANDATTACKTYPE_DETONATE && func->specialfunc != HANDATTACKTYPE_BOOST @@ -1023,8 +1023,8 @@ bool bgun0f0990b0(struct weaponfunc *basefunc, struct weapon *weapon) bool bgun0f099188(struct hand *hand, s32 gunfunc) { - struct weaponfunc *func = gset_get_funcdef_by_gset_funcnum(&hand->gset, gunfunc); - struct weapon *weapon = gset_get_weapondef(hand->gset.weaponnum); + struct funcdef *func = gset_get_funcdef_by_gset_funcnum(&hand->gset, gunfunc); + struct weapondef *weapon = gset_get_weapondef(hand->gset.weaponnum); if (bgun_is_using_secondary_function() == gunfunc) { return false; @@ -1042,7 +1042,7 @@ s32 bgun_tick_inc_idle(struct handweaponinfo *info, s32 handnum, struct hand *ha bool changefunc; s32 next; struct hand *lhand; - struct weaponfunc *func; + struct funcdef *func; hand->lastdirvalid = false; hand->burstbullets = 0; @@ -1354,7 +1354,7 @@ bool bgun_is_reloading(struct hand *hand) s32 bgun_tick_inc_reload(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate) { u32 stack; - struct weaponfunc *func = gset_get_funcdef_by_gset(&hand->gset); + struct funcdef *func = gset_get_funcdef_by_gset(&hand->gset); if (g_Vars.currentplayer->isdead) { hand->animmode = HANDANIMMODE_IDLE; @@ -1590,7 +1590,7 @@ s32 bgun_tick_inc_changefunc(struct handweaponinfo *info, s32 handnum, struct ha return 0; } -s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func) +s32 bgun0f09a3f8(struct hand *hand, struct funcdef *func) { bool burst = false; bool smallburst = false; @@ -1629,7 +1629,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func) } if ((func->type & 0xff00) == 0x100) { - struct weaponfunc_shootauto *autofunc = (struct weaponfunc_shootauto *) func; + struct funcdef_shootauto *autofunc = (struct funcdef_shootauto *) func; if (autofunc->turretaccel > 0) { if (hand->gs_float1 < 1) { @@ -1685,7 +1685,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func) } if ((func->type & 0xff00) == (INVENTORYFUNCTYPE_SHOOT_AUTOMATIC & 0xff00)) { - struct weaponfunc_shootauto *autofunc = (struct weaponfunc_shootauto *) func; + struct funcdef_shootauto *autofunc = (struct funcdef_shootauto *) func; if (autofunc->turretdecel > 0) { if (hand->gs_float1 > 0) { @@ -1708,7 +1708,7 @@ s32 bgun0f09a3f8(struct hand *hand, struct weaponfunc *func) return -1; } -void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, struct weaponfunc *func) +void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, struct funcdef *func) { bool usesammo = true; @@ -1721,7 +1721,7 @@ void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, s hand->firing = true; if ((func->type & 0xff00) == 0x100) { - struct weaponfunc_shootauto *autofunc = (struct weaponfunc_shootauto *) func; + struct funcdef_shootauto *autofunc = (struct funcdef_shootauto *) func; f32 tmp; f32 tmp2; @@ -1849,7 +1849,7 @@ void bgun0f09a6f8(struct handweaponinfo *info, s32 handnum, struct hand *hand, s } } -bool bgun_tick_recoil(struct hand *hand, struct handweaponinfo *info, s32 handnum, struct weaponfunc_shoot *func) +bool bgun_tick_recoil(struct hand *hand, struct handweaponinfo *info, s32 handnum, struct funcdef_shoot *func) { s32 unk24; s32 unk25; @@ -1858,7 +1858,7 @@ bool bgun_tick_recoil(struct hand *hand, struct handweaponinfo *info, s32 handnu s32 unk27; s32 recoverytime60; s32 curframe; - struct weapon *weapondef; + struct weapondef *weapondef; f32 mult1; f32 recoildist; f32 recoilangle; @@ -2011,7 +2011,7 @@ bool bgun_tick_inc_attacking_shoot(struct handweaponinfo *info, s32 handnum, str { static u32 var80070128 = 99; - struct weaponfunc *func = gset_get_funcdef_by_gset(&hand->gset); + struct funcdef *func = gset_get_funcdef_by_gset(&hand->gset); bool canfireagain; s32 sp64; s32 sp60; @@ -2051,7 +2051,7 @@ bool bgun_tick_inc_attacking_shoot(struct handweaponinfo *info, s32 handnum, str sp60 = bgun0f09a3f8(hand, func); if ((func->type & 0xff00) == 0x100) { - struct weaponfunc_shootauto *autofunc = (struct weaponfunc_shootauto *) func; + struct funcdef_shootauto *autofunc = (struct funcdef_shootauto *) func; f32 floats[12]; if (autofunc->vibrationstart != NULL && autofunc->vibrationmax != NULL) { @@ -2083,7 +2083,7 @@ bool bgun_tick_inc_attacking_shoot(struct handweaponinfo *info, s32 handnum, str if (hand->stateminor == HANDSTATEMINOR_ATTACK_SHOOT_2) { if (hand->stateflags & HANDSTATEFLAG_FIRED) { - canfireagain = bgun_tick_recoil(hand, info, handnum, (struct weaponfunc_shoot *) func); + canfireagain = bgun_tick_recoil(hand, info, handnum, (struct funcdef_shoot *) func); } else { canfireagain = true; } @@ -2110,7 +2110,7 @@ bool bgun_tick_inc_attacking_shoot(struct handweaponinfo *info, s32 handnum, str bool bgun_tick_inc_attacking_throw(s32 handnum, struct hand *hand) { - struct weaponfunc_throw *func = (struct weaponfunc_throw *) gset_get_funcdef_by_gset(&hand->gset); + struct funcdef_throw *func = (struct funcdef_throw *) gset_get_funcdef_by_gset(&hand->gset); if (func == NULL) { return true; @@ -2222,7 +2222,7 @@ u32 var80070130 = 0x00000000; bool bgun_tick_inc_attacking_melee(s32 handnum, struct hand *hand) { - struct weaponfunc *func = gset_get_funcdef_by_gset(&hand->gset); + struct funcdef *func = gset_get_funcdef_by_gset(&hand->gset); if (func == NULL) { return true; @@ -2330,7 +2330,7 @@ bool bgun_tick_inc_attacking_melee(s32 handnum, struct hand *hand) bool bgun_tick_inc_attacking_special(struct hand *hand) { - struct weaponfunc_special *func = (struct weaponfunc_special *) gset_get_funcdef_by_gset(&hand->gset); + struct funcdef_special *func = (struct funcdef_special *) gset_get_funcdef_by_gset(&hand->gset); if (!func) { return true; @@ -2398,7 +2398,7 @@ s32 bgun_tick_inc_attackempty(struct handweaponinfo *info, s32 handnum, struct h bool restartedanim = false; if ((hand->stateflags & HANDSTATEFLAG_BUSY) == 0) { - struct weaponfunc *func = NULL; + struct funcdef *func = NULL; if (info->definition) { func = gset_get_funcdef_by_gset(&hand->gset); @@ -2526,7 +2526,7 @@ s32 bgun_tick_inc_attackempty(struct handweaponinfo *info, s32 handnum, struct h s32 bgun_tick_inc_attack(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate) { u32 stack; - struct weaponfunc *func = NULL; + struct funcdef *func = NULL; bool finished = true; u32 stack2; @@ -2663,7 +2663,7 @@ bool bgun0f09bf44(s32 handnum) s32 bgun_tick_inc_changegun(struct handweaponinfo *info, s32 handnum, struct hand *hand, s32 lvupdate) { u32 stack; - struct weapon *weapon = info->definition; + struct weapondef *weapon = info->definition; if (hand->statecycles == 0) { if (g_Vars.normmplayerisrunning == false) { @@ -3230,7 +3230,7 @@ void bgun_calculate_blend(s32 handnum) { s32 sp60[2]; s32 sp58[2]; - struct weapon *weapon = gset_get_weapondef(bgun_get_weapon_num(handnum)); + struct weapondef *weapon = gset_get_weapondef(bgun_get_weapon_num(handnum)); f32 sway = weapon->sway; struct player *player = g_Vars.currentplayer; @@ -3832,11 +3832,11 @@ void bgun_tick_master_load(void) s32 i; struct casing *casing; struct hand *hand; - struct weaponfunc *func; - struct weaponfunc *shootfunc; - struct weapon *weapondef; + struct funcdef *func; + struct funcdef *shootfunc; + struct weapondef *weapondef; s32 casingindex; - struct inventory_ammo *ammodef; + struct ammodef *ammodef; s32 value; s32 bodynum; s32 headnum; @@ -4198,9 +4198,9 @@ void bgun0f09ed2c(struct defaultobj *obj, struct coord *newpos, Mtxf *arg2, stru struct defaultobj *bgun_create_thrown_projectile2(struct chrdata *chr, struct gset *gset, struct coord *pos, RoomNum *rooms, Mtxf *arg4, struct coord *velocity) { struct defaultobj *obj = NULL; - struct weaponfunc *basefunc; - struct weaponfunc_throw *func; - struct weapon *weapon = gset_get_weapondef(gset->weaponnum); + struct funcdef *basefunc; + struct funcdef_throw *func; + struct weapondef *weapon = gset_get_weapondef(gset->weaponnum); struct weaponobj *weaponobj; struct autogunobj *autogun; Mtxf mtx; @@ -4211,7 +4211,7 @@ struct defaultobj *bgun_create_thrown_projectile2(struct chrdata *chr, struct gs } basefunc = weapon->functions[gset->weaponfunc]; - func = (struct weaponfunc_throw *) basefunc; + func = (struct funcdef_throw *) basefunc; if (func == NULL) { return false; @@ -4523,7 +4523,7 @@ void bgun_update_held_rocket(s32 handnum) } } -void bgun_create_held_rocket(s32 handnum, struct weaponfunc_shootprojectile *func) +void bgun_create_held_rocket(s32 handnum, struct funcdef_shootprojectile *func) { struct hand *hand = &g_Vars.currentplayer->hands[handnum]; struct weaponobj *obj; @@ -4560,7 +4560,7 @@ void bgun_free_held_rocket(s32 handnum) void bgun_create_fired_projectile(s32 handnum) { - struct weapon *weapondef; + struct weapondef *weapondef; struct hand *hand; Mtxf sp270; struct coord sp264; @@ -4575,8 +4575,8 @@ void bgun_create_fired_projectile(s32 handnum) struct coord *extrapos; struct coord spawnpos; struct weaponobj *weapon; - struct weaponfunc *tmp; - struct weaponfunc_shootprojectile *funcdef; + struct funcdef *tmp; + struct funcdef_shootprojectile *funcdef; struct coord aimpos; struct coord sp1bc; f32 frac; @@ -4600,7 +4600,7 @@ void bgun_create_fired_projectile(s32 handnum) tmp = weapondef->functions[hand->gset.weaponfunc]; if (tmp && tmp->type == INVENTORYFUNCTYPE_SHOOT_PROJECTILE) { - funcdef = (struct weaponfunc_shootprojectile *)tmp; + funcdef = (struct funcdef_shootprojectile *)tmp; mtx4_load_identity(&sp270); bgun_calculate_player_shot_spread(&gunpos, &gundir, handnum, true); @@ -5032,7 +5032,7 @@ void bgun_swivel(f32 screenx, f32 screeny, f32 crossdamp, f32 aimdamp) */ void bgun_swivel_with_damp(f32 screenx, f32 screeny, f32 crossdamp) { - struct weapon *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); + struct weapondef *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); f32 aimdamp = PAL ? weapon->aimsettings->aimdamppal : weapon->aimsettings->aimdamp; if (aimdamp < crossdamp) { @@ -5050,7 +5050,7 @@ void bgun_swivel_with_damp(f32 screenx, f32 screeny, f32 crossdamp) */ void bgun_swivel_without_damp(f32 screenx, f32 screeny) { - struct weapon *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); + struct weapondef *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); f32 aimdamp = PAL ? weapon->aimsettings->aimdamppal : weapon->aimsettings->aimdamp; bgun_swivel(screenx, screeny, PAL ? 0.935f : 0.945f, aimdamp); @@ -5088,11 +5088,11 @@ void bgun_calculate_player_shot_spread(struct coord *gunpos2d, struct coord *gun f32 spread = 0; f32 scaledspread; f32 randfactor; - struct weaponfunc *func = gset_get_current_funcdef(handnum); + struct funcdef *func = gset_get_current_funcdef(handnum); struct player *player = g_Vars.currentplayer; if (func != NULL && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *shootfunc = (struct weaponfunc_shoot *) func; + struct funcdef_shoot *shootfunc = (struct funcdef_shoot *) func; spread = shootfunc->spread; } @@ -5142,7 +5142,7 @@ void bgun_calculate_bot_shot_spread(struct coord *arg0, s32 weaponnum, s32 funcn { f32 spread = 0.0f; f32 radius; - struct weapon *weapondef = gset_get_weapondef(weaponnum); + struct weapondef *weapondef = gset_get_weapondef(weaponnum); f32 x; f32 y; Mtxf mtx; @@ -5150,10 +5150,10 @@ void bgun_calculate_bot_shot_spread(struct coord *arg0, s32 weaponnum, s32 funcn u32 stack; if (weapondef) { - struct weaponfunc *funcdef = weapondef->functions[funcnum]; + struct funcdef *funcdef = weapondef->functions[funcnum]; if (funcdef && (funcdef->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *shootfunc = (struct weaponfunc_shoot *)funcdef; + struct funcdef_shoot *shootfunc = (struct funcdef_shoot *)funcdef; spread = shootfunc->spread; } } @@ -5558,7 +5558,7 @@ bool bgun_has_ammo_for_weapon(s32 weaponnum) { bool ammodefexists = false; bool hasammo = false; - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); s32 i; if (weapon == NULL) { @@ -5566,10 +5566,10 @@ bool bgun_has_ammo_for_weapon(s32 weaponnum) } for (i = 0; i < 2; i++) { - struct weaponfunc *func = gset_get_funcdef_by_weaponnum_funcnum(weaponnum, i); + struct funcdef *func = gset_get_funcdef_by_weaponnum_funcnum(weaponnum, i); if (func && func->ammoindex >= 0) { - struct inventory_ammo *ammo = weapon->ammos[func->ammoindex]; + struct ammodef *ammo = weapon->ammos[func->ammoindex]; if (ammo) { ammodefexists = true; @@ -5668,8 +5668,8 @@ u8 g_AutoSwitchWeaponsSecondary[] = { void bgun_auto_switch_weapon(void) { s32 i; - struct weapon *weapon; - struct weaponfunc *func; + struct weapondef *weapon; + struct funcdef *func; s32 weaponnum; s32 newweaponnum = -1; s32 firstweaponnum = -1; @@ -5813,7 +5813,7 @@ s32 bgun_get_attack_type(s32 handnum) char *bgun_get_name(s32 weaponnum) { - struct weapon *weapon = g_Weapons[weaponnum]; + struct weapondef *weapon = g_Weapons[weaponnum]; if (weapon) { return lang_get(weapon->name); @@ -5824,7 +5824,7 @@ char *bgun_get_name(s32 weaponnum) u16 bgun_get_name_id(s32 weaponnum) { - struct weapon *weapon = g_Weapons[weaponnum]; + struct weapondef *weapon = g_Weapons[weaponnum]; if (weapon) { return weapon->name; @@ -5835,7 +5835,7 @@ u16 bgun_get_name_id(s32 weaponnum) char *bgun_get_short_name(s32 weaponnum) { - struct weapon *weapon = g_Weapons[weaponnum]; + struct weapondef *weapon = g_Weapons[weaponnum]; if (weapon) { return lang_get(weapon->shortname); @@ -5878,11 +5878,11 @@ void bgun_start_slide(s32 handnum) void bgun_update_slide(s32 handnum) { f32 slidemax = 0.0f; - struct weaponfunc *funcdef = gset_get_current_funcdef(handnum); + struct funcdef *funcdef = gset_get_current_funcdef(handnum); struct player *player = g_Vars.currentplayer; if (funcdef && ((funcdef->type & 0xff) == INVENTORYFUNCTYPE_SHOOT)) { - struct weaponfunc_shoot *shootfunc = (struct weaponfunc_shoot *)funcdef; + struct funcdef_shoot *shootfunc = (struct funcdef_shoot *)funcdef; slidemax = shootfunc->slidemax; } @@ -6000,7 +6000,7 @@ void bgun0f0a256c(s32 mtxindex, Mtxf *mtx) bool bgun_allows_fullscreen_autoaim(void) { struct hand *hand; - struct weaponfunc *func; + struct funcdef *func; // Right hand hand = &g_Vars.currentplayer->hands[HAND_RIGHT]; @@ -6045,7 +6045,7 @@ bool bgun_allows_fullscreen_autoaim(void) bool bgun_allows_fullscreen_autoaim2(void) { struct hand *hand; - struct weaponfunc *func; + struct funcdef *func; hand = &g_Vars.currentplayer->hands[HAND_RIGHT]; func = gset_get_funcdef_by_gset2(&hand->gset); @@ -6160,7 +6160,7 @@ void bgun_disarm(struct prop *attackerprop) // Or drop it at player's feet with the pin pulled maybe... if (weaponnum == WEAPON_GRENADE || weaponnum == WEAPON_NBOMB) { for (i = 0; i < 2; i++) { - struct weaponfunc *func = gset_get_funcdef_by_gset(&player->hands[i].gset); + struct funcdef *func = gset_get_funcdef_by_gset(&player->hands[i].gset); if ((func->type & 0xff) == INVENTORYFUNCTYPE_THROW && player->hands[i].state == HANDSTATE_ATTACK @@ -6417,7 +6417,7 @@ void bgun_start_detonate_animation(s32 playernum) * rotation (reloading and equip/unequip do not). It also implements a delay on * reverting to the normal rotation. */ -void bgun_update_gangsta(struct hand *hand, s32 handnum, struct coord *arg2, struct weaponfunc *funcdef, Mtxf *arg4, Mtxf *arg5) +void bgun_update_gangsta(struct hand *hand, s32 handnum, struct coord *arg2, struct funcdef *funcdef, Mtxf *arg4, Mtxf *arg5) { f32 tmp; struct coord sp38 = {0, 0, 0}; @@ -6513,7 +6513,7 @@ void bgun_update_gangsta(struct hand *hand, s32 handnum, struct coord *arg2, str * forcecreatesmoke controls whether smoke should be created while the gun is * still firing. */ -void bgun_update_smoke(struct hand *hand, s32 handnum, s32 weaponnum, struct weaponfunc *funcdef) +void bgun_update_smoke(struct hand *hand, s32 handnum, s32 weaponnum, struct funcdef *funcdef) { if (hand->firing) { if (weaponnum == WEAPON_DY357MAGNUM || weaponnum == WEAPON_DY357LX) { @@ -6991,7 +6991,7 @@ void bgun_eject_magnum_casings(struct hand *hand, s32 handnum, struct modeldef * /** * Create and/or update the rocket prop that sits inside the rocket launcher. */ -void bgun_update_rocket_launcher(struct hand *hand, s32 handnum, struct weaponfunc_shootprojectile *func) +void bgun_update_rocket_launcher(struct hand *hand, s32 handnum, struct funcdef_shootprojectile *func) { if (hand->rocket == NULL && hand->loadedammo[0] > 0) { bgun_create_held_rocket(handnum, func); @@ -7136,8 +7136,8 @@ void bgun_tick_eject(struct hand *hand, struct modeldef *modeldef, bool isdetona } } -void bgun0f0a4e44(struct hand *hand, struct weapon *weapondef, struct modeldef *modeldef, - struct weaponfunc *funcdef, s32 maxburst, u8 *allocation, s32 weaponnum, +void bgun0f0a4e44(struct hand *hand, struct weapondef *weapondef, struct modeldef *modeldef, + struct funcdef *funcdef, s32 maxburst, u8 *allocation, s32 weaponnum, bool **arg7, s32 mtxindex, Mtxf *arg9, Mtxf *arg10) { Mtxf spd8; @@ -7228,7 +7228,7 @@ void bgun0f0a4e44(struct hand *hand, struct weapon *weapondef, struct modeldef * * Create casing and beam for a fired weapon, * and uncloak if the weapon is a throwable or fired projectile. */ -void bgun_create_fx(struct hand *hand, s32 handnum, struct weaponfunc *funcdef, s32 weaponnum, struct modeldef *modeldef, u8 *allocation) +void bgun_create_fx(struct hand *hand, s32 handnum, struct funcdef *funcdef, s32 weaponnum, struct modeldef *modeldef, u8 *allocation) { f32 ground; bool createbeam = true; @@ -7345,11 +7345,11 @@ void bgun0f0a5550(s32 handnum) struct modelnode *node; struct player *player = g_Vars.currentplayer; struct hand *hand = player->hands + handnum; - struct weaponfunc *funcdef; - struct weaponfunc_shoot *shootfunc = NULL; + struct funcdef *funcdef; + struct funcdef_shoot *shootfunc = NULL; s32 i; s32 weaponnum = bgun_get_weapon_num2(handnum); - struct weapon *weapondef; + struct weapondef *weapondef; Mtxf *mtx; bool isdetonator = false; f32 fspare1; @@ -7369,7 +7369,7 @@ void bgun0f0a5550(s32 handnum) funcdef = gset_get_funcdef_by_gset2(&hand->gset); if (funcdef && (funcdef->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - shootfunc = (struct weaponfunc_shoot *)funcdef; + shootfunc = (struct funcdef_shoot *)funcdef; } bgun_update_blend(hand, handnum); @@ -7845,7 +7845,7 @@ void bgun0f0a5550(s32 handnum) switch (weaponnum) { case WEAPON_ROCKETLAUNCHER: - bgun_update_rocket_launcher(hand, handnum, (struct weaponfunc_shootprojectile *)funcdef); + bgun_update_rocket_launcher(hand, handnum, (struct funcdef_shootprojectile *)funcdef); break; case WEAPON_DY357MAGNUM: case WEAPON_DY357LX: @@ -9099,7 +9099,7 @@ void bgun_tick_gameplay(bool triggeron) // Remove throwable items from inventory if there's no more left for (i = 0; i < inv_get_count(); i++) { - struct weapon *weapon; + struct weapondef *weapon; s32 weaponnum = inv_get_weapon_num_by_index(i); s32 equippedweaponnum; @@ -9192,7 +9192,7 @@ void bgun_tick_gameplay(bool triggeron) if (cheat_is_active(CHEAT_UNLIMITEDAMMONORELOADS)) { s32 i; - struct weapon *weapon; + struct weapondef *weapon; struct hand *lhand = &g_Vars.currentplayer->hands[HAND_LEFT]; struct hand *rhand = &g_Vars.currentplayer->hands[HAND_RIGHT]; @@ -9483,7 +9483,7 @@ void bgun_give_max_ammo(bool force) u32 bgun_get_ammo_type_for_weapon(u32 weaponnum, u32 func) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); if (!weapon) { return 0; @@ -9498,10 +9498,10 @@ u32 bgun_get_ammo_type_for_weapon(u32 weaponnum, u32 func) s32 bgun_get_ammo_qty_for_weapon(u32 weaponnum, u32 func) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); if (weapon) { - struct inventory_ammo *ammo = weapon->ammos[func]; + struct ammodef *ammo = weapon->ammos[func]; if (ammo) { return bgun_get_reserved_ammo_count(ammo->type); @@ -9513,10 +9513,10 @@ s32 bgun_get_ammo_qty_for_weapon(u32 weaponnum, u32 func) void bgun_set_ammo_qty_for_weapon(u32 weaponnum, u32 func, u32 quantity) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); if (weapon) { - struct inventory_ammo *ammo = weapon->ammos[func]; + struct ammodef *ammo = weapon->ammos[func]; if (ammo) { bgun_set_ammo_quantity(ammo->type, quantity); @@ -9526,8 +9526,8 @@ void bgun_set_ammo_qty_for_weapon(u32 weaponnum, u32 func, u32 quantity) s32 bgun_get_ammo_capacity_for_weapon(s32 weaponnum, s32 func) { - struct weapon *weapon = gset_get_weapondef(weaponnum); - struct inventory_ammo *ammo = weapon->ammos[func]; + struct weapondef *weapon = gset_get_weapondef(weaponnum); + struct ammodef *ammo = weapon->ammos[func]; if (ammo) { return g_AmmoTypes[ammo->type].capacity; @@ -9938,7 +9938,7 @@ Gfx *bgun_draw_hud(Gfx *gdl) s32 reserveheight = 36; s32 clipheight = 57; s32 xpos; - struct weapon *weapon = gset_get_weapondef(player->gunctrl.weaponnum); + struct weapondef *weapon = gset_get_weapondef(player->gunctrl.weaponnum); u32 alpha; u32 fncolour; s32 funcnum; @@ -9954,7 +9954,7 @@ Gfx *bgun_draw_hud(Gfx *gdl) s32 y; s32 textheight; s32 textwidth; - struct weaponfunc *func; + struct funcdef *func; u16 nameid; struct hand *lefthand = &player->hands[HAND_LEFT]; @@ -10191,12 +10191,12 @@ Gfx *bgun_draw_hud(Gfx *gdl) } if (weapon && weapon->functions[hand->gset.weaponfunc] != NULL) { - ammoindex = ((struct weaponfunc *)(weapon->functions[hand->gset.weaponfunc]))->ammoindex; + ammoindex = ((struct funcdef *)(weapon->functions[hand->gset.weaponfunc]))->ammoindex; } if (ammoindex == -1) { if (weapon->functions[1 - hand->gset.weaponfunc] != NULL) { - ammoindex = ((struct weaponfunc *)(weapon->functions[1 - hand->gset.weaponfunc]))->ammoindex; + ammoindex = ((struct funcdef *)(weapon->functions[1 - hand->gset.weaponfunc]))->ammoindex; } if (ammoindex == -1) { @@ -10419,7 +10419,7 @@ void bgun0f0abd30(s32 handnum) struct player *player = g_Vars.currentplayer; struct hand *hand = &player->hands[handnum]; struct gunctrl *gunctrl = &player->gunctrl; - struct weapon *weapon = gset_get_weapondef(hand->gset.weaponnum); + struct weapondef *weapon = gset_get_weapondef(hand->gset.weaponnum); s32 i; for (i = 0; i < 2; i++) { diff --git a/src/game/bondmove.c b/src/game/bondmove.c index cea3c2a2b..d5b799be3 100644 --- a/src/game/bondmove.c +++ b/src/game/bondmove.c @@ -74,7 +74,7 @@ bool bmove_is_autoaim_y_enabled(void) bool bmove_is_autoaim_y_enabled_for_current_weapon(void) { - struct weaponfunc *func = gset_get_current_funcdef(0); + struct funcdef *func = gset_get_current_funcdef(0); if (func) { if (func->flags & FUNCFLAG_NOAUTOAIM) { @@ -132,7 +132,7 @@ bool bmove_is_autoaim_x_enabled(void) bool bmove_is_autoaim_x_enabled_for_current_weapon(void) { - struct weaponfunc *func = gset_get_current_funcdef(0); + struct funcdef *func = gset_get_current_funcdef(0); if (func) { if (func->flags & FUNCFLAG_NOAUTOAIM) { diff --git a/src/game/bot.c b/src/game/bot.c index 9cbc46830..cddd454c3 100644 --- a/src/game/bot.c +++ b/src/game/bot.c @@ -422,7 +422,7 @@ u32 bot_pickup_prop(struct prop *prop, struct chrdata *chr) } if (itemtype) { - struct weapon *weapondef = gset_get_weapondef(weapon->weaponnum); + struct weapondef *weapondef = gset_get_weapondef(weapon->weaponnum); s32 originalpad = botinv_get_weapon_pad(chr, weapon->weaponnum); s32 currentpad = obj->pad; @@ -472,7 +472,7 @@ bool bot_test_prop_for_pickup(struct prop *prop, struct chrdata *chr) struct weaponobj *weaponobj; s32 itemtype; - struct weapon *weapon; + struct weapondef *weapon; bool singleonly; s32 i; @@ -3530,7 +3530,7 @@ void bot_tick_unpaused(struct chrdata *chr) } if (throw) { - struct weaponfunc *func; + struct funcdef *func; chr_uncloak_temporarily(chr); botact_try_remove_ammo_from_reserve(aibot, aibot->weaponnum, aibot->gunfunc, 1); @@ -3617,7 +3617,7 @@ void bot_tick_unpaused(struct chrdata *chr) } if (weapon_get_num_ticks_per_shot(aibot->weaponnum, aibot->gunfunc) <= 0 && firing) { - struct weaponfunc *func; + struct funcdef *func; aibot->nextbullettimer60[i] = botact_get_shoot_interval60(aibot->weaponnum, aibot->gunfunc); #if PAL diff --git a/src/game/botact.c b/src/game/botact.c index 945552c37..44f87decd 100644 --- a/src/game/botact.c +++ b/src/game/botact.c @@ -22,7 +22,7 @@ s32 botact_get_ammo_type_by_function(s32 weaponnum, s32 funcnum) { if (weaponnum >= WEAPON_FALCON2 && weaponnum <= WEAPON_SUICIDEPILL) { - struct inventory_ammo *ammo = gset_get_ammodef(weaponnum, funcnum); + struct ammodef *ammo = gset_get_ammodef(weaponnum, funcnum); if (ammo) { return ammo->type; @@ -35,7 +35,7 @@ s32 botact_get_ammo_type_by_function(s32 weaponnum, s32 funcnum) s32 botact_get_clip_capacity_by_function(s32 weaponnum, u32 funcnum) { if (weaponnum >= WEAPON_FALCON2 && weaponnum <= WEAPON_SUICIDEPILL) { - struct inventory_ammo *ammo = gset_get_ammodef(weaponnum, funcnum); + struct ammodef *ammo = gset_get_ammodef(weaponnum, funcnum); if (ammo) { return ammo->clipsize; @@ -407,20 +407,20 @@ s32 botact_get_shoot_interval60(s32 weaponnum, s32 funcnum) { s32 stack[2]; s32 result = 1; - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); if (weapon) { - struct weaponfunc *func = weapon->functions[funcnum]; + struct funcdef *func = weapon->functions[funcnum]; if (func) { if (func->type == INVENTORYFUNCTYPE_SHOOT_SINGLE) { - struct weaponfunc_shoot *func2 = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *func2 = (struct funcdef_shoot *)func; result = func2->unk24 + func2->unk25; } else if (func->type == INVENTORYFUNCTYPE_SHOOT_AUTOMATIC) { - struct weaponfunc_shoot *func2 = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *func2 = (struct funcdef_shoot *)func; result = func2->unk24 + func2->unk25; } else if (func->type == INVENTORYFUNCTYPE_SHOOT_PROJECTILE) { - struct weaponfunc_shoot *func2 = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *func2 = (struct funcdef_shoot *)func; result = func2->unk24 + func2->unk25; } else if (func->type == INVENTORYFUNCTYPE_MELEE && weaponnum != WEAPON_REAPER) { result = 60; diff --git a/src/game/botinv.c b/src/game/botinv.c index 4c085da10..7700a194f 100644 --- a/src/game/botinv.c +++ b/src/game/botinv.c @@ -1019,7 +1019,7 @@ void botinv_tick(struct chrdata *chr) bool botinv_switch_to_weapon(struct chrdata *chr, s32 weaponnum, s32 funcnum) { struct invitem *item; - struct weaponfunc *func; + struct funcdef *func; struct aibot *aibot; s32 i; s32 modelnum; diff --git a/src/game/chr.c b/src/game/chr.c index de69b8d40..e62a80769 100644 --- a/src/game/chr.c +++ b/src/game/chr.c @@ -4606,7 +4606,7 @@ void chr_hit(struct shotdata *shotdata, struct hit *hit) struct coord sp98; s16 hitpos_s16[3]; u8 ismelee = false; - struct weaponfunc *func = gset_get_funcdef_by_gset(&shotdata->gset); + struct funcdef *func = gset_get_funcdef_by_gset(&shotdata->gset); f32 shield; if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_MELEE) { diff --git a/src/game/chraction.c b/src/game/chraction.c index 04cbc96ad..d397ff161 100644 --- a/src/game/chraction.c +++ b/src/game/chraction.c @@ -4270,7 +4270,7 @@ void chr_damage(struct chrdata *chr, f32 damage, struct coord *vector, struct gs f32 armourscale = 1; bool isshoot = true; bool forceapplydamage = false; - struct weaponfunc *func; + struct funcdef *func; f32 amount; bool canchoke = true; s32 aplayernum = -1; @@ -6974,7 +6974,7 @@ bool chr_try_attack_amount(struct chrdata *chr, u32 arg1, u32 arg2, u8 lower, u8 s32 quantity; f32 percentage; struct weaponobj *weapon = chr->weapons_held[0]->weapon; - struct inventory_ammo *ammo; + struct ammodef *ammo; quantity = 1; @@ -10094,8 +10094,8 @@ void chr_tick_shoot(struct chrdata *chr, s32 handnum) struct coord sp15c; Mtxf projectilemtx; Mtxf yrotmtx; - struct weapon *weapondef = gset_get_weapondef(gset.weaponnum); - struct weaponfunc_shootprojectile *func = weapondef->functions[gset.weaponfunc]; + struct weapondef *weapondef = gset_get_weapondef(gset.weaponnum); + struct funcdef_shootprojectile *func = weapondef->functions[gset.weaponfunc]; // Handle creating the projectile if (gset.weaponnum == WEAPON_ROCKETLAUNCHER diff --git a/src/game/gset.c b/src/game/gset.c index 041646427..5dc9543a9 100644 --- a/src/game/gset.c +++ b/src/game/gset.c @@ -16,7 +16,7 @@ #include "data.h" #include "types.h" -struct weapon *gset_get_weapondef(s32 itemid) +struct weapondef *gset_get_weapondef(s32 itemid) { if (itemid < 0) { return NULL; @@ -29,9 +29,9 @@ struct weapon *gset_get_weapondef(s32 itemid) return g_Weapons[itemid]; } -struct weaponfunc *gset_get_funcdef_by_weaponnum_funcnum(u32 weaponnum, u32 which) +struct funcdef *gset_get_funcdef_by_weaponnum_funcnum(u32 weaponnum, u32 which) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); if (weapon) { return weapon->functions[which]; @@ -40,9 +40,9 @@ struct weaponfunc *gset_get_funcdef_by_weaponnum_funcnum(u32 weaponnum, u32 whic return NULL; } -struct weaponfunc *gset_get_funcdef_by_gset2(struct gset *gset) +struct funcdef *gset_get_funcdef_by_gset2(struct gset *gset) { - struct weapon *weapon = gset_get_weapondef(gset->weaponnum); + struct weapondef *weapon = gset_get_weapondef(gset->weaponnum); if (weapon) { return weapon->functions[gset->weaponfunc]; @@ -51,9 +51,9 @@ struct weaponfunc *gset_get_funcdef_by_gset2(struct gset *gset) return NULL; } -struct weaponfunc *gset_get_funcdef_by_gset(struct gset *gset) +struct funcdef *gset_get_funcdef_by_gset(struct gset *gset) { - struct weapon *weapon = g_Weapons[gset->weaponnum]; + struct weapondef *weapon = g_Weapons[gset->weaponnum]; if (weapon) { return weapon->functions[gset->weaponfunc]; @@ -62,9 +62,9 @@ struct weaponfunc *gset_get_funcdef_by_gset(struct gset *gset) return NULL; } -struct weaponfunc *gset_get_funcdef_by_gset_funcnum(struct gset *gset, s32 which) +struct funcdef *gset_get_funcdef_by_gset_funcnum(struct gset *gset, s32 which) { - struct weapon *weapon = g_Weapons[gset->weaponnum]; + struct weapondef *weapon = g_Weapons[gset->weaponnum]; if (weapon) { return weapon->functions[which]; @@ -73,9 +73,9 @@ struct weaponfunc *gset_get_funcdef_by_gset_funcnum(struct gset *gset, s32 which return NULL; } -struct weaponfunc *gset_get_current_funcdef(u32 hand) +struct funcdef *gset_get_current_funcdef(u32 hand) { - struct weapon *weapon = gset_get_weapondef(g_Vars.currentplayer->hands[hand].gset.weaponnum); + struct weapondef *weapon = gset_get_weapondef(g_Vars.currentplayer->hands[hand].gset.weaponnum); if (weapon) { return weapon->functions[g_Vars.currentplayer->hands[hand].gset.weaponfunc]; @@ -86,7 +86,7 @@ struct weaponfunc *gset_get_current_funcdef(u32 hand) u32 gset_get_num_functions(u32 weaponnum) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); s32 i; if (!weapon) { @@ -104,7 +104,7 @@ u32 gset_get_num_functions(u32 weaponnum) struct invaimsettings *gset_get_aim_settings(struct gset *gset) { - struct weapon *weapon = gset_get_weapondef(gset->weaponnum); + struct weapondef *weapon = gset_get_weapondef(gset->weaponnum); if (weapon) { return weapon->aimsettings; @@ -113,10 +113,10 @@ struct invaimsettings *gset_get_aim_settings(struct gset *gset) return &invaimsettings_default; } -struct inventory_ammo *gset_get_ammodef(u32 weaponnum, u32 funcnum) +struct ammodef *gset_get_ammodef(u32 weaponnum, u32 funcnum) { - struct weapon *weapon = gset_get_weapondef(weaponnum); - struct weaponfunc *func = gset_get_funcdef_by_weaponnum_funcnum(weaponnum, funcnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); + struct funcdef *func = gset_get_funcdef_by_weaponnum_funcnum(weaponnum, funcnum); if (func && weapon && func->ammoindex >= 0) { return weapon->ammos[func->ammoindex]; @@ -127,7 +127,7 @@ struct inventory_ammo *gset_get_ammodef(u32 weaponnum, u32 funcnum) void gset_get_weapon_pos(struct coord *pos) { - struct weapon *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); + struct weapondef *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); if (weapon) { pos->x = weapon->posx; @@ -138,7 +138,7 @@ void gset_get_weapon_pos(struct coord *pos) void gset_set_weapon_pos(struct coord *pos) { - struct weapon *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); + struct weapondef *weapon = gset_get_weapondef(bgun_get_weapon_num(HAND_RIGHT)); if (weapon) { weapon->posx = pos->x; @@ -155,7 +155,7 @@ f32 gset_get_xshift(s32 handnum) f32 gset_get_xpos(s32 hand) { f32 x; - struct weapon *weapon; + struct weapondef *weapon; if (hand == 0) { weapon = gset_get_weapondef(bgun_get_weapon_num2(0)); @@ -187,7 +187,7 @@ f32 gset_get_xpos(s32 hand) f32 gset_get_gun_zoom_fov(void) { s32 index = -1; - struct weapon *weapon; + struct weapondef *weapon; switch (bgun_get_weapon_num2(0)) { case WEAPON_SNIPERRIFLE: @@ -279,7 +279,7 @@ void gset_zoom_in(f32 fovpersec) bool gset_has_weapon_flag(s32 itemid, u32 flag) { - struct weapon *weapon = gset_get_weapondef(itemid); + struct weapondef *weapon = gset_get_weapondef(itemid); if (!weapon) { return false; @@ -290,7 +290,7 @@ bool gset_has_weapon_flag(s32 itemid, u32 flag) bool gset_has_aim_flag(s32 weaponnum, u32 flag) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); if (!weapon) { return false; @@ -301,8 +301,8 @@ bool gset_has_aim_flag(s32 weaponnum, u32 flag) bool gset_has_ammo_flag(s32 weaponnum, s32 funcnum, u32 flag) { - struct weapon *weapon = gset_get_weapondef(weaponnum); - struct inventory_ammo *ammo; + struct weapondef *weapon = gset_get_weapondef(weaponnum); + struct ammodef *ammo; if (weapon == NULL) { return false; @@ -329,7 +329,7 @@ void gset_stub2(s32 arg0) s32 gset_get_device_state(s32 weaponnum) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); s32 i; if (!weapon) { @@ -338,7 +338,7 @@ s32 gset_get_device_state(s32 weaponnum) for (i = 0; i < ARRAYCOUNT(weapon->functions); i++) { if (weapon->functions[i]) { - struct weaponfunc_device *devicefunc = weapon->functions[i]; + struct funcdef_device *devicefunc = weapon->functions[i]; if ((devicefunc->base.type & 0xff) == INVENTORYFUNCTYPE_DEVICE) { if ((g_Vars.currentplayer->devicesactive & devicefunc->device) == 0) { @@ -355,7 +355,7 @@ s32 gset_get_device_state(s32 weaponnum) void gset_set_device_active(s32 weaponnum, bool active) { - struct weapon *weapon = gset_get_weapondef(weaponnum); + struct weapondef *weapon = gset_get_weapondef(weaponnum); s32 i; if (!weapon) { @@ -364,7 +364,7 @@ void gset_set_device_active(s32 weaponnum, bool active) for (i = 0; i < ARRAYCOUNT(weapon->functions); i++) { if (weapon->functions[i]) { - struct weaponfunc_device *devicefunc = weapon->functions[i]; + struct funcdef_device *devicefunc = weapon->functions[i]; if ((devicefunc->base.type & 0xff) == INVENTORYFUNCTYPE_DEVICE) { if (active) { @@ -385,7 +385,7 @@ void gset_set_device_active(s32 weaponnum, bool active) u16 gset_get_filenum(s32 weaponnum) { - struct weapon *weapon = NULL; + struct weapondef *weapon = NULL; if (weaponnum != -1) { weapon = g_Weapons[weaponnum]; @@ -423,10 +423,10 @@ void gset_populate(s32 handnum, struct gset *gset) } } -struct inventory_ammo *gset_get_current_ammodef(struct gset *gset) +struct ammodef *gset_get_current_ammodef(struct gset *gset) { - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); - struct weapon *weapon = gset_get_weapondef(gset->weaponnum); + struct funcdef *func = gset_get_funcdef_by_gset(gset); + struct weapondef *weapon = gset_get_weapondef(gset->weaponnum); if (func && func->ammoindex >= 0) { return weapon->ammos[func->ammoindex]; @@ -437,10 +437,10 @@ struct inventory_ammo *gset_get_current_ammodef(struct gset *gset) u8 gset_get_single_penetration(struct gset *gset) { - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *funcshoot = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *funcshoot = (struct funcdef_shoot *)func; return funcshoot->penetration; } @@ -450,7 +450,7 @@ u8 gset_get_single_penetration(struct gset *gset) s32 gset_get_casing_type(struct gset *gset) { s32 result = 0; - struct inventory_ammo *ammo = gset_get_current_ammodef(gset); + struct ammodef *ammo = gset_get_current_ammodef(gset); if (ammo) { result = ammo->casingeject; @@ -461,11 +461,11 @@ s32 gset_get_casing_type(struct gset *gset) f32 gset_get_impact_force(struct gset *gset) { - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); f32 result = 0; if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *funcshoot = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *funcshoot = (struct funcdef_shoot *)func; result = funcshoot->impactforce; } @@ -474,17 +474,17 @@ f32 gset_get_impact_force(struct gset *gset) f32 gset_get_damage(struct gset *gset) { - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); f32 damage = 0; if (func) { if ((func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *shootfunc = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *shootfunc = (struct funcdef_shoot *)func; damage = shootfunc->damage; } if ((func->type & 0xff) == INVENTORYFUNCTYPE_MELEE) { - struct weaponfunc_melee *meleefunc = (struct weaponfunc_melee *)func; + struct funcdef_melee *meleefunc = (struct funcdef_melee *)func; damage = meleefunc->damage; if (gset->weaponnum == WEAPON_REAPER) { @@ -493,7 +493,7 @@ f32 gset_get_damage(struct gset *gset) } if ((func->type & 0xff) == INVENTORYFUNCTYPE_THROW) { - struct weaponfunc_throw *throwfunc = (struct weaponfunc_throw *)func; + struct funcdef_throw *throwfunc = (struct funcdef_throw *)func; damage = throwfunc->damage; } } @@ -512,11 +512,11 @@ f32 gset_get_damage(struct gset *gset) u8 gset_get_fireslot_duration(struct gset *gset) { #if VERSION >= VERSION_PAL_FINAL - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); u8 result = 0; if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *funcshoot = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *funcshoot = (struct funcdef_shoot *)func; result = funcshoot->duration60; } @@ -526,10 +526,10 @@ u8 gset_get_fireslot_duration(struct gset *gset) return result; #else - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *funcshoot = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *funcshoot = (struct funcdef_shoot *)func; return funcshoot->duration60; } @@ -539,10 +539,10 @@ u8 gset_get_fireslot_duration(struct gset *gset) u16 gset_get_single_shoot_sound(struct gset *gset) { - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - struct weaponfunc_shoot *funcshoot = (struct weaponfunc_shoot *)func; + struct funcdef_shoot *funcshoot = (struct funcdef_shoot *)func; return funcshoot->shootsound; } @@ -551,7 +551,7 @@ u16 gset_get_single_shoot_sound(struct gset *gset) bool gset_has_function_flags(struct gset *gset, u32 flags) { - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); if (func) { return (func->flags & flags) == flags; @@ -564,11 +564,11 @@ s8 weapon_get_num_ticks_per_shot(u32 weaponnum, u32 funcindex) { u32 stack[2]; s32 result = 0; - struct weapon *weapon = gset_get_weapondef(weaponnum); - struct weaponfunc *func = weapon->functions[funcindex]; + struct weapondef *weapon = gset_get_weapondef(weaponnum); + struct funcdef *func = weapon->functions[funcindex]; if (func && func->type == INVENTORYFUNCTYPE_SHOOT_AUTOMATIC) { - struct weaponfunc_shootauto *autofunc = (struct weaponfunc_shootauto *)func; + struct funcdef_shootauto *autofunc = (struct funcdef_shootauto *)func; result = 3600.0f / autofunc->maxrpm; } @@ -585,7 +585,7 @@ s8 weapon_get_num_ticks_per_shot(u32 weaponnum, u32 funcindex) u32 gset_get_sight(void) { - struct weaponfunc *func = gset_get_funcdef_by_weaponnum_funcnum( + struct funcdef *func = gset_get_funcdef_by_weaponnum_funcnum( g_Vars.currentplayer->hands[HAND_RIGHT].gset.weaponnum, g_Vars.currentplayer->hands[HAND_RIGHT].gset.weaponfunc); @@ -657,7 +657,7 @@ u32 gset_get_sight(void) void gset_get_noise_settings(struct gset *gset, struct noisesettings *dst) { struct noisesettings *settings = NULL; - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); if (func != NULL) { settings = func->noisesettings; @@ -676,7 +676,7 @@ void gset_get_noise_settings(struct gset *gset, struct noisesettings *dst) struct guncmd *gset_get_equip_anim(struct gset *gset) { - struct weapon *weapon = g_Weapons[gset->weaponnum]; + struct weapondef *weapon = g_Weapons[gset->weaponnum]; if (weapon) { return weapon->equip_animation; @@ -687,7 +687,7 @@ struct guncmd *gset_get_equip_anim(struct gset *gset) struct guncmd *gset_get_unequip_anim(struct gset *gset) { - struct weapon *weapon = g_Weapons[gset->weaponnum]; + struct weapondef *weapon = g_Weapons[gset->weaponnum]; if (weapon) { return weapon->unequip_animation; @@ -698,7 +698,7 @@ struct guncmd *gset_get_unequip_anim(struct gset *gset) struct guncmd *gset_get_pritosec_anim(struct gset *gset) { - struct weapon *weapon = g_Weapons[gset->weaponnum]; + struct weapondef *weapon = g_Weapons[gset->weaponnum]; if (weapon) { return weapon->pritosec_animation; @@ -709,7 +709,7 @@ struct guncmd *gset_get_pritosec_anim(struct gset *gset) struct guncmd *gset_get_sectopri_anim(struct gset *gset) { - struct weapon *weapon = g_Weapons[gset->weaponnum]; + struct weapondef *weapon = g_Weapons[gset->weaponnum]; if (weapon) { return weapon->sectopri_animation; diff --git a/src/game/gunfx.c b/src/game/gunfx.c index d99623f6d..ab29d27f4 100644 --- a/src/game/gunfx.c +++ b/src/game/gunfx.c @@ -670,13 +670,13 @@ void casing_create_for_hand(s32 handnum, f32 ground, Mtxf *mtx) f32 spc8[3][3]; s32 weaponnum = bgun_get_weapon_num(handnum); s32 casingtype = -1; - struct weaponfunc *func = gset_get_funcdef_by_gset2(&player->hands[handnum].gset); - struct weapon *weapondef = gset_get_weapondef(player->gunctrl.weaponnum); - struct weaponfunc_shoot *shootfunc = NULL; + struct funcdef *func = gset_get_funcdef_by_gset2(&player->hands[handnum].gset); + struct weapondef *weapondef = gset_get_weapondef(player->gunctrl.weaponnum); + struct funcdef_shoot *shootfunc = NULL; struct modeldef *modeldef; if ((func->type & 0xff) == INVENTORYFUNCTYPE_SHOOT) { - shootfunc = (struct weaponfunc_shoot *)func; + shootfunc = (struct funcdef_shoot *)func; } if (func->ammoindex < 0) { diff --git a/src/game/invitems.c b/src/game/invitems.c index 855b91f58..32df88fe5 100644 --- a/src/game/invitems.c +++ b/src/game/invitems.c @@ -147,7 +147,7 @@ struct invaimsettings invaimsettings_heavy = { INVAIMFLAG_AUTOAIM | INVAIMFLAG_ACCURATESINGLESHOT, // flags }; -struct weaponfunc_shootsingle invfunc_00011160 = { +struct funcdef_shootsingle invfunc_00011160 = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -169,7 +169,7 @@ struct weaponfunc_shootsingle invfunc_00011160 = { 1, // penetration }; -struct inventory_ammo invammo_default = { +struct ammodef invammo_default = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size @@ -177,7 +177,7 @@ struct inventory_ammo invammo_default = { 0, // flags }; -struct weapon invitem_hammer = { +struct weapondef invitem_hammer = { 0, // hi model 0, // lo model NULL, // equip animation @@ -203,7 +203,7 @@ struct weapon invitem_hammer = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_DUALWIELD, }; -struct weapon invitem_nothing = { +struct weapondef invitem_nothing = { 0, // hi model 0, // lo model NULL, // equip animation @@ -262,7 +262,7 @@ struct guncmd invanim_punch[] = { gunscript_end }; -struct weaponfunc_melee invfunc_unarmed_punch = { +struct funcdef_melee invfunc_unarmed_punch = { INVENTORYFUNCTYPE_MELEE, L_GUN_100, // name 0, // unused @@ -286,7 +286,7 @@ struct weaponfunc_melee invfunc_unarmed_punch = { 0, // unused }; -struct weaponfunc_melee invfunc_unarmed_disarm = { +struct funcdef_melee invfunc_unarmed_disarm = { INVENTORYFUNCTYPE_MELEE, L_GUN_101, // name 0, // unused @@ -310,7 +310,7 @@ struct weaponfunc_melee invfunc_unarmed_disarm = { 0, // unused }; -struct weapon invitem_unarmed = { +struct weapondef invitem_unarmed = { FILE_GCOMBATHANDSLOD, // hi model FILE_GCOMBATHANDSLOD, // lo model NULL, // equip animation @@ -482,7 +482,7 @@ struct guncmd invanim_falcon2_shoot[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_falcon2_singleshot = { +struct funcdef_shootsingle invfunc_falcon2_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -504,7 +504,7 @@ struct weaponfunc_shootsingle invfunc_falcon2_singleshot = { 1, // penetration }; -struct weaponfunc_shootsingle invfunc_falcon2silenced_singleshot = { +struct funcdef_shootsingle invfunc_falcon2silenced_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -526,7 +526,7 @@ struct weaponfunc_shootsingle invfunc_falcon2silenced_singleshot = { 1, // penetration }; -struct weaponfunc_melee invfunc_falcon2_pistolwhip = { +struct funcdef_melee invfunc_falcon2_pistolwhip = { INVENTORYFUNCTYPE_MELEE, L_GUN_094, // name 0, // unused @@ -550,7 +550,7 @@ struct weaponfunc_melee invfunc_falcon2_pistolwhip = { 0, // unused }; -struct inventory_ammo invammo_falcon2 = { +struct ammodef invammo_falcon2 = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size @@ -558,7 +558,7 @@ struct inventory_ammo invammo_falcon2 = { 0, // flags }; -struct inventory_ammo invammo_falcon2scope = { +struct ammodef invammo_falcon2scope = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size @@ -566,7 +566,7 @@ struct inventory_ammo invammo_falcon2scope = { 0, // flags }; -struct weapon invitem_falcon2 = { +struct weapondef invitem_falcon2 = { FILE_GFALCON2, // hi model FILE_GFALCON2LOD, // lo model invanim_falcon2_equip, // equip animation @@ -595,7 +595,7 @@ struct weapon invitem_falcon2 = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS | WEAPONFLAG_GANGSTA, }; -struct weapon invitem_falcon2scope = { +struct weapondef invitem_falcon2scope = { FILE_GFALCON2, // hi model FILE_GFALCON2LOD, // lo model invanim_falcon2_equip, // equip animation @@ -620,7 +620,7 @@ struct weapon invitem_falcon2scope = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS, }; -struct weapon invitem_falcon2silencer = { +struct weapondef invitem_falcon2silencer = { FILE_GFALCON2, // hi model FILE_GFALCON2LOD, // lo model invanim_falcon2_equip, // equip animation @@ -724,7 +724,7 @@ struct invaimsettings invaimsettings_magsec4 = { INVAIMFLAG_AUTOAIM, }; -struct weaponfunc_shootsingle invfunc_magsec_singleshot = { +struct funcdef_shootsingle invfunc_magsec_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -746,7 +746,7 @@ struct weaponfunc_shootsingle invfunc_magsec_singleshot = { 1, // penetration }; -struct weaponfunc_shootsingle invfunc_magsec_burst = { +struct funcdef_shootsingle invfunc_magsec_burst = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_128, // name 0, // unused @@ -768,7 +768,7 @@ struct weaponfunc_shootsingle invfunc_magsec_burst = { 1, // penetration }; -struct inventory_ammo invammo_magsec = { +struct ammodef invammo_magsec = { AMMOTYPE_PISTOL, CASING_STANDARD, 9, // clip size @@ -776,7 +776,7 @@ struct inventory_ammo invammo_magsec = { 0, // flags }; -struct weapon invitem_magsec = { +struct weapondef invitem_magsec = { FILE_GLEEGUN1, // hi model FILE_GMAGSECLOD, // lo model invanim_magsec_shoot, // equip animation @@ -891,7 +891,7 @@ struct guncmd invanim_dy357_pistolwhip[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_dy357_singleshot = { +struct funcdef_shootsingle invfunc_dy357_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -913,7 +913,7 @@ struct weaponfunc_shootsingle invfunc_dy357_singleshot = { 5, // penetration }; -struct weaponfunc_shootsingle invfunc_dy357lx_singleshot = { +struct funcdef_shootsingle invfunc_dy357lx_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -935,7 +935,7 @@ struct weaponfunc_shootsingle invfunc_dy357lx_singleshot = { 5, // penetration }; -struct weaponfunc_melee invfunc_dy357_pistolwhip = { +struct funcdef_melee invfunc_dy357_pistolwhip = { INVENTORYFUNCTYPE_MELEE, L_GUN_094, // name 0, // unused @@ -959,7 +959,7 @@ struct weaponfunc_melee invfunc_dy357_pistolwhip = { 0, // unused }; -struct inventory_ammo invammo_dy357 = { +struct ammodef invammo_dy357 = { AMMOTYPE_MAGNUM, CASING_STANDARD, 6, // clip size @@ -967,7 +967,7 @@ struct inventory_ammo invammo_dy357 = { 0, // flags }; -struct weapon invitem_dy357 = { +struct weapondef invitem_dy357 = { FILE_GDY357, // hi model FILE_GDY357LOD, // lo model invanim_dy357_shoot, // equip animation @@ -992,7 +992,7 @@ struct weapon invitem_dy357 = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_00004000 | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS, }; -struct weapon invitem_dy357lx = { +struct weapondef invitem_dy357lx = { FILE_GDY357TRENT, // hi model FILE_GDY357TRENTLOD, // lo model invanim_dy357_shoot, // equip animation @@ -1060,7 +1060,7 @@ struct guncmd invanim_phoenix_shoot[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_phoenix_singleshot = { +struct funcdef_shootsingle invfunc_phoenix_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -1082,7 +1082,7 @@ struct weaponfunc_shootsingle invfunc_phoenix_singleshot = { 1, // penetration }; -struct weaponfunc_shootsingle invfunc_phoenix_explosiveshells = { +struct funcdef_shootsingle invfunc_phoenix_explosiveshells = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_095, // name 0, // unused @@ -1104,7 +1104,7 @@ struct weaponfunc_shootsingle invfunc_phoenix_explosiveshells = { 1, // penetration }; -struct inventory_ammo invammo_phoenix = { +struct ammodef invammo_phoenix = { AMMOTYPE_PISTOL, CASING_NONE, 8, // clip size @@ -1112,7 +1112,7 @@ struct inventory_ammo invammo_phoenix = { 0, // flags }; -struct weapon invitem_phoenix = { +struct weapondef invitem_phoenix = { FILE_GMAIANPISTOL, // hi model FILE_GMAYANPISTOLLOD, // lo model invanim_phoenix_equiporreload, // equip animation @@ -1200,7 +1200,7 @@ struct guncmd invanim_unused_8007c0bc[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_mauler_singleshot = { +struct funcdef_shootsingle invfunc_mauler_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -1222,7 +1222,7 @@ struct weaponfunc_shootsingle invfunc_mauler_singleshot = { 1, // penetration }; -struct weaponfunc_shootsingle invfunc_mauler_chargeshot = { +struct funcdef_shootsingle invfunc_mauler_chargeshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_129, // name 0, // unused @@ -1244,7 +1244,7 @@ struct weaponfunc_shootsingle invfunc_mauler_chargeshot = { 1, // penetration }; -struct inventory_ammo invammo_mauler = { +struct ammodef invammo_mauler = { AMMOTYPE_PISTOL, CASING_NONE, 20, // clip size @@ -1252,7 +1252,7 @@ struct inventory_ammo invammo_mauler = { 0, // flags }; -struct weapon invitem_mauler = { +struct weapondef invitem_mauler = { FILE_GSKPISTOL, // hi model FILE_GSKPISTOLLOD, // lo model invanim_mauler_shoot, // equip animation @@ -1355,7 +1355,7 @@ struct invaimsettings invaimsettings_cmp150 = { INVAIMFLAG_AUTOAIM | INVAIMFLAG_ACCURATESINGLESHOT, }; -struct weaponfunc_shootauto invfunc_cmp150_rapidfire = { +struct funcdef_shootauto invfunc_cmp150_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -1383,7 +1383,7 @@ struct weaponfunc_shootauto invfunc_cmp150_rapidfire = { 0, // turretdecel }; -struct weaponfunc_shootauto invfunc_cmp150_followlockon = { +struct funcdef_shootauto invfunc_cmp150_followlockon = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_102, // name 0, // unused @@ -1411,7 +1411,7 @@ struct weaponfunc_shootauto invfunc_cmp150_followlockon = { 0, // turretdecel }; -struct inventory_ammo invammo_cmp150 = { +struct ammodef invammo_cmp150 = { AMMOTYPE_SMG, CASING_STANDARD, 32, // clip size @@ -1419,7 +1419,7 @@ struct inventory_ammo invammo_cmp150 = { 0, // flags }; -struct weapon invitem_cmp150 = { +struct weapondef invitem_cmp150 = { FILE_GCMP150, // hi model FILE_GCMP150LOD, // lo model invanim_cmp150_shoot, // equip animation @@ -1483,7 +1483,7 @@ struct guncmd invanim_cyclone_shoot[] = { gunscript_end }; -struct weaponfunc_shootauto invfunc_cyclone_rapidfire = { +struct funcdef_shootauto invfunc_cyclone_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -1511,7 +1511,7 @@ struct weaponfunc_shootauto invfunc_cyclone_rapidfire = { 0, // turretdecel }; -struct weaponfunc_shootauto invfunc_cyclone_magazinedischarge = { +struct funcdef_shootauto invfunc_cyclone_magazinedischarge = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_097, // name 0, // unused @@ -1539,7 +1539,7 @@ struct weaponfunc_shootauto invfunc_cyclone_magazinedischarge = { 0, // turretdecel }; -struct inventory_ammo invammo_cyclone = { +struct ammodef invammo_cyclone = { AMMOTYPE_SMG, CASING_NONE, 50, // clip size @@ -1547,7 +1547,7 @@ struct inventory_ammo invammo_cyclone = { 0, // flags }; -struct weapon invitem_cyclone = { +struct weapondef invitem_cyclone = { FILE_GCYCLONE, // hi model FILE_GCYCLONELOD, // lo model invanim_cyclone_equiporreload, // equip animation @@ -1603,7 +1603,7 @@ struct gunviscmd gunviscmds_rcp120[] = { gunviscmd_end }; -struct weaponfunc_shootauto invfunc_rcp120_rapidfire = { +struct funcdef_shootauto invfunc_rcp120_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -1631,7 +1631,7 @@ struct weaponfunc_shootauto invfunc_rcp120_rapidfire = { 0, // turretdecel }; -struct weaponfunc_special invfunc_rcp120_cloak = { +struct funcdef_special invfunc_rcp120_cloak = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_116, // name 0, // unused @@ -1644,7 +1644,7 @@ struct weaponfunc_special invfunc_rcp120_cloak = { 0, // soundnum (unused) }; -struct inventory_ammo invammo_rcp120 = { +struct ammodef invammo_rcp120 = { AMMOTYPE_SMG, CASING_STANDARD, 120, // clip size @@ -1652,7 +1652,7 @@ struct inventory_ammo invammo_rcp120 = { 0, // flags }; -struct weapon invitem_rcp120 = { +struct weapondef invitem_rcp120 = { FILE_GRCP120, // hi model FILE_GRCP120LOD, // lo model invanim_rcp120_shoot, // equip animation @@ -1703,7 +1703,7 @@ struct gunviscmd gunviscmds_callisto[] = { gunviscmd_end }; -struct weaponfunc_shootauto invfunc_callisto_rapidfire = { +struct funcdef_shootauto invfunc_callisto_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -1731,7 +1731,7 @@ struct weaponfunc_shootauto invfunc_callisto_rapidfire = { 0, // turretdecel }; -struct weaponfunc_shootauto invfunc_callisto_highimpactshells = { +struct funcdef_shootauto invfunc_callisto_highimpactshells = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_115, // name 0, // unused @@ -1759,7 +1759,7 @@ struct weaponfunc_shootauto invfunc_callisto_highimpactshells = { 0, // turretdecel }; -struct inventory_ammo invammo_callisto = { +struct ammodef invammo_callisto = { AMMOTYPE_SMG, CASING_NONE, 32, // clip size @@ -1767,7 +1767,7 @@ struct inventory_ammo invammo_callisto = { 0, // flags }; -struct weapon invitem_callisto = { +struct weapondef invitem_callisto = { FILE_GMAIANSMG, // hi model FILE_GMAYANSMGLOD, // lo model invanim_callisto_reload, // equip animation @@ -1820,7 +1820,7 @@ struct guncmd invanim_dragon_reload[] = { gunscript_end }; -struct weaponfunc_shootauto invfunc_dragon_rapidfire = { +struct funcdef_shootauto invfunc_dragon_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -1848,7 +1848,7 @@ struct weaponfunc_shootauto invfunc_dragon_rapidfire = { 0, // turretdecel }; -struct weaponfunc_throw invfunc_dragon_selfdestruct = { +struct funcdef_throw invfunc_dragon_selfdestruct = { INVENTORYFUNCTYPE_THROW, L_GUN_118, // name 0, // unused @@ -1862,7 +1862,7 @@ struct weaponfunc_throw invfunc_dragon_selfdestruct = { 0, // damage }; -struct inventory_ammo invammo_dragon = { +struct ammodef invammo_dragon = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size @@ -1870,7 +1870,7 @@ struct inventory_ammo invammo_dragon = { 0, // flags }; -struct weapon invitem_dragon = { +struct weapondef invitem_dragon = { FILE_GDYDRAGON, // hi model FILE_GDYDRAGONLOD, // lo model invanim_dragon_shoot, // equip animation @@ -1954,7 +1954,7 @@ struct guncmd invanim_superdragon_sectopri[] = { gunscript_end }; -struct weaponfunc_shootauto invfunc_superdragon_rapidfire = { +struct funcdef_shootauto invfunc_superdragon_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -1982,7 +1982,7 @@ struct weaponfunc_shootauto invfunc_superdragon_rapidfire = { 0, // turretdecel }; -struct weaponfunc_shootprojectile invfunc_superdragon_grenadelauncher = { +struct funcdef_shootprojectile invfunc_superdragon_grenadelauncher = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_098, // name 0, // unused @@ -2013,7 +2013,7 @@ struct weaponfunc_shootprojectile invfunc_superdragon_grenadelauncher = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct inventory_ammo invammo_superdragon = { +struct ammodef invammo_superdragon = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size @@ -2021,7 +2021,7 @@ struct inventory_ammo invammo_superdragon = { 0, // flags }; -struct inventory_ammo invammo_superdragon_grenades = { +struct ammodef invammo_superdragon_grenades = { AMMOTYPE_DEVASTATOR, CASING_NONE, 6, // clip size @@ -2029,7 +2029,7 @@ struct inventory_ammo invammo_superdragon_grenades = { 0, // flags }; -struct weapon invitem_superdragon = { +struct weapondef invitem_superdragon = { FILE_GDYSUPERDRAGON, // hi model FILE_GDYSUPERDRAGONLOD, // lo model invanim_superdragon_shoot, // equip animation @@ -2093,7 +2093,7 @@ struct invaimsettings invaimsettings_ar34 = { INVAIMFLAG_AUTOAIM | INVAIMFLAG_ACCURATESINGLESHOT, }; -struct weaponfunc_shootauto invfunc_ar34_burstfire = { +struct funcdef_shootauto invfunc_ar34_burstfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_087, // name 0, // unused @@ -2121,7 +2121,7 @@ struct weaponfunc_shootauto invfunc_ar34_burstfire = { 0, // turretdecel }; -struct weaponfunc_shootauto invfunc_ar34_usescope = { +struct funcdef_shootauto invfunc_ar34_usescope = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_103, // name 0, // unused @@ -2149,7 +2149,7 @@ struct weaponfunc_shootauto invfunc_ar34_usescope = { 0, // turretdecel }; -struct inventory_ammo invammo_ar34 = { +struct ammodef invammo_ar34 = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size @@ -2157,7 +2157,7 @@ struct inventory_ammo invammo_ar34 = { 0, // flags }; -struct weapon invitem_ar34 = { +struct weapondef invitem_ar34 = { FILE_GAR34, // hi model FILE_GAR34LOD, // lo model invanim_ar34_reload, // equip animation @@ -2235,7 +2235,7 @@ struct invaimsettings invaimsettings_k7avenger = { INVAIMFLAG_AUTOAIM | INVAIMFLAG_ACCURATESINGLESHOT, }; -struct weaponfunc_shootauto invfunc_k7avenger_burstfire = { +struct funcdef_shootauto invfunc_k7avenger_burstfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_087, // name 0, // unused @@ -2263,7 +2263,7 @@ struct weaponfunc_shootauto invfunc_k7avenger_burstfire = { 0, // turretdecel }; -struct weaponfunc_shootauto invfunc_k7avenger_threatdetector = { +struct funcdef_shootauto invfunc_k7avenger_threatdetector = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_119, // name 0, // unused @@ -2291,7 +2291,7 @@ struct weaponfunc_shootauto invfunc_k7avenger_threatdetector = { 0, // turretdecel }; -struct inventory_ammo invammo_k7avenger = { +struct ammodef invammo_k7avenger = { AMMOTYPE_RIFLE, CASING_RIFLE, 25, // clip size @@ -2299,7 +2299,7 @@ struct inventory_ammo invammo_k7avenger = { 0, // flags }; -struct weapon invitem_k7avenger = { +struct weapondef invitem_k7avenger = { FILE_GK7AVENGER, // hi model FILE_GAVENGERLOD, // lo model invanim_k7avenger_equip, // equip animation @@ -2388,7 +2388,7 @@ struct guncmd invanim_laptopgun_unequip[] = { gunscript_end }; -struct weaponfunc_shootauto invfunc_laptopgun_burstfire = { +struct funcdef_shootauto invfunc_laptopgun_burstfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_087, // name 0, // unused @@ -2416,7 +2416,7 @@ struct weaponfunc_shootauto invfunc_laptopgun_burstfire = { 0, // turretdecel }; -struct weaponfunc_throw invfunc_laptopgun_deploy = { +struct funcdef_throw invfunc_laptopgun_deploy = { INVENTORYFUNCTYPE_THROW, L_GUN_117, // name 0, // unused @@ -2430,7 +2430,7 @@ struct weaponfunc_throw invfunc_laptopgun_deploy = { 0, // damage }; -struct inventory_ammo invammo_laptopgun = { +struct ammodef invammo_laptopgun = { AMMOTYPE_SMG, CASING_NONE, 50, // clip size @@ -2438,7 +2438,7 @@ struct inventory_ammo invammo_laptopgun = { 0, // flags }; -struct weapon invitem_laptopgun = { +struct weapondef invitem_laptopgun = { FILE_GPCGUN, // hi model FILE_GPCGUNLOD, // lo model invanim_laptopgun_equip, // equip animation @@ -2503,7 +2503,7 @@ struct guncmd invanim_shotgun_doubleshot[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_shotgun_single = { +struct funcdef_shootsingle invfunc_shotgun_single = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_089, // name 0, // unused @@ -2525,7 +2525,7 @@ struct weaponfunc_shootsingle invfunc_shotgun_single = { 1, // penetration }; -struct weaponfunc_shootsingle invfunc_shotgun_double = { +struct funcdef_shootsingle invfunc_shotgun_double = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_105, // name 0, // unused @@ -2547,7 +2547,7 @@ struct weaponfunc_shootsingle invfunc_shotgun_double = { 1, // penetration }; -struct inventory_ammo invammo_shotgun = { +struct ammodef invammo_shotgun = { AMMOTYPE_SHOTGUN, CASING_SHOTGUN, 9, // clip size @@ -2555,7 +2555,7 @@ struct inventory_ammo invammo_shotgun = { AMMOFLAG_INCREMENTALRELOAD, // flags }; -struct weapon invitem_shotgun = { +struct weapondef invitem_shotgun = { FILE_GSHOTGUN, // hi model FILE_GSHOTGUNLOD, // lo model invanim_shotgun_singleshot, // equip animation @@ -2628,7 +2628,7 @@ struct guncmd invanim_reaper_unequip[] = { gunscript_end }; -struct weaponfunc_shootauto invfunc_reaper_shoot = { +struct funcdef_shootauto invfunc_reaper_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_088, // name 0, // unused @@ -2656,7 +2656,7 @@ struct weaponfunc_shootauto invfunc_reaper_shoot = { 88, // turretdecel }; -struct weaponfunc_melee invfunc_reaper_grind = { +struct funcdef_melee invfunc_reaper_grind = { INVENTORYFUNCTYPE_MELEE, L_GUN_106, // name 0, // unused @@ -2680,7 +2680,7 @@ struct weaponfunc_melee invfunc_reaper_grind = { 0, // unused }; -struct inventory_ammo invammo_reaper = { +struct ammodef invammo_reaper = { AMMOTYPE_REAPER, CASING_REAPER, 200, // clip size @@ -2688,7 +2688,7 @@ struct inventory_ammo invammo_reaper = { 0, // flags }; -struct weapon invitem_reaper = { +struct weapondef invitem_reaper = { FILE_GSKMINIGUN, // hi model FILE_GSKMINIGUNLOD, // lo model invanim_reaper_equip, // equip animation @@ -2756,7 +2756,7 @@ struct invaimsettings invaimsettings_rocketlauncher = { INVAIMFLAG_AUTOAIM, }; -struct weaponfunc_shootprojectile invfunc_rockerlauncher_shoot = { +struct funcdef_shootprojectile invfunc_rockerlauncher_shoot = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_091, // name 0, // unused @@ -2787,7 +2787,7 @@ struct weaponfunc_shootprojectile invfunc_rockerlauncher_shoot = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct weaponfunc_shootprojectile invfunc_rocketlauncher_homing = { +struct funcdef_shootprojectile invfunc_rocketlauncher_homing = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_092, // name 0, // unused @@ -2818,7 +2818,7 @@ struct weaponfunc_shootprojectile invfunc_rocketlauncher_homing = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct inventory_ammo invammo_rocketlauncher = { +struct ammodef invammo_rocketlauncher = { AMMOTYPE_ROCKET, CASING_NONE, 1, // clip size @@ -2826,7 +2826,7 @@ struct inventory_ammo invammo_rocketlauncher = { 0, // flags }; -struct weapon invitem_rocketlauncher = { +struct weapondef invitem_rocketlauncher = { FILE_GDYROCKET, // hi model FILE_GROCKETLOD, // lo model invanim_rockerlauncher_shoot, // equip animation @@ -2866,7 +2866,7 @@ struct guncmd invanim_slayer_reload[] = { gunscript_end }; -struct weaponfunc_shootprojectile invfunc_slayer_shoot = { +struct funcdef_shootprojectile invfunc_slayer_shoot = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_091, // name 0, // unused @@ -2897,7 +2897,7 @@ struct weaponfunc_shootprojectile invfunc_slayer_shoot = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct weaponfunc_shootprojectile invfunc_slayer_flybywire = { +struct funcdef_shootprojectile invfunc_slayer_flybywire = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_093, // name 0, // unused @@ -2928,7 +2928,7 @@ struct weaponfunc_shootprojectile invfunc_slayer_flybywire = { SFX_SLAYER_WHIR, // soundnum }; -struct inventory_ammo invammo_slayer = { +struct ammodef invammo_slayer = { AMMOTYPE_ROCKET, CASING_NONE, 1, // clip size @@ -2936,7 +2936,7 @@ struct inventory_ammo invammo_slayer = { 0, // flags }; -struct weapon invitem_slayer = { +struct weapondef invitem_slayer = { FILE_GSKROCKET, // hi model FILE_GSKROCKETLOD, // lo model invanim_slayer_shoot, // equip animation @@ -2986,7 +2986,7 @@ struct guncmd invanim_devastator_reload[] = { gunscript_end }; -struct weaponfunc_shootprojectile invfunc_devastator_shoot = { +struct funcdef_shootprojectile invfunc_devastator_shoot = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_098, // name 0, // unused @@ -3017,7 +3017,7 @@ struct weaponfunc_shootprojectile invfunc_devastator_shoot = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct weaponfunc_shootprojectile invfunc_devastator_wallhugger = { +struct funcdef_shootprojectile invfunc_devastator_wallhugger = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_099, // name 0, // unused @@ -3048,7 +3048,7 @@ struct weaponfunc_shootprojectile invfunc_devastator_wallhugger = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct inventory_ammo invammo_devastator = { +struct ammodef invammo_devastator = { AMMOTYPE_DEVASTATOR, CASING_NONE, 8, // clip size @@ -3061,7 +3061,7 @@ struct modelpartvisibility invpartvisibility_devastator[] = { { 255 }, }; -struct weapon invitem_devastator = { +struct weapondef invitem_devastator = { FILE_GDYDEVASTATOR, // hi model FILE_GDEVASTATORLOD, // lo model invanim_devastator_shoot, // equip animation @@ -3086,7 +3086,7 @@ struct weapon invitem_devastator = { WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_00004000 | WEAPONFLAG_HASHANDS, }; -struct weaponfunc invfunc_mine_threatdetector = { +struct funcdef invfunc_mine_threatdetector = { INVENTORYFUNCTYPE_NONE, L_GUN_119, // name 0, // unused @@ -3113,7 +3113,7 @@ struct guncmd invanim_mine_throw[] = { gunscript_end }; -struct weaponfunc_throw invfunc_timedmine_throw = { +struct funcdef_throw invfunc_timedmine_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_120, // name 0, // unused @@ -3127,7 +3127,7 @@ struct weaponfunc_throw invfunc_timedmine_throw = { 0, // damage }; -struct inventory_ammo invammo_timedmine = { +struct ammodef invammo_timedmine = { AMMOTYPE_TIMED_MINE, CASING_NONE, 1, // clip size @@ -3135,7 +3135,7 @@ struct inventory_ammo invammo_timedmine = { AMMOFLAG_EQUIPPEDISRESERVE, // flags }; -struct weapon invitem_timedmine = { +struct weapondef invitem_timedmine = { FILE_GTIMEDMINE, // hi model FILE_GTIMEDMINE, // lo model invanim_mine_equip, // equip animation @@ -3189,7 +3189,7 @@ struct guncmd invanim_remotemine_throw[] = { gunscript_end }; -struct weaponfunc_throw invfunc_remotemine_throw = { +struct funcdef_throw invfunc_remotemine_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_122, // name 0, // unused @@ -3203,7 +3203,7 @@ struct weaponfunc_throw invfunc_remotemine_throw = { 0, // damage }; -struct weaponfunc_special invfunc_remotemine_detonate = { +struct funcdef_special invfunc_remotemine_detonate = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_123, // name 0, // unused @@ -3216,7 +3216,7 @@ struct weaponfunc_special invfunc_remotemine_detonate = { 0, // soundnum (unused) }; -struct inventory_ammo invammo_remotemine = { +struct ammodef invammo_remotemine = { AMMOTYPE_REMOTE_MINE, CASING_NONE, 1, // clip size @@ -3229,7 +3229,7 @@ struct modelpartvisibility invpartvisibility_remotemine[] = { { 255 }, }; -struct weapon invitem_remotemine = { +struct weapondef invitem_remotemine = { FILE_GREMOTEMINE, // hi model FILE_GREMOTEMINE, // lo model invanim_remotemine_equip, // equip animation @@ -3258,7 +3258,7 @@ struct weapon invitem_remotemine = { WEAPONFLAG_THROWABLE | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_HASHANDS, }; -struct weaponfunc_throw invfunc_proxymine_throw = { +struct funcdef_throw invfunc_proxymine_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_121, // name 0, // unused @@ -3272,7 +3272,7 @@ struct weaponfunc_throw invfunc_proxymine_throw = { 0, // damage }; -struct inventory_ammo invammo_proximitymine = { +struct ammodef invammo_proximitymine = { AMMOTYPE_PROXY_MINE, CASING_NONE, 1, // clip size @@ -3280,7 +3280,7 @@ struct inventory_ammo invammo_proximitymine = { AMMOFLAG_EQUIPPEDISRESERVE, // flags }; -struct weapon invitem_proximitymine = { +struct weapondef invitem_proximitymine = { FILE_GPROXIMITYMINE, // hi model FILE_GPROXIMITYMINE, // lo model invanim_mine_equip, // equip animation @@ -3321,7 +3321,7 @@ struct guncmd invanim_ecmmine_throw[] = { gunscript_end }; -struct weaponfunc_throw invfunc_ecmmine_throw = { +struct funcdef_throw invfunc_ecmmine_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_140, // name 0, // unused @@ -3335,7 +3335,7 @@ struct weaponfunc_throw invfunc_ecmmine_throw = { 0, // damage }; -struct inventory_ammo invammo_ecmmine = { +struct ammodef invammo_ecmmine = { AMMOTYPE_ECM_MINE, CASING_NONE, 1, // clip size @@ -3343,7 +3343,7 @@ struct inventory_ammo invammo_ecmmine = { AMMOFLAG_EQUIPPEDISRESERVE, // flags }; -struct weapon invitem_ecmmine = { +struct weapondef invitem_ecmmine = { FILE_GECMMINE, // hi model FILE_GECMMINE, // lo model invanim_ecmmine_equip, // equip animation @@ -3374,7 +3374,7 @@ struct weapon invitem_ecmmine = { // Some unfinished Reaper-like gun. The name is "Timed Mine". The primary // function is detonate (and it works). It can't shoot. -struct weapon invitem_unused_8007dd88 = { +struct weapondef invitem_unused_8007dd88 = { FILE_GSKMINIGUN, // hi model FILE_GSKMINIGUNLOD, // lo model NULL, // equip animation @@ -3418,7 +3418,7 @@ struct guncmd invanim_grenade_equip[] = { gunscript_end }; -struct weaponfunc_throw invfunc_grenade_throw = { +struct funcdef_throw invfunc_grenade_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_124, // name 0, // unused @@ -3432,7 +3432,7 @@ struct weaponfunc_throw invfunc_grenade_throw = { 0, // damage }; -struct weaponfunc_throw invfunc_grenade_pinball = { +struct funcdef_throw invfunc_grenade_pinball = { INVENTORYFUNCTYPE_THROW, L_GUN_125, // name 0, // unused @@ -3446,7 +3446,7 @@ struct weaponfunc_throw invfunc_grenade_pinball = { 0, // damage }; -struct inventory_ammo invammo_grenade = { +struct ammodef invammo_grenade = { AMMOTYPE_GRENADE, CASING_NONE, 1, // clip size @@ -3454,7 +3454,7 @@ struct inventory_ammo invammo_grenade = { AMMOFLAG_EQUIPPEDISRESERVE | AMMOFLAG_QTYAFFECTSPARTVIS, // flags }; -struct weapon invitem_grenade = { +struct weapondef invitem_grenade = { FILE_GGRENADE, // hi model FILE_GGRENADELOD, // lo model invanim_grenade_equip, // equip animation @@ -3479,7 +3479,7 @@ struct weapon invitem_grenade = { WEAPONFLAG_THROWABLE | WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS, }; -struct weaponfunc_throw invfunc_nbomb_throw = { +struct funcdef_throw invfunc_nbomb_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_134, // name 0, // unused @@ -3493,7 +3493,7 @@ struct weaponfunc_throw invfunc_nbomb_throw = { 0, // damage }; -struct weaponfunc_throw invfunc_nbomb_proxy = { +struct funcdef_throw invfunc_nbomb_proxy = { INVENTORYFUNCTYPE_THROW, L_GUN_127, // name 0, // unused @@ -3507,7 +3507,7 @@ struct weaponfunc_throw invfunc_nbomb_proxy = { 0, // damage }; -struct inventory_ammo invammo_nbomb = { +struct ammodef invammo_nbomb = { AMMOTYPE_NBOMB, CASING_NONE, 1, // clip size @@ -3515,7 +3515,7 @@ struct inventory_ammo invammo_nbomb = { AMMOFLAG_EQUIPPEDISRESERVE | AMMOFLAG_QTYAFFECTSPARTVIS, // flags }; -struct weapon invitem_nbomb = { +struct weapondef invitem_nbomb = { FILE_GNBOMB, // hi model FILE_GNBOMBLOD, // lo model invanim_grenade_equip, // equip animation @@ -3571,7 +3571,7 @@ struct invaimsettings invaimsettings_farsight = { INVAIMFLAG_MANUALZOOM | INVAIMFLAG_ACCURATESINGLESHOT, }; -struct weaponfunc_shootsingle invfunc_farsight_shoot = { +struct funcdef_shootsingle invfunc_farsight_shoot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_090, // name 0, // unused @@ -3593,7 +3593,7 @@ struct weaponfunc_shootsingle invfunc_farsight_shoot = { 5, // penetration }; -struct weaponfunc_shootsingle invfunc_farsight_targetlocator = { +struct funcdef_shootsingle invfunc_farsight_targetlocator = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_111, // name 0, // unused @@ -3615,7 +3615,7 @@ struct weaponfunc_shootsingle invfunc_farsight_targetlocator = { 5, // penetration }; -struct inventory_ammo invammo_farsight = { +struct ammodef invammo_farsight = { AMMOTYPE_FARSIGHT, CASING_NONE, 8, // clip size @@ -3628,7 +3628,7 @@ struct modelpartvisibility invpartvisibility_farsight[] = { { 255 }, }; -struct weapon invitem_farsight = { +struct weapondef invitem_farsight = { FILE_GZ2020, // hi model FILE_GZ2020LOD, // lo model invanim_farsight_shoot, // equip animation @@ -3695,7 +3695,7 @@ struct guncmd invanim_crosbow_equip[] = { gunscript_end }; -struct weaponfunc_shootprojectile invfunc_crossbow_lethal = { +struct funcdef_shootprojectile invfunc_crossbow_lethal = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_112, // name 0, // unused @@ -3726,7 +3726,7 @@ struct weaponfunc_shootprojectile invfunc_crossbow_lethal = { -1, // soundnum }; -struct weaponfunc_shootprojectile invfunc_crossbow_shoot = { +struct funcdef_shootprojectile invfunc_crossbow_shoot = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_107, // name 0, // unused @@ -3757,7 +3757,7 @@ struct weaponfunc_shootprojectile invfunc_crossbow_shoot = { -1, // soundnum }; -struct inventory_ammo invammo_crossbow = { +struct ammodef invammo_crossbow = { AMMOTYPE_CROSSBOW, CASING_NONE, 5, // clip size @@ -3772,7 +3772,7 @@ struct modelpartvisibility invpartvisibility_crossbow[] = { { 255 }, }; -struct weapon invitem_crossbow = { +struct weapondef invitem_crossbow = { FILE_GCROSSBOW, // hi model FILE_GCROSSBOWLOD, // lo model invanim_crosbow_equip, // equip animation @@ -3836,7 +3836,7 @@ struct guncmd invanim_tranquilizer_reload[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_tranquilizer_shoot = { +struct funcdef_shootsingle invfunc_tranquilizer_shoot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_107, // name 0, // unused @@ -3858,7 +3858,7 @@ struct weaponfunc_shootsingle invfunc_tranquilizer_shoot = { 1, // penetration }; -struct weaponfunc_melee invfunc_tranquilizer_lethal = { +struct funcdef_melee invfunc_tranquilizer_lethal = { INVENTORYFUNCTYPE_MELEE, L_GUN_108, // name 0, // unused @@ -3882,7 +3882,7 @@ struct weaponfunc_melee invfunc_tranquilizer_lethal = { 0, // unused }; -struct inventory_ammo invammo_tranquilizer = { +struct ammodef invammo_tranquilizer = { AMMOTYPE_SEDATIVE, CASING_NONE, 8, // clip size @@ -3897,7 +3897,7 @@ struct modelpartvisibility invpartvisibility_tranquilizer[] = { { 255 }, }; -struct weapon invitem_tranquilizer = { +struct weapondef invitem_tranquilizer = { FILE_GDRUGGUN, // hi model FILE_GDRUGGUNLOD, // lo model invanim_tranquilizer_shoot, // equip animation @@ -3926,7 +3926,7 @@ struct weapon invitem_tranquilizer = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_00004000 | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS, }; -struct inventory_ammo invammo_psychosisgun = { +struct ammodef invammo_psychosisgun = { AMMOTYPE_PSYCHOSIS, CASING_NONE, 8, // clip size @@ -3934,7 +3934,7 @@ struct inventory_ammo invammo_psychosisgun = { 0, // flags }; -struct weaponfunc_shootsingle invfunc_psychosisgun_shoot = { +struct funcdef_shootsingle invfunc_psychosisgun_shoot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_131, // name 0, // unused @@ -3956,7 +3956,7 @@ struct weaponfunc_shootsingle invfunc_psychosisgun_shoot = { 1, // penetration }; -struct weapon invitem_psychosisgun = { +struct weapondef invitem_psychosisgun = { FILE_GDRUGGUN, // hi model FILE_GDRUGGUNLOD, // lo model invanim_tranquilizer_shoot, // equip animation @@ -4021,7 +4021,7 @@ struct invaimsettings invaimsettings_sniperrifle = { INVAIMFLAG_MANUALZOOM | INVAIMFLAG_ACCURATESINGLESHOT, }; -struct weaponfunc_shootsingle invfunc_sniperrifle_singleshot = { +struct funcdef_shootsingle invfunc_sniperrifle_singleshot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -4043,7 +4043,7 @@ struct weaponfunc_shootsingle invfunc_sniperrifle_singleshot = { 1, // penetration }; -struct weaponfunc_special invfunc_sniperrifle_crouch = { +struct funcdef_special invfunc_sniperrifle_crouch = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_130, // name 0, // unused @@ -4056,7 +4056,7 @@ struct weaponfunc_special invfunc_sniperrifle_crouch = { 0, // soundnum (unused) }; -struct inventory_ammo invammo_sniperrifle = { +struct ammodef invammo_sniperrifle = { AMMOTYPE_RIFLE, CASING_RIFLE, 8, // clip size @@ -4069,7 +4069,7 @@ struct modelpartvisibility invpartvisibility_sniperrifle[] = { { 255 }, }; -struct weapon invitem_sniperrifle = { +struct weapondef invitem_sniperrifle = { FILE_GSNIPERRIFLE, // hi model FILE_GSNIPERLOD, // lo model invanim_sniperrifle_equip, // equip animation @@ -4108,7 +4108,7 @@ struct guncmd invanim_laser_unequip[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_laser_pulse = { +struct funcdef_shootsingle invfunc_laser_pulse = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_132, // name 0, // unused @@ -4130,7 +4130,7 @@ struct weaponfunc_shootsingle invfunc_laser_pulse = { 1, // penetration }; -struct weaponfunc_shootauto invfunc_laser_stream = { +struct funcdef_shootauto invfunc_laser_stream = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_133, // name 0, // unused @@ -4158,7 +4158,7 @@ struct weaponfunc_shootauto invfunc_laser_stream = { 0, // turretdecel }; -struct weapon invitem_laser = { +struct weapondef invitem_laser = { FILE_GLASER, // hi model FILE_GLASERLOD, // lo model invanim_laser_equip, // equip animation @@ -4199,7 +4199,7 @@ struct guncmd invanim_pp9i_shoot[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_pp9i_shoot = { +struct funcdef_shootsingle invfunc_pp9i_shoot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -4221,7 +4221,7 @@ struct weaponfunc_shootsingle invfunc_pp9i_shoot = { 1, // penetration }; -struct inventory_ammo invammo_pp9i = { +struct ammodef invammo_pp9i = { AMMOTYPE_PISTOL, CASING_STANDARD, 7, // clip size @@ -4229,7 +4229,7 @@ struct inventory_ammo invammo_pp9i = { 0, // flags }; -struct weapon invitem_pp9i = { +struct weapondef invitem_pp9i = { FILE_GWPPK, // hi model FILE_GWPPK, // lo model invanim_pp9i_shoot, // equip animation @@ -4260,7 +4260,7 @@ struct guncmd invanim_cc13_shoot[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_cc13_shoot = { +struct funcdef_shootsingle invfunc_cc13_shoot = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_085, // name 0, // unused @@ -4282,7 +4282,7 @@ struct weaponfunc_shootsingle invfunc_cc13_shoot = { 1, // penetration }; -struct inventory_ammo invammo_cc13 = { +struct ammodef invammo_cc13 = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size @@ -4290,7 +4290,7 @@ struct inventory_ammo invammo_cc13 = { 0, // flags }; -struct weapon invitem_cc13 = { +struct weapondef invitem_cc13 = { FILE_GTT33, // hi model FILE_GTT33, // lo model invanim_cc13_shoot, // equip animation @@ -4315,7 +4315,7 @@ struct weapon invitem_cc13 = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_00004000 | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS | WEAPONFLAG_GANGSTA, }; -struct weaponfunc_shootauto invfunc_kl01313_shoot = { +struct funcdef_shootauto invfunc_kl01313_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -4343,7 +4343,7 @@ struct weaponfunc_shootauto invfunc_kl01313_shoot = { 0, // turretdecel }; -struct inventory_ammo invammo_kl01313 = { +struct ammodef invammo_kl01313 = { AMMOTYPE_SMG, CASING_STANDARD, 20, // clip size @@ -4351,7 +4351,7 @@ struct inventory_ammo invammo_kl01313 = { 0, // flags }; -struct weapon invitem_kl01313 = { +struct weapondef invitem_kl01313 = { FILE_GSKORPION, // hi model FILE_GSKORPION, // lo model NULL, // equip animation @@ -4376,7 +4376,7 @@ struct weapon invitem_kl01313 = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_BRIGHTER, }; -struct weaponfunc_shootauto invfunc_kf7special_shoot = { +struct funcdef_shootauto invfunc_kf7special_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_087, // name 0, // unused @@ -4404,7 +4404,7 @@ struct weaponfunc_shootauto invfunc_kf7special_shoot = { 0, // turretdecel }; -struct inventory_ammo invammo_kf7special = { +struct ammodef invammo_kf7special = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size @@ -4412,7 +4412,7 @@ struct inventory_ammo invammo_kf7special = { 0, // flags }; -struct weapon invitem_kf7special = { +struct weapondef invitem_kf7special = { FILE_GAK47, // hi model FILE_GAK47, // lo model NULL, // equip animation @@ -4437,7 +4437,7 @@ struct weapon invitem_kf7special = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_BRIGHTER, }; -struct weaponfunc_shootauto invfunc_zzt9mm_shoot = { +struct funcdef_shootauto invfunc_zzt9mm_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -4465,7 +4465,7 @@ struct weaponfunc_shootauto invfunc_zzt9mm_shoot = { 0, // turretdecel }; -struct inventory_ammo invammo_zzt9mm = { +struct ammodef invammo_zzt9mm = { AMMOTYPE_SMG, CASING_STANDARD, 32, // clip size @@ -4473,7 +4473,7 @@ struct inventory_ammo invammo_zzt9mm = { 0, // flags }; -struct weapon invitem_zzt9mm = { +struct weapondef invitem_zzt9mm = { FILE_GUZI, // hi model FILE_GUZI, // lo model NULL, // equip animation @@ -4498,7 +4498,7 @@ struct weapon invitem_zzt9mm = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_BRIGHTER, }; -struct weaponfunc_shootauto invfunc_dmc_shoot = { +struct funcdef_shootauto invfunc_dmc_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -4526,7 +4526,7 @@ struct weaponfunc_shootauto invfunc_dmc_shoot = { 0, // turretdecel }; -struct inventory_ammo invammo_dmc = { +struct ammodef invammo_dmc = { AMMOTYPE_SMG, CASING_STANDARD, 30, // clip size @@ -4534,7 +4534,7 @@ struct inventory_ammo invammo_dmc = { 0, // flags }; -struct weapon invitem_dmc = { +struct weapondef invitem_dmc = { FILE_GMP5K, // hi model FILE_GMP5K, // lo model NULL, // equip animation @@ -4559,7 +4559,7 @@ struct weapon invitem_dmc = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_BRIGHTER, }; -struct weaponfunc_shootauto invfunc_ar53_shoot = { +struct funcdef_shootauto invfunc_ar53_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_087, // name 0, // unused @@ -4587,7 +4587,7 @@ struct weaponfunc_shootauto invfunc_ar53_shoot = { 0, // turretdecel }; -struct inventory_ammo invammo_ar53 = { +struct ammodef invammo_ar53 = { AMMOTYPE_RIFLE, CASING_RIFLE, 30, // clip size @@ -4595,7 +4595,7 @@ struct inventory_ammo invammo_ar53 = { 0, // flags }; -struct weapon invitem_ar53 = { +struct weapondef invitem_ar53 = { FILE_GM16, // hi model FILE_GM16, // lo model NULL, // equip animation @@ -4620,7 +4620,7 @@ struct weapon invitem_ar53 = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_BRIGHTER | WEAPONFLAG_DETERMINER_S_AN | WEAPONFLAG_DETERMINER_F_AN, }; -struct weaponfunc_shootauto invfunc_rcp45_shoot = { +struct funcdef_shootauto invfunc_rcp45_shoot = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -4648,7 +4648,7 @@ struct weaponfunc_shootauto invfunc_rcp45_shoot = { 0, // turretdecel }; -struct inventory_ammo invammo_rcp45 = { +struct ammodef invammo_rcp45 = { AMMOTYPE_SMG, CASING_STANDARD, 80, // clip size @@ -4656,7 +4656,7 @@ struct inventory_ammo invammo_rcp45 = { 0, // flags }; -struct weapon invitem_rcp45 = { +struct weapondef invitem_rcp45 = { FILE_GFNP90, // hi model FILE_GFNP90, // lo model NULL, // equip animation @@ -4681,7 +4681,7 @@ struct weapon invitem_rcp45 = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_BRIGHTER | WEAPONFLAG_DETERMINER_S_AN | WEAPONFLAG_DETERMINER_F_AN, }; -struct weaponfunc invfunc_briefcase_use = { +struct funcdef invfunc_briefcase_use = { INVENTORYFUNCTYPE_NONE, L_GUN_000, // name 0, // unused @@ -4696,7 +4696,7 @@ struct gunviscmd gunviscmds_unused_8006edcc[] = { gunviscmd_end }; -struct weapon invitem_briefcase2 = { +struct weapondef invitem_briefcase2 = { FILE_GFALCON2LOD, // hi model FILE_GFALCON2LOD, // lo model NULL, // equip animation @@ -4721,7 +4721,7 @@ struct weapon invitem_briefcase2 = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_00000800 | WEAPONFLAG_HIDEMENUMODEL | WEAPONFLAG_DONTCOUNTSHOTS | WEAPONFLAG_DETERMINER_S_THE | WEAPONFLAG_DETERMINER_F_THE, }; -struct weaponfunc_shootauto invfunc_choppergun_rapidfire = { +struct funcdef_shootauto invfunc_choppergun_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -4749,7 +4749,7 @@ struct weaponfunc_shootauto invfunc_choppergun_rapidfire = { 0, // turretdecel }; -struct inventory_ammo invammo_choppergun = { +struct ammodef invammo_choppergun = { AMMOTYPE_SMG, CASING_RIFLE, 27, // clip size @@ -4757,7 +4757,7 @@ struct inventory_ammo invammo_choppergun = { 0, // flags }; -struct weapon invitem_choppergun = { +struct weapondef invitem_choppergun = { 0, // hi model 0, // lo model NULL, // equip animation @@ -4782,7 +4782,7 @@ struct weapon invitem_choppergun = { WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_DUALWIELD, }; -struct weaponfunc_shootauto invfunc_watchlaser_rapidfire = { +struct funcdef_shootauto invfunc_watchlaser_rapidfire = { INVENTORYFUNCTYPE_SHOOT_AUTOMATIC, L_GUN_086, // name 0, // unused @@ -4810,7 +4810,7 @@ struct weaponfunc_shootauto invfunc_watchlaser_rapidfire = { 0, // turretdecel }; -struct inventory_ammo invammo_watchlaser = { +struct ammodef invammo_watchlaser = { AMMOTYPE_SMG, CASING_RIFLE, 27, // clip size @@ -4818,7 +4818,7 @@ struct inventory_ammo invammo_watchlaser = { 0, // flags }; -struct weapon invitem_watchlaser = { +struct weapondef invitem_watchlaser = { 0, // hi model 0, // lo model NULL, // equip animation @@ -4899,7 +4899,7 @@ struct guncmd invanim_combatknife_reload[] = { gunscript_end }; -struct weaponfunc_melee invfunc_combatknife_slash = { +struct funcdef_melee invfunc_combatknife_slash = { INVENTORYFUNCTYPE_MELEE, L_GUN_109, // name 0, // unused @@ -4923,7 +4923,7 @@ struct weaponfunc_melee invfunc_combatknife_slash = { 0, // unused }; -struct weaponfunc_throw invfunc_combatknife_throw = { +struct funcdef_throw invfunc_combatknife_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_110, // name 0, // unused @@ -4937,7 +4937,7 @@ struct weaponfunc_throw invfunc_combatknife_throw = { 1, // damage }; -struct inventory_ammo invammo_combatknife = { +struct ammodef invammo_combatknife = { AMMOTYPE_KNIFE, CASING_NONE, 1, // clip size @@ -4945,7 +4945,7 @@ struct inventory_ammo invammo_combatknife = { AMMOFLAG_EQUIPPEDISRESERVE | AMMOFLAG_QTYAFFECTSPARTVIS, // flags }; -struct weapon invitem_combatknife = { +struct weapondef invitem_combatknife = { FILE_GKNIFE, // hi model FILE_GKNIFELOD, // lo model invanim_combatknife_equip, // equip animation @@ -4970,7 +4970,7 @@ struct weapon invitem_combatknife = { WEAPONFLAG_THROWABLE | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_TRACKTIMEUSED | WEAPONFLAG_00000400 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_00004000 | WEAPONFLAG_BRIGHTER | WEAPONFLAG_HASHANDS | WEAPONFLAG_KEEPFUNCWHENEMPTY, }; -struct weaponfunc_throw invfunc_bug_throw = { +struct funcdef_throw invfunc_bug_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_000, // name 0, // unused @@ -4984,7 +4984,7 @@ struct weaponfunc_throw invfunc_bug_throw = { 0, // damage }; -struct weaponfunc_throw invfunc_targetamplifier_throw = { +struct funcdef_throw invfunc_targetamplifier_throw = { INVENTORYFUNCTYPE_THROW, L_GUN_000, // name 0, // unused @@ -4998,7 +4998,7 @@ struct weaponfunc_throw invfunc_targetamplifier_throw = { 0, // damage }; -struct inventory_ammo invammo_bug = { +struct ammodef invammo_bug = { AMMOTYPE_BUG, CASING_NONE, 1, // clip size @@ -5006,7 +5006,7 @@ struct inventory_ammo invammo_bug = { AMMOFLAG_EQUIPPEDISRESERVE, // flags }; -struct weapon invitem_commsrider = { +struct weapondef invitem_commsrider = { FILE_PCHRBUG, // hi model FILE_PCHRBUG, // lo model NULL, // equip animation @@ -5031,7 +5031,7 @@ struct weapon invitem_commsrider = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_tracerbug = { +struct weapondef invitem_tracerbug = { FILE_PCHRBUG, // hi model FILE_PCHRBUG, // lo model NULL, // equip animation @@ -5056,7 +5056,7 @@ struct weapon invitem_tracerbug = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_targetamplifier = { +struct weapondef invitem_targetamplifier = { FILE_PTARGETAMP, // hi model FILE_PTARGETAMP, // lo model NULL, // equip animation @@ -5081,7 +5081,7 @@ struct weapon invitem_targetamplifier = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc_device invfunc_nightvision_primary = { +struct funcdef_device invfunc_nightvision_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_135, // name 0, // unused @@ -5092,7 +5092,7 @@ struct weaponfunc_device invfunc_nightvision_primary = { DEVICE_NIGHTVISION, }; -struct weapon invitem_nightvision = { +struct weapondef invitem_nightvision = { FILE_PCHRNIGHTSIGHT, // hi model FILE_PCHRNIGHTSIGHT, // lo model NULL, // equip animation @@ -5121,7 +5121,7 @@ struct weapon invitem_nightvision = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000080 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc invfunc_horizonscanner_primary = { +struct funcdef invfunc_horizonscanner_primary = { INVENTORYFUNCTYPE_NONE, L_GUN_139, // name 0, // unused @@ -5143,7 +5143,7 @@ struct invaimsettings invaimsettings_horizonscanner = { INVAIMFLAG_MANUALZOOM | INVAIMFLAG_ACCURATESINGLESHOT, }; -struct weapon invitem_horizonscanner = { +struct weapondef invitem_horizonscanner = { FILE_PBINOCULARS, // hi model FILE_PBINOCULARS, // lo model NULL, // equip animation @@ -5168,7 +5168,7 @@ struct weapon invitem_horizonscanner = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_DETERMINER_S_AN | WEAPONFLAG_DETERMINER_F_AN | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc_device invfunc_cloak_primary = { +struct funcdef_device invfunc_cloak_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_116, // name 0, // unused @@ -5179,7 +5179,7 @@ struct weaponfunc_device invfunc_cloak_primary = { DEVICE_CLOAKDEVICE, }; -struct inventory_ammo invammo_cloakingdevice = { +struct ammodef invammo_cloakingdevice = { AMMOTYPE_CLOAK, CASING_NONE, 10, // clip size @@ -5187,7 +5187,7 @@ struct inventory_ammo invammo_cloakingdevice = { AMMOFLAG_NORESERVE, // flags }; -struct weapon invitem_cloakingdevice = { +struct weapondef invitem_cloakingdevice = { FILE_PCHRCLOAKER, // hi model FILE_PCHRCLOAKER, // lo model NULL, // equip animation @@ -5212,7 +5212,7 @@ struct weapon invitem_cloakingdevice = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_KEEPFUNCWHENEMPTY, }; -struct weaponfunc_special invfunc_combatboost_boost = { +struct funcdef_special invfunc_combatboost_boost = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_113, // name 0, // unused @@ -5225,7 +5225,7 @@ struct weaponfunc_special invfunc_combatboost_boost = { SFX_JO_BOOST_ACTIVATE, // soundnum (unused) }; -struct weaponfunc_special invfunc_combatboost_revert = { +struct funcdef_special invfunc_combatboost_revert = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_114, // name 0, // unused @@ -5238,7 +5238,7 @@ struct weaponfunc_special invfunc_combatboost_revert = { SFX_JO_BOOST_ACTIVATE, // soundnum (unused) }; -struct inventory_ammo invammo_combatboost = { +struct ammodef invammo_combatboost = { AMMOTYPE_BOOST, CASING_NONE, 4, // clip size @@ -5246,7 +5246,7 @@ struct inventory_ammo invammo_combatboost = { AMMOFLAG_NORESERVE, // flags }; -struct weapon invitem_combatboost = { +struct weapondef invitem_combatboost = { FILE_PCHRSPEEDPILL, // hi model FILE_PCHRSPEEDPILL, // lo model NULL, // equip animation @@ -5271,7 +5271,7 @@ struct weapon invitem_combatboost = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_KEEPFUNCWHENEMPTY | WEAPONFLAG_DETERMINER_S_SOME | WEAPONFLAG_DETERMINER_F_SOME, }; -struct weaponfunc_device invfunc_suicidepill_primary = { +struct funcdef_device invfunc_suicidepill_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_000, // name 0, // unused @@ -5282,7 +5282,7 @@ struct weaponfunc_device invfunc_suicidepill_primary = { DEVICE_SUICIDEPILL, }; -struct weapon invitem_suicidepill = { +struct weapondef invitem_suicidepill = { 0, // hi model 0, // lo model NULL, // equip animation @@ -5311,7 +5311,7 @@ struct weapon invitem_suicidepill = { WEAPONFLAG_AICANUSE | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc_device invfunc_irscanner_primary = { +struct funcdef_device invfunc_irscanner_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_138, // name 0, // unused @@ -5322,7 +5322,7 @@ struct weaponfunc_device invfunc_irscanner_primary = { DEVICE_IRSCANNER, }; -struct weapon invitem_irscanner = { +struct weapondef invitem_irscanner = { FILE_GIRSCANNER, // hi model FILE_GIRSCANNER, // lo model NULL, // equip animation @@ -5347,7 +5347,7 @@ struct weapon invitem_irscanner = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_00000040 | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc invfunc_disguise_primary = { +struct funcdef invfunc_disguise_primary = { INVENTORYFUNCTYPE_NONE, L_GUN_143, // name 0, // unused @@ -5357,7 +5357,7 @@ struct weaponfunc invfunc_disguise_primary = { 0, // flags }; -struct weapon invitem_disguise40 = { +struct weapondef invitem_disguise40 = { 0, // hi model 0, // lo model NULL, // equip animation @@ -5386,7 +5386,7 @@ struct weapon invitem_disguise40 = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_UNDROPPABLE | WEAPONFLAG_FIRETOACTIVATE, }; -struct weapon invitem_disguise41 = { +struct weapondef invitem_disguise41 = { 0, // hi model 0, // lo model NULL, // equip animation @@ -5415,7 +5415,7 @@ struct weapon invitem_disguise41 = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_UNDROPPABLE | WEAPONFLAG_FIRETOACTIVATE, }; -struct weaponfunc_device invfunc_camspy_deploy = { +struct funcdef_device invfunc_camspy_deploy = { INVENTORYFUNCTYPE_DEVICE, L_GUN_136, // name 0, // unused @@ -5426,7 +5426,7 @@ struct weaponfunc_device invfunc_camspy_deploy = { DEVICE_EYESPY, }; -struct weapon invitem_camspy = { +struct weapondef invitem_camspy = { FILE_CEYESPY, // hi model FILE_CEYESPY, // lo model NULL, // equip animation @@ -5451,7 +5451,7 @@ struct weapon invitem_camspy = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc_device invfunc_rtracker_primary = { +struct funcdef_device invfunc_rtracker_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_142, // name 0, // unused @@ -5462,7 +5462,7 @@ struct weaponfunc_device invfunc_rtracker_primary = { DEVICE_RTRACKER, }; -struct weapon invitem_rtracker = { +struct weapondef invitem_rtracker = { FILE_PRUSSDAR, // hi model FILE_PRUSSDAR, // lo model NULL, // equip animation @@ -5487,7 +5487,7 @@ struct weapon invitem_rtracker = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc_device invfunc_xray_primary = { +struct funcdef_device invfunc_xray_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_137, // name 0, // unused @@ -5498,7 +5498,7 @@ struct weaponfunc_device invfunc_xray_primary = { DEVICE_XRAYSCANNER, }; -struct weapon invitem_xrayscanner = { +struct weapondef invitem_xrayscanner = { FILE_PXRAYSPECS, // hi model FILE_PXRAYSPECS, // lo model NULL, // equip animation @@ -5543,7 +5543,7 @@ struct guncmd invanim_unused_8007f794[] = { gunscript_end }; -struct weaponfunc_special invfunc_datauplink_primary = { +struct funcdef_special invfunc_datauplink_primary = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_141, // name 0, // unused @@ -5556,7 +5556,7 @@ struct weaponfunc_special invfunc_datauplink_primary = { 0, // soundnum (unused) }; -struct weapon invitem_datauplink = { +struct weapondef invitem_datauplink = { FILE_GCOMMSUPLINK, // hi model FILE_GCOMMSUPLINK, // lo model invanim_datauplink_equip, // equip animation @@ -5585,7 +5585,7 @@ struct weapon invitem_datauplink = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_00000040 | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_HASHANDS | WEAPONFLAG_UNDROPPABLE | WEAPONFLAG_FIRETOACTIVATE, }; -struct weapon invitem_doordecoder = { +struct weapondef invitem_doordecoder = { FILE_PCHRDOORDECODER, // hi model FILE_PCHRDOORDECODER, // lo model NULL, // equip animation @@ -5615,7 +5615,7 @@ struct weapon invitem_doordecoder = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_UNDROPPABLE | WEAPONFLAG_FIRETOACTIVATE, }; -struct weapon invitem_rocket = { +struct weapondef invitem_rocket = { FILE_GCYCLONE, // hi model FILE_GCYCLONELOD, // lo model NULL, // equip animation @@ -5641,7 +5641,7 @@ struct weapon invitem_rocket = { 0, // flags }; -struct weapon invitem_homingrocket = { +struct weapondef invitem_homingrocket = { FILE_GCYCLONE, // hi model FILE_GCYCLONELOD, // lo model NULL, // equip animation @@ -5667,7 +5667,7 @@ struct weapon invitem_homingrocket = { 0, // flags }; -struct weapon invitem_grenaderound = { +struct weapondef invitem_grenaderound = { FILE_GCYCLONE, // hi model FILE_GCYCLONELOD, // lo model NULL, // equip animation @@ -5692,7 +5692,7 @@ struct weapon invitem_grenaderound = { 0, // flags }; -struct weapon invitem_bolt = { +struct weapondef invitem_bolt = { FILE_GCYCLONE, // hi model FILE_GCYCLONELOD, // lo model NULL, // equip animation @@ -5717,7 +5717,7 @@ struct weapon invitem_bolt = { 0, // flags }; -struct weaponfunc_special invfunc_unused_8006f9a4 = { +struct funcdef_special invfunc_unused_8006f9a4 = { INVENTORYFUNCTYPE_SPECIAL, L_GUN_144, // "Place Explosives" 0, // unused @@ -5730,7 +5730,7 @@ struct weaponfunc_special invfunc_unused_8006f9a4 = { 0, // soundnum (unused) }; -struct weapon invitem_skedarbomb = { +struct weapondef invitem_skedarbomb = { FILE_PSKEDARBOMB, // hi model FILE_PSKEDARBOMB, // lo model NULL, // equip animation @@ -5760,7 +5760,7 @@ struct weapon invitem_skedarbomb = { WEAPONFLAG_FIRETOACTIVATE, }; -struct weapon invitem_explosives = { +struct weapondef invitem_explosives = { FILE_PEXPLOSIVEBRICK, // hi model FILE_PEXPLOSIVEBRICK, // lo model NULL, // equip animation @@ -5786,7 +5786,7 @@ struct weapon invitem_explosives = { WEAPONFLAG_FIRETOACTIVATE, }; -struct weaponfunc_device invfunc_presidentscanner_primary = { +struct funcdef_device invfunc_presidentscanner_primary = { INVENTORYFUNCTYPE_DEVICE, L_GUN_142, // name 0, // unused @@ -5797,7 +5797,7 @@ struct weaponfunc_device invfunc_presidentscanner_primary = { DEVICE_RTRACKER, }; -struct weapon invitem_presidentscanner = { +struct weapondef invitem_presidentscanner = { FILE_PRUSSDAR, // hi model FILE_PRUSSDAR, // lo model NULL, // equip animation @@ -5822,7 +5822,7 @@ struct weapon invitem_presidentscanner = { WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALWIELD | WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_autosurgeon = { +struct weapondef invitem_autosurgeon = { FILE_PAUTOSURGEON, // hi model FILE_PAUTOSURGEON, // lo model NULL, // equip animation @@ -5852,7 +5852,7 @@ struct weapon invitem_autosurgeon = { WEAPONFLAG_UNDROPPABLE | WEAPONFLAG_FIRETOACTIVATE, }; -struct weapon invitem_flightplans = { +struct weapondef invitem_flightplans = { FILE_PSAFEITEM, // hi model FILE_PSAFEITEM, // lo model NULL, // equip animation @@ -5878,7 +5878,7 @@ struct weapon invitem_flightplans = { WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_researchtape = { +struct weapondef invitem_researchtape = { FILE_PRESEARCHTAPE, // hi model FILE_PRESEARCHTAPE, // lo model NULL, // equip animation @@ -5904,7 +5904,7 @@ struct weapon invitem_researchtape = { WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_backupdisk = { +struct weapondef invitem_backupdisk = { FILE_PZIGGYCARD, // hi model FILE_PZIGGYCARD, // lo model NULL, // equip animation @@ -5934,7 +5934,7 @@ struct weapon invitem_backupdisk = { WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_briefcase = { +struct weapondef invitem_briefcase = { FILE_PKEYCARD, // hi model FILE_PKEYCARD, // lo model NULL, // equip animation @@ -5960,7 +5960,7 @@ struct weapon invitem_briefcase = { WEAPONFLAG_HIDEMENUMODEL | WEAPONFLAG_UNDROPPABLE, }; -struct weapon invitem_suitcase = { +struct weapondef invitem_suitcase = { FILE_PCHRBRIEFCASE, // hi model FILE_PCHRBRIEFCASE, // lo model NULL, // equip animation @@ -5990,7 +5990,7 @@ struct weapon invitem_suitcase = { WEAPONFLAG_UNDROPPABLE | WEAPONFLAG_FIRETOACTIVATE, }; -struct weapon invitem_necklace = { +struct weapondef invitem_necklace = { FILE_PCHRCHAIN, // hi model FILE_PCHRCHAIN, // lo model NULL, // equip animation @@ -6017,7 +6017,7 @@ struct weapon invitem_necklace = { }; #if VERSION >= VERSION_NTSC_1_0 -struct weapon invitem_shieldtechitem = { +struct weapondef invitem_shieldtechitem = { FILE_PCHRSHIELD, // hi model FILE_PCHRSHIELD, // lo model NULL, // equip animation @@ -6044,7 +6044,7 @@ struct weapon invitem_shieldtechitem = { }; #endif -struct weapon invitem_keycard = { +struct weapondef invitem_keycard = { FILE_PKEYCARD, // hi model FILE_PKEYCARD, // lo model NULL, // equip animation @@ -6070,7 +6070,7 @@ struct weapon invitem_keycard = { WEAPONFLAG_UNDROPPABLE, }; -struct weaponfunc_shootprojectile invfunc_kingsceptre_primary = { +struct funcdef_shootprojectile invfunc_kingsceptre_primary = { INVENTORYFUNCTYPE_SHOOT_PROJECTILE, L_GUN_000, // name 0, // unused @@ -6101,7 +6101,7 @@ struct weaponfunc_shootprojectile invfunc_kingsceptre_primary = { SFX_LAUNCH_ROCKET_8053, // soundnum }; -struct inventory_ammo invammo_kingsceptre = { +struct ammodef invammo_kingsceptre = { AMMOTYPE_ROCKET, CASING_NONE, 1, // clip size @@ -6109,7 +6109,7 @@ struct inventory_ammo invammo_kingsceptre = { 0, // flags }; -struct weapon invitem_kingsceptre = { +struct weapondef invitem_kingsceptre = { FILE_GDYROCKET, // hi model FILE_GROCKETLOD, // lo model NULL, // equip animation @@ -6139,7 +6139,7 @@ struct guncmd invanim_tester_shoot[] = { gunscript_end }; -struct weaponfunc_shootsingle invfunc_tester_primary = { +struct funcdef_shootsingle invfunc_tester_primary = { INVENTORYFUNCTYPE_SHOOT_SINGLE, L_GUN_000, // name 0, // unused @@ -6161,7 +6161,7 @@ struct weaponfunc_shootsingle invfunc_tester_primary = { 1, // penetration }; -struct inventory_ammo invammo_tester = { +struct ammodef invammo_tester = { AMMOTYPE_PISTOL, CASING_STANDARD, 8, // clip size @@ -6169,7 +6169,7 @@ struct inventory_ammo invammo_tester = { 0, // flags }; -struct weapon invitem_tester = { +struct weapondef invitem_tester = { FILE_GTESTGUN, // hi model FILE_GTESTGUN, // lo model NULL, // equip animation @@ -6194,7 +6194,7 @@ struct weapon invitem_tester = { WEAPONFLAG_00000004 | WEAPONFLAG_ONEHANDED | WEAPONFLAG_AICANUSE | WEAPONFLAG_DUALFLIP | WEAPONFLAG_00000040 | WEAPONFLAG_00000400 | WEAPONFLAG_HASGUNSCRIPT | WEAPONFLAG_BRIGHTER, }; -struct weapon *g_Weapons[] = { +struct weapondef *g_Weapons[] = { &invitem_nothing, &invitem_unarmed, &invitem_falcon2, diff --git a/src/game/mainmenu.c b/src/game/mainmenu.c index 21b13087c..8c4d65a81 100644 --- a/src/game/mainmenu.c +++ b/src/game/mainmenu.c @@ -3654,8 +3654,8 @@ u8 var80072d88 = 255; char *inv_menu_text_primary_function(struct menuitem *item) { - struct weaponfunc *primaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 0); - struct weaponfunc *secondaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 1); + struct funcdef *primaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 0); + struct funcdef *secondaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 1); if (primaryfunc && secondaryfunc) { return lang_get(primaryfunc->name); @@ -3666,8 +3666,8 @@ char *inv_menu_text_primary_function(struct menuitem *item) char *inv_menu_text_secondary_function(struct menuitem *item) { - struct weaponfunc *primaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 0); - struct weaponfunc *secondaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 1); + struct funcdef *primaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 0); + struct funcdef *secondaryfunc = gset_get_funcdef_by_weaponnum_funcnum(g_InventoryWeapon, 1); if (secondaryfunc) { return lang_get(secondaryfunc->name); @@ -3767,7 +3767,7 @@ void func0f105948(s32 weaponnum) }; s32 useindex; - struct weapon *weapon; + struct weapondef *weapon; u32 stack; s32 wantindex; @@ -3862,7 +3862,7 @@ MenuDialogHandlerResult inventory_menu_dialog(s32 operation, struct menudialogde */ char *inv_menu_text_weapon_name(struct menuitem *item) { - struct weapon *weapon = gset_get_weapondef(g_InventoryWeapon); + struct weapondef *weapon = gset_get_weapondef(g_InventoryWeapon); if (weapon) { if (weapon->manufacturer == L_GUN_000) { // "\n" @@ -3880,7 +3880,7 @@ char *inv_menu_text_weapon_name(struct menuitem *item) */ char *inv_menu_text_weapon_manufacturer(struct menuitem *item) { - struct weapon *weapon = gset_get_weapondef(g_InventoryWeapon); + struct weapondef *weapon = gset_get_weapondef(g_InventoryWeapon); u32 textid = L_GUN_000; // "\n" if (weapon) { @@ -3902,7 +3902,7 @@ char *inv_menu_text_weapon_manufacturer(struct menuitem *item) char *inv_menu_text_weapon_description(struct menuitem *item) { - struct weapon *weapon = gset_get_weapondef(g_InventoryWeapon); + struct weapondef *weapon = gset_get_weapondef(g_InventoryWeapon); if (weapon) { if (g_InventoryWeapon == WEAPON_EYESPY && g_Vars.currentplayer->eyespy) { diff --git a/src/game/modelmgrreset.c b/src/game/modelmgrreset.c index a67a25291..f287166f8 100644 --- a/src/game/modelmgrreset.c +++ b/src/game/modelmgrreset.c @@ -159,21 +159,21 @@ void modelmgr_allocate_slots(s32 numobjs, s32 numchrs) bool modelmgr_load_projectile_modeldefs(s32 weaponnum) { bool result = false; - struct weapon *weapon = g_Weapons[weaponnum]; + struct weapondef *weapon = g_Weapons[weaponnum]; s32 i; for (i = 0; i != 2; i++) { if (weapon->functions[i]) { - struct weaponfunc *genericfunc = weapon->functions[i]; + struct funcdef *genericfunc = weapon->functions[i]; if (genericfunc->type == INVENTORYFUNCTYPE_SHOOT_PROJECTILE) { - struct weaponfunc_shootprojectile *func = (struct weaponfunc_shootprojectile *)genericfunc; + struct funcdef_shootprojectile *func = (struct funcdef_shootprojectile *)genericfunc; if (func->projectilemodelnum >= 0) { result |= setup_load_modeldef(func->projectilemodelnum); } } else if (genericfunc->type == INVENTORYFUNCTYPE_THROW) { - struct weaponfunc_throw *func = (struct weaponfunc_throw *)genericfunc; + struct funcdef_throw *func = (struct funcdef_throw *)genericfunc; if (func->projectilemodelnum >= 0) { result |= setup_load_modeldef(func->projectilemodelnum); diff --git a/src/game/mplayer/ingame.c b/src/game/mplayer/ingame.c index 221100e54..c8c380a31 100644 --- a/src/game/mplayer/ingame.c +++ b/src/game/mplayer/ingame.c @@ -354,7 +354,7 @@ struct menudialogdef g_MpPauseControlMenuDialog = { #if VERSION >= VERSION_JPN_FINAL char *mp_menu_text_weapon_description(struct menuitem *item) { - struct weapon *weapondef = gset_get_weapondef(g_Menus[g_MpPlayerNum].training.weaponnum); + struct weapondef *weapondef = gset_get_weapondef(g_Menus[g_MpPlayerNum].training.weaponnum); if (weapondef != NULL) { if (g_Menus[g_MpPlayerNum].training.weaponnum == WEAPON_EYESPY) { @@ -425,7 +425,7 @@ char *mp_menu_text_weapon_description(struct menuitem *item) #else char *mp_menu_text_weapon_description(struct menuitem *item) { - struct weapon *weapon = gset_get_weapondef(g_Menus[g_MpPlayerNum].mppause.weaponnum); + struct weapondef *weapon = gset_get_weapondef(g_Menus[g_MpPlayerNum].mppause.weaponnum); if (weapon) { return lang_get(weapon->description); diff --git a/src/game/prop.c b/src/game/prop.c index 54317e981..c8f53ee48 100644 --- a/src/game/prop.c +++ b/src/game/prop.c @@ -584,7 +584,7 @@ struct prop *shot_calculate_hits(s32 handnum, bool isshooting, struct coord *gun struct shotdata shotdata; s32 i; s32 s1 = 0; - struct weaponfunc *func; + struct funcdef *func; bool laserstream = false; bool ismelee = false; f32 range = 200; @@ -669,7 +669,7 @@ struct prop *shot_calculate_hits(s32 handnum, bool isshooting, struct coord *gun hitpos.z = shotdata.gunpos3d.z + shotdata.gundir3d.z * 300; } else if (ismelee) { if ((func->type & 0xff) == INVENTORYFUNCTYPE_MELEE) { - struct weaponfunc_melee *meleefunc = (struct weaponfunc_melee *) func; + struct funcdef_melee *meleefunc = (struct funcdef_melee *) func; range = meleefunc->range; } @@ -1192,10 +1192,10 @@ void hand_inflict_melee_damage(s32 handnum, struct gset *gset, bool arg2) f32 spfc[2]; f32 spf4[2]; struct model *model; - struct weaponfunc *func = gset_get_funcdef_by_gset(gset); + struct funcdef *func = gset_get_funcdef_by_gset(gset); if ((func->type & 0xff) == INVENTORYFUNCTYPE_MELEE) { - struct weaponfunc_melee *meleefunc = (struct weaponfunc_melee *)func; + struct funcdef_melee *meleefunc = (struct funcdef_melee *)func; rangelimit = meleefunc->range; } @@ -2393,7 +2393,7 @@ f32 prop_calculate_autoaim_score(struct prop *prop, struct coord *screenpos, f32 f32 left; f32 right; f32 result = -2; - struct weaponfunc *func = gset_get_current_funcdef(HAND_RIGHT); + struct funcdef *func = gset_get_current_funcdef(HAND_RIGHT); bool usefullscreen = forcefullscreen; bool sp4c; f32 sp48; @@ -2577,7 +2577,7 @@ void autoaim_tick(void) bool ismelee = false; bool cangangsta = gset_has_weapon_flag(bgun_get_weapon_num(HAND_RIGHT), WEAPONFLAG_GANGSTA); bool iscmpsec = false; - struct weaponfunc *func = gset_get_current_funcdef(HAND_RIGHT); + struct funcdef *func = gset_get_current_funcdef(HAND_RIGHT); s32 i; if (func && (func->type & 0xff) == INVENTORYFUNCTYPE_MELEE) { diff --git a/src/game/propobj.c b/src/game/propobj.c index 493442a55..4b51f1385 100644 --- a/src/game/propobj.c +++ b/src/game/propobj.c @@ -15685,7 +15685,7 @@ void obj_hit(struct shotdata *shotdata, struct hit *hit) s32 i; bool explosiveshells = false; bool slowsbullet = hit->slowsbullet; - struct weaponfunc *func = gset_get_funcdef_by_gset(&shotdata->gset); + struct funcdef *func = gset_get_funcdef_by_gset(&shotdata->gset); struct coord spec; f32 tmp; struct prop *spe4; diff --git a/src/game/sight.c b/src/game/sight.c index a94279853..0961709d4 100644 --- a/src/game/sight.c +++ b/src/game/sight.c @@ -161,7 +161,7 @@ void sight_tick(bool sighton) s32 i; s32 index; struct invaimsettings *gunsettings = gset_get_aim_settings(&g_Vars.currentplayer->hands[0].gset); - struct weaponfunc *func = gset_get_funcdef_by_weaponnum_funcnum(g_Vars.currentplayer->hands[0].gset.weaponnum, + struct funcdef *func = gset_get_funcdef_by_weaponnum_funcnum(g_Vars.currentplayer->hands[0].gset.weaponnum, g_Vars.currentplayer->hands[0].gset.weaponfunc); g_Vars.currentplayer->sighttimer240 += g_Vars.lvupdate240; diff --git a/src/game/training.c b/src/game/training.c index 8e494279e..61cea91e9 100644 --- a/src/game/training.c +++ b/src/game/training.c @@ -1656,7 +1656,7 @@ void fr_tick(void) s32 j; f32 dist; u32 stack; - struct inventory_ammo *ammo; + struct ammodef *ammo; u8 exploding; bool oldside; struct modelrodata_bbox *bbox; diff --git a/src/game/trainingmenus.c b/src/game/trainingmenus.c index 30e2b78c2..196469b31 100644 --- a/src/game/trainingmenus.c +++ b/src/game/trainingmenus.c @@ -313,7 +313,7 @@ MenuItemHandlerResult fr_difficulty_menu_handler(s32 operation, struct menuitem char *fr_primary_function_menu_text(struct menuitem *item) { - struct weaponfunc *func = gset_get_funcdef_by_weaponnum_funcnum(fr_get_weapon_by_slot(fr_get_slot()), FUNC_PRIMARY); + struct funcdef *func = gset_get_funcdef_by_weaponnum_funcnum(fr_get_weapon_by_slot(fr_get_slot()), FUNC_PRIMARY); if (func) { return lang_get(func->name); @@ -324,7 +324,7 @@ char *fr_primary_function_menu_text(struct menuitem *item) char *fr_secondary_function_menu_text(struct menuitem *item) { - struct weaponfunc *func = gset_get_funcdef_by_weaponnum_funcnum(fr_get_weapon_by_slot(fr_get_slot()), FUNC_SECONDARY); + struct funcdef *func = gset_get_funcdef_by_weaponnum_funcnum(fr_get_weapon_by_slot(fr_get_slot()), FUNC_SECONDARY); if (func) { return lang_get(func->name); diff --git a/src/include/data.h b/src/include/data.h index 228fe010d..4e7418c79 100644 --- a/src/include/data.h +++ b/src/include/data.h @@ -232,7 +232,7 @@ extern bool g_ObjectiveChecksDisabled; extern u16 var8006ae90[]; extern u16 var8006af0c[]; extern u16 var8006af8c[]; -extern struct weapon *g_Weapons[]; +extern struct weapondef *g_Weapons[]; extern u32 g_BgunGunMemBaseSize4Mb2P; extern bool g_CasingsActive; extern s32 g_MaxModels; diff --git a/src/include/game/gset.h b/src/include/game/gset.h index 162b05a41..3772a75a4 100644 --- a/src/include/game/gset.h +++ b/src/include/game/gset.h @@ -4,14 +4,14 @@ #include "data.h" #include "types.h" -struct weapon *gset_get_weapondef(s32 itemid); -struct weaponfunc *gset_get_funcdef_by_weaponnum_funcnum(u32 weaponnum, u32 which); -struct weaponfunc *gset_get_funcdef_by_gset2(struct gset *gset); -struct weaponfunc *gset_get_funcdef_by_gset(struct gset *gset); -struct weaponfunc *gset_get_funcdef_by_gset_funcnum(struct gset *gset, s32 which); -struct weaponfunc *gset_get_current_funcdef(u32 hand); +struct weapondef *gset_get_weapondef(s32 itemid); +struct funcdef *gset_get_funcdef_by_weaponnum_funcnum(u32 weaponnum, u32 which); +struct funcdef *gset_get_funcdef_by_gset2(struct gset *gset); +struct funcdef *gset_get_funcdef_by_gset(struct gset *gset); +struct funcdef *gset_get_funcdef_by_gset_funcnum(struct gset *gset, s32 which); +struct funcdef *gset_get_current_funcdef(u32 hand); struct invaimsettings *gset_get_aim_settings(struct gset *gset); -struct inventory_ammo *gset_get_ammodef(u32 weaponnum, u32 funcnum); +struct ammodef *gset_get_ammodef(u32 weaponnum, u32 funcnum); f32 gset_get_xshift(s32 handnum); f32 gset_get_xpos(s32 handnum); f32 gset_get_gun_zoom_fov(void); diff --git a/src/include/game/inv.h b/src/include/game/inv.h index 82ecae489..d1fd80f57 100644 --- a/src/include/game/inv.h +++ b/src/include/game/inv.h @@ -6,7 +6,7 @@ extern struct noisesettings invnoisesettings_silent; extern struct invaimsettings invaimsettings_default; -extern struct weapon *g_Weapons[WEAPON_SUICIDEPILL + 1]; +extern struct weapondef *g_Weapons[WEAPON_SUICIDEPILL + 1]; void inv_reset(void); void inv_init(s32 numdoubles); diff --git a/src/include/types.h b/src/include/types.h index bf9a1c16b..5d03d03cf 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -2111,7 +2111,7 @@ struct hand { /*0x0814*/ struct beam beam; /*0x0840*/ f32 noiseradius; /*0x0844*/ u32 fingerroty; - /*0x0848*/ f32 slidetrans; // 0 at rest, positive when back (struct weaponfunc_shoot.slidemax) + /*0x0848*/ f32 slidetrans; // 0 at rest, positive when back (struct funcdef_shoot.slidemax) /*0x084c*/ bool slideinc; // true when moving back, false when moving forward or not moving /*0x0850*/ struct weaponobj *rocket; /*0x0854*/ bool firedrocket; @@ -2865,7 +2865,7 @@ struct gunviscmd { u16 unk08; }; -struct weaponfunc { +struct funcdef { /*0x00*/ s32 type; /*0x04*/ u16 name; /*0x06*/ u8 unk06; // not used @@ -2875,8 +2875,8 @@ struct weaponfunc { /*0x10*/ u32 flags; }; -struct weaponfunc_shoot { - struct weaponfunc base; +struct funcdef_shoot { + struct funcdef base; /*0x14*/ struct recoilsettings *recoilsettings; /*0x18*/ s8 recoverytime60; /*0x1c*/ f32 damage; @@ -2900,12 +2900,12 @@ struct weaponfunc_shoot { /*0x3c*/ u8 penetration; }; -struct weaponfunc_shootsingle { - struct weaponfunc_shoot base; +struct funcdef_shootsingle { + struct funcdef_shoot base; }; -struct weaponfunc_shootauto { - struct weaponfunc_shoot base; +struct funcdef_shootauto { + struct funcdef_shoot base; /*0x40*/ f32 initialrpm; // rounds per minute /*0x44*/ f32 maxrpm; // rounds per minute /*0x48*/ f32 *vibrationstart; @@ -2914,8 +2914,8 @@ struct weaponfunc_shootauto { /*0x51*/ s8 turretdecel; }; -struct weaponfunc_shootprojectile { - struct weaponfunc_shoot base; +struct funcdef_shootprojectile { + struct funcdef_shoot base; /*0x40*/ s32 projectilemodelnum; /*0x44*/ u32 unk44; // unused /*0x48*/ f32 scale; @@ -2927,16 +2927,16 @@ struct weaponfunc_shootprojectile { /*0x60*/ s16 soundnum; }; -struct weaponfunc_throw { - struct weaponfunc base; +struct funcdef_throw { + struct funcdef base; /*0x14*/ s32 projectilemodelnum; /*0x18*/ s16 activatetime60; // time until proxies become active, or timed mine/grenade explodes /*0x1c*/ s32 recoverytime60; // time before player can throw another /*0x20*/ f32 damage; }; -struct weaponfunc_melee { - struct weaponfunc base; +struct funcdef_melee { + struct funcdef base; /*0x14*/ f32 damage; /*0x18*/ f32 range; /*0x1c*/ u32 unk1c; // unused @@ -2953,19 +2953,19 @@ struct weaponfunc_melee { /*0x48*/ u32 unk48; // unused }; -struct weaponfunc_special { - struct weaponfunc base; +struct funcdef_special { + struct funcdef base; /*0x14*/ s32 specialfunc; /*0x18*/ s32 recoverytime60; /*0x1c*/ u16 soundnum; // unused }; -struct weaponfunc_device { - struct weaponfunc base; +struct funcdef_device { + struct funcdef base; /*0x14*/ u32 device; }; -struct inventory_ammo { +struct ammodef { u32 type; u32 casingeject; s16 clipsize; @@ -2978,7 +2978,7 @@ struct modelpartvisibility { u8 visible; }; -struct weapon { +struct weapondef { /*0x00*/ u16 hi_model; /*0x02*/ u16 lo_model; /*0x04*/ struct guncmd *equip_animation; @@ -2986,7 +2986,7 @@ struct weapon { /*0x0c*/ struct guncmd *pritosec_animation; /*0x10*/ struct guncmd *sectopri_animation; /*0x14*/ void *functions[2]; - /*0x1c*/ struct inventory_ammo *ammos[2]; + /*0x1c*/ struct ammodef *ammos[2]; /*0x24*/ struct invaimsettings *aimsettings; /*0x28*/ f32 muzzlez; /*0x2c*/ f32 posx; @@ -5542,7 +5542,7 @@ struct botweaponconfig { struct handweaponinfo { s32 weaponnum; - struct weapon *definition; + struct weapondef *definition; struct gunctrl *gunctrl; };