Attempt to decompile weaponTick

This commit is contained in:
Ryan Dwyer
2021-11-24 22:19:57 +10:00
parent 39df08f50d
commit 3ea035e4d4
18 changed files with 628 additions and 209 deletions
+21 -21
View File
@@ -2080,7 +2080,7 @@ bool bgun0f098884(struct guncmd *cmd, struct gset *gset)
return result;
}
void bgun0f0988e0(struct guncmd *cmd, s32 handnum, struct hand *hand)
void bgunStartAnimation(struct guncmd *cmd, s32 handnum, struct hand *hand)
{
if (cmd->type != GUNCMD_PLAYANIMATION) {
struct guncmd *loopcmd = cmd;
@@ -2091,11 +2091,11 @@ void bgun0f0988e0(struct guncmd *cmd, s32 handnum, struct hand *hand)
if (bgun0f098884(loopcmd, &hand->gset) && !done) {
if (loopcmd->type == GUNCMD_INCLUDE) {
done = true;
bgun0f0988e0((struct guncmd *)loopcmd->unk04, handnum, hand);
bgunStartAnimation((struct guncmd *)loopcmd->unk04, handnum, hand);
} else if (loopcmd->type == GUNCMD_RANDOM) {
if ((struct guncmd *)loopcmd->unk04 != hand->unk0d80 && loopcmd->unk02 > rand) {
done = true;
bgun0f0988e0((struct guncmd *)loopcmd->unk04, handnum, hand);
bgunStartAnimation((struct guncmd *)loopcmd->unk04, handnum, hand);
}
}
}
@@ -3792,7 +3792,7 @@ glabel var7f1ac31c
/* f099dfc: 8fa5003c */ lw $a1,0x3c($sp)
/* f099e00: 1141001e */ beq $t2,$at,.L0f099e7c
/* f099e04: 00000000 */ nop
/* f099e08: 0fc26238 */ jal bgun0f0988e0
/* f099e08: 0fc26238 */ jal bgunStartAnimation
/* f099e0c: 02003025 */ or $a2,$s0,$zero
/* f099e10: 920b06d6 */ lbu $t3,0x6d6($s0)
/* f099e14: 8fa30038 */ lw $v1,0x38($sp)
@@ -3985,7 +3985,7 @@ glabel var7f1ac31c
/* f09a0b8: 8de4000c */ lw $a0,0xc($t7)
/* f09a0bc: 50800007 */ beqzl $a0,.L0f09a0dc
/* f09a0c0: 8e0a060c */ lw $t2,0x60c($s0)
/* f09a0c4: 0fc26238 */ jal bgun0f0988e0
/* f09a0c4: 0fc26238 */ jal bgunStartAnimation
/* f09a0c8: 02003025 */ or $a2,$s0,$zero
/* f09a0cc: 920d0690 */ lbu $t5,0x690($s0)
/* f09a0d0: 35a90040 */ ori $t1,$t5,0x40
@@ -4452,7 +4452,7 @@ glabel var7f1ac31c
/* f099dfc: 8fa5003c */ lw $a1,0x3c($sp)
/* f099e00: 1141001e */ beq $t2,$at,.L0f099e7c
/* f099e04: 00000000 */ nop
/* f099e08: 0fc26238 */ jal bgun0f0988e0
/* f099e08: 0fc26238 */ jal bgunStartAnimation
/* f099e0c: 02003025 */ or $a2,$s0,$zero
/* f099e10: 920b06d6 */ lbu $t3,0x6d6($s0)
/* f099e14: 8fa30038 */ lw $v1,0x38($sp)
@@ -4645,7 +4645,7 @@ glabel var7f1ac31c
/* f09a0b8: 8de4000c */ lw $a0,0xc($t7)
/* f09a0bc: 50800007 */ beqzl $a0,.L0f09a0dc
/* f09a0c0: 8e0a060c */ lw $t2,0x60c($s0)
/* f09a0c4: 0fc26238 */ jal bgun0f0988e0
/* f09a0c4: 0fc26238 */ jal bgunStartAnimation
/* f09a0c8: 02003025 */ or $a2,$s0,$zero
/* f09a0cc: 920d0690 */ lbu $t5,0x690($s0)
/* f09a0d0: 35a90040 */ ori $t1,$t5,0x40
@@ -5110,7 +5110,7 @@ glabel var7f1ac31c
/* f099dfc: 8fa5003c */ lw $a1,0x3c($sp)
/* f099e00: 1141001e */ beq $t2,$at,.L0f099e7c
/* f099e04: 00000000 */ nop
/* f099e08: 0fc26238 */ jal bgun0f0988e0
/* f099e08: 0fc26238 */ jal bgunStartAnimation
/* f099e0c: 02003025 */ or $a2,$s0,$zero
/* f099e10: 920b06d6 */ lbu $t3,0x6d6($s0)
/* f099e14: 8fa30038 */ lw $v1,0x38($sp)
@@ -5303,7 +5303,7 @@ glabel var7f1ac31c
/* f09a0b8: 8de4000c */ lw $a0,0xc($t7)
/* f09a0bc: 50800007 */ beqzl $a0,.L0f09a0dc
/* f09a0c0: 8e0a060c */ lw $t2,0x60c($s0)
/* f09a0c4: 0fc26238 */ jal bgun0f0988e0
/* f09a0c4: 0fc26238 */ jal bgunStartAnimation
/* f09a0c8: 02003025 */ or $a2,$s0,$zero
/* f09a0cc: 920d0690 */ lbu $t5,0x690($s0)
/* f09a0d0: 35a90040 */ ori $t1,$t5,0x40
@@ -5512,7 +5512,7 @@ glabel var7f1ac31c
// if (func && (func->ammoindex == 0 || func->ammoindex == 1)) {
// if (info->definition->ammos[func->ammoindex]->reload_animation
// && info->weaponnum != WEAPON_COMBATKNIFE) {
// bgun0f0988e0(info->definition->ammos[func->ammoindex]->reload_animation, handnum, hand);
// bgunStartAnimation(info->definition->ammos[func->ammoindex]->reload_animation, handnum, hand);
//
// hand->unk0d0e_07 = true;
//
@@ -5595,7 +5595,7 @@ glabel var7f1ac31c
// if (info->weaponnum == WEAPON_COMBATKNIFE
// && func->ammoindex >= 0
// && info->definition->ammos[func->ammoindex]->reload_animation) {
// bgun0f0988e0(info->definition->ammos[func->ammoindex]->reload_animation, handnum, hand);
// bgunStartAnimation(info->definition->ammos[func->ammoindex]->reload_animation, handnum, hand);
// hand->unk0cc8_02 = true;
// }
//
@@ -5685,7 +5685,7 @@ s32 bgunTickIncChangeFunc(struct handweaponinfo *info, s32 handnum, struct hand
more = false;
if (cmd != NULL) {
bgun0f0988e0(cmd, handnum, hand);
bgunStartAnimation(cmd, handnum, hand);
more = true;
g_Vars.currentplayer->hands[HAND_RIGHT].unk0dd4 = -1;
}
@@ -7131,7 +7131,7 @@ bool bgunTickIncAttackingShoot(struct handweaponinfo *info, s32 handnum, struct
hand->gs_float1 = 0;
if (func->fire_animation) {
bgun0f0988e0(func->fire_animation, handnum, hand);
bgunStartAnimation(func->fire_animation, handnum, hand);
hand->unk0cc8_01 = true;
}
@@ -7233,7 +7233,7 @@ bool bgunTickIncAttackingThrow(s32 handnum, struct hand *hand)
}
if (func->base.fire_animation) {
bgun0f0988e0(func->base.fire_animation, handnum, hand);
bgunStartAnimation(func->base.fire_animation, handnum, hand);
hand->unk0cc8_01 = true;
}
}
@@ -7559,7 +7559,7 @@ bool bgunTickIncAttackingClose(s32 handnum, struct hand *hand)
hand->attacktype = HANDATTACKTYPE_CLOSERANGENOUNCLOAK;
if (func->fire_animation) {
bgun0f0988e0(func->fire_animation, handnum, hand);
bgunStartAnimation(func->fire_animation, handnum, hand);
hand->unk0cc8_01 = true;
}
}
@@ -7706,7 +7706,7 @@ s32 bgunTickIncAttackEmpty(struct handweaponinfo *info, s32 handnum, struct hand
}
if (func && func->fire_animation) {
bgun0f0988e0(func->fire_animation, handnum, hand);
bgunStartAnimation(func->fire_animation, handnum, hand);
restartedanim = true;
}
}
@@ -7991,7 +7991,7 @@ s32 bgunTickIncChangeGun(struct handweaponinfo *info, s32 handnum, struct hand *
&& hand->inuse == true
&& (!hand->unk0d0e_00 || hand->unk0d0e_04)) {
if (hand->statecycles == 0) {
bgun0f0988e0(weapon->unequip_animation, handnum, hand);
bgunStartAnimation(weapon->unequip_animation, handnum, hand);
} else if (hand->animmode == HANDANIMMODE_IDLE) {
hand->stateminor++;
}
@@ -8081,7 +8081,7 @@ s32 bgunTickIncChangeGun(struct handweaponinfo *info, s32 handnum, struct hand *
} else {
if (bgun0f09dd7c()) {
if (info->definition->equip_animation) {
bgun0f0988e0(info->definition->equip_animation, handnum, hand);
bgunStartAnimation(info->definition->equip_animation, handnum, hand);
hand->unk0cc8_02 = true;
}
@@ -11978,7 +11978,7 @@ void bgun0f09fa20(s32 handnum)
struct hand *hand = &g_Vars.currentplayer->hands[handnum];
if (hand->rocket) {
objRemove(&hand->rocket->base, true);
objFreePermanently(&hand->rocket->base, true);
hand->rocket = NULL;
}
}
@@ -16970,13 +16970,13 @@ glabel var7f1ac7c4
/* f0a3100: 27bd0040 */ addiu $sp,$sp,0x40
);
void bgunDetonateRemoteMines(s32 playernum)
void bgunStartDetonateAnimation(s32 playernum)
{
s32 prevplayernum = g_Vars.currentplayernum;
setCurrentPlayerNum(playernum);
if (g_Vars.currentplayer->hands[HAND_LEFT].gset.weaponnum == WEAPON_REMOTEMINE) {
bgun0f0988e0(var80070200, 1, &g_Vars.currentplayer->hands[HAND_LEFT]);
bgunStartAnimation(var80070200, 1, &g_Vars.currentplayer->hands[HAND_LEFT]);
}
setCurrentPlayerNum(prevplayernum);
+2 -2
View File
@@ -4612,7 +4612,7 @@ void func0f020d44(struct prop *prop, bool removechr)
&& obj != eyespyobj
&& (prop->type != PROPTYPE_PLAYER || (obj->flags3 & OBJFLAG3_00400000) == 0)) {
objDetach(child);
objRemove(obj, true);
objFreePermanently(obj, true);
}
child = next;
@@ -6469,7 +6469,7 @@ glabel var7f1a87a8
/* f022258: 02002025 */ or $a0,$s0,$zero
/* f02225c: 24050001 */ addiu $a1,$zero,0x1
/* f022260: 30cf0004 */ andi $t7,$a2,0x4
/* f022264: 0fc1ab4b */ jal objRemove2
/* f022264: 0fc1ab4b */ jal objFree
/* f022268: 01e03025 */ or $a2,$t7,$zero
/* f02226c: 1000007e */ b .L0f022468
/* f022270: 8fbf002c */ lw $ra,0x2c($sp)
+5 -5
View File
@@ -219,7 +219,7 @@ void setupInit(void)
g_CountdownTimerRunning = false;
g_CountdownTimerValue60 = 0;
var80069910 = 0;
g_PlayersDetonatingMines = 0;
g_TintedGlassEnabled = false;
if (var8009ce40 == 0) {
@@ -936,7 +936,7 @@ void weaponAssignToHome(struct weaponobj *weapon, s32 cmdindex)
if (chr && chr->prop && chr->model) {
if (cheatIsActive(CHEAT_MARQUIS)) {
// NTSC 1.0 and newer simplifies the Marqis logic
// NTSC 1.0 and newer simplifies the Marquis logic
#if VERSION >= VERSION_NTSC_1_0
weapon->base.flags &= ~OBJFLAG_DEACTIVATED;
weapon->base.flags |= OBJFLAG_WEAPON_AICANNOTUSE;
@@ -3021,7 +3021,7 @@ void setupParseObjects(s32 stagenum)
break;
case OBJTYPE_TINTEDGLASS:
if (withobjs && (obj->flags2 & diffflag) == 0) {
if (obj->flags & OBJFLAG_DEACTIVATED) {
if (obj->flags & OBJFLAG_GLASS_HASPORTAL) {
struct tintedglassobj *glass = (struct tintedglassobj *)obj;
glass->portalnum = func0f00e1f8(obj->pad);
glass->unk64 = *(s32 *)&glass->unk64 / 65536.0f;
@@ -3133,7 +3133,7 @@ void setupParseObjects(s32 stagenum)
break;
case OBJTYPE_GLASS:
if (withobjs && (obj->flags2 & diffflag) == 0) {
if (obj->flags & OBJFLAG_DEACTIVATED) {
if (obj->flags & OBJFLAG_GLASS_HASPORTAL) {
struct glassobj *glass = (struct glassobj *)obj;
glass->portalnum = func0f00e1f8(obj->pad);
}
@@ -3162,7 +3162,7 @@ void setupParseObjects(s32 stagenum)
step->prevpos.z = prop->pos.z;
}
if (obj->flags & OBJFLAG_DEACTIVATED) {
if (obj->flags & OBJFLAG_ESCSTEP_ZALIGNED) {
step->frame = escstepy;
escstepy += 40;
mtx4LoadYRotation(4.7116389274597f, (Mtxf *)sp1a8);
+1 -1
View File
@@ -43,7 +43,7 @@ void objsReset(void)
case OBJTYPE_HOVERCAR:
case OBJTYPE_CHOPPER:
case OBJTYPE_ESCASTEP:
objRemove((struct defaultobj *) ptr, true);
objFreePermanently((struct defaultobj *) ptr, true);
break;
case OBJTYPE_DOORSCALE:
case OBJTYPE_CHR:
+2 -2
View File
@@ -15396,11 +15396,11 @@ s32 playerTick(struct prop *prop)
if (g_Vars.mplayerisrunning) {
if (chr->weapons_held[0] && (chr->weapons_held[0]->obj->hidden & OBJHFLAG_REAPABLE)) {
objRemove2(chr->weapons_held[0]->obj, true, false);
objFree(chr->weapons_held[0]->obj, true, false);
}
if (chr->weapons_held[1] && (chr->weapons_held[1]->obj->hidden & OBJHFLAG_REAPABLE)) {
objRemove2(chr->weapons_held[1]->obj, true, false);
objFree(chr->weapons_held[1]->obj, true, false);
}
}
+8 -8
View File
@@ -986,7 +986,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
func0f0939f8(NULL, prop, SFX_PICKUP_AMMO, -1,
-1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1);
objRemove2(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
if (qty) {
dprint();
@@ -1037,7 +1037,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
func0f0939f8(NULL, prop, SFX_PICKUP_AMMO, -1,
-1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1);
objRemove2(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
}
return 2;
case OBJTYPE_WEAPON:
@@ -1078,7 +1078,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
result = 1;
}
objRemove2(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
}
return result;
@@ -1091,7 +1091,7 @@ u32 propobjHandlePickupByAibot(struct prop *prop, struct chrdata *chr)
-1, 1024, 0, 0, 0, -1, 0, -1, -1, -1, -1);
chrSetShield(chr, shield->amount * 8);
objRemove2(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
}
return 3;
case OBJTYPE_BASIC:
@@ -1294,7 +1294,7 @@ glabel var7f1b3480nb
/* f18aa1c: 00002825 */ or $a1,$zero,$zero
/* f18aa20: 90860002 */ lbu $a2,0x2($a0)
/* f18aa24: 30cf0004 */ andi $t7,$a2,0x4
/* f18aa28: 0fc1a7e4 */ jal objRemove2
/* f18aa28: 0fc1a7e4 */ jal objFree
/* f18aa2c: 01e03025 */ or $a2,$t7,$zero
/* f18aa30: 12000003 */ beqz $s0,.NB0f18aa40
/* f18aa34: 00000000 */ sll $zero,$zero,0x0
@@ -1351,7 +1351,7 @@ glabel var7f1b3480nb
/* f18aaf0: 00002825 */ or $a1,$zero,$zero
/* f18aaf4: 90860002 */ lbu $a2,0x2($a0)
/* f18aaf8: 30cc0004 */ andi $t4,$a2,0x4
/* f18aafc: 0fc1a7e4 */ jal objRemove2
/* f18aafc: 0fc1a7e4 */ jal objFree
/* f18ab00: 01803025 */ or $a2,$t4,$zero
/* f18ab04: 10000070 */ beqz $zero,.NB0f18acc8
/* f18ab08: 24020002 */ addiu $v0,$zero,0x2
@@ -1429,7 +1429,7 @@ glabel var7f1b3480nb
/* f18ac10: 00002825 */ or $a1,$zero,$zero
/* f18ac14: 90860002 */ lbu $a2,0x2($a0)
/* f18ac18: 30ca0004 */ andi $t2,$a2,0x4
/* f18ac1c: 0fc1a7e4 */ jal objRemove2
/* f18ac1c: 0fc1a7e4 */ jal objFree
/* f18ac20: 01403025 */ or $a2,$t2,$zero
/* f18ac24: 10000028 */ beqz $zero,.NB0f18acc8
/* f18ac28: 02001025 */ or $v0,$s0,$zero
@@ -1467,7 +1467,7 @@ glabel var7f1b3480nb
/* f18aca8: 00002825 */ or $a1,$zero,$zero
/* f18acac: 90860002 */ lbu $a2,0x2($a0)
/* f18acb0: 30ce0004 */ andi $t6,$a2,0x4
/* f18acb4: 0fc1a7e4 */ jal objRemove2
/* f18acb4: 0fc1a7e4 */ jal objFree
/* f18acb8: 01c03025 */ or $a2,$t6,$zero
/* f18acbc: 10000002 */ beqz $zero,.NB0f18acc8
/* f18acc0: 24020003 */ addiu $v0,$zero,0x3
+5 -5
View File
@@ -10449,7 +10449,7 @@ glabel chrGiveBriefcase
.PF0f187b48:
/* f187b48: 00002825 */ move $a1,$zero
/* f187b4c: 30cf0004 */ andi $t7,$a2,0x4
/* f187b50: 0fc1abed */ jal objRemove2
/* f187b50: 0fc1abed */ jal objFree
/* f187b54: 01e03025 */ move $a2,$t7
/* f187b58: 100001af */ b .PF0f188218
/* f187b5c: 24020001 */ li $v0,0x1
@@ -10910,7 +10910,7 @@ glabel chrGiveBriefcase
/* f1881c4: 00002825 */ move $a1,$zero
/* f1881c8: 90860002 */ lbu $a2,0x2($a0)
/* f1881cc: 30ca0004 */ andi $t2,$a2,0x4
/* f1881d0: 0fc1abed */ jal objRemove2
/* f1881d0: 0fc1abed */ jal objFree
/* f1881d4: 01403025 */ move $a2,$t2
/* f1881d8: 1000000f */ b .PF0f188218
/* f1881dc: 24020001 */ li $v0,0x1
@@ -11134,7 +11134,7 @@ glabel chrGiveBriefcase
.L0f186b44:
/* f186b44: 00002825 */ or $a1,$zero,$zero
/* f186b48: 30cf0004 */ andi $t7,$a2,0x4
/* f186b4c: 0fc1ab4b */ jal objRemove2
/* f186b4c: 0fc1ab4b */ jal objFree
/* f186b50: 01e03025 */ or $a2,$t7,$zero
/* f186b54: 100001c7 */ b .L0f187274
/* f186b58: 24020001 */ addiu $v0,$zero,0x1
@@ -11619,7 +11619,7 @@ glabel chrGiveBriefcase
/* f187220: 00002825 */ or $a1,$zero,$zero
/* f187224: 90860002 */ lbu $a2,0x2($a0)
/* f187228: 30ca0004 */ andi $t2,$a2,0x4
/* f18722c: 0fc1ab4b */ jal objRemove2
/* f18722c: 0fc1ab4b */ jal objFree
/* f187230: 01403025 */ or $a2,$t2,$zero
/* f187234: 1000000f */ b .L0f187274
/* f187238: 24020001 */ addiu $v0,$zero,0x1
@@ -12516,7 +12516,7 @@ s32 chrGiveUplink(struct chrdata *chr, struct prop *prop)
weaponPlayPickupSound(WEAPON_DATAUPLINK);
#if VERSION >= VERSION_NTSC_1_0
objRemove2(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
objFree(obj, false, obj->hidden2 & OBJH2FLAG_CANREGEN);
return 1;
#else
return 4;
+2 -2
View File
@@ -3817,7 +3817,7 @@ Gfx *nbombsRender(Gfx *gdl)
return gdl;
}
void nbombCreate(struct coord *pos, struct prop *prop)
void nbombCreateStorm(struct coord *pos, struct prop *ownerprop)
{
u32 stack;
s32 oldest240 = -1;
@@ -3849,7 +3849,7 @@ void nbombCreate(struct coord *pos, struct prop *prop)
g_Nbombs[index].pos.y = pos->y;
g_Nbombs[index].pos.z = pos->z;
g_Nbombs[index].age240 = 0;
g_Nbombs[index].prop = prop;
g_Nbombs[index].ownerprop = ownerprop;
#if VERSION >= VERSION_NTSC_1_0
// Newer versions only play audio if the handles are null,
+1 -1
View File
@@ -4625,7 +4625,7 @@ glabel propsTick
// bool done; // 4c
// s32 i;
//
// g_Vars.unk00043c = 0;
// g_Vars.hardfreeabletally = 0;
//
//#if VERSION >= VERSION_NTSC_1_0
// var8009cdac = 0;
+504 -89
View File
File diff suppressed because it is too large Load Diff
+7 -7
View File
@@ -2083,7 +2083,7 @@ void frInitTargets(void)
if (prop) {
obj = prop->obj;
objRemove2(obj, false, true);
objFree(obj, false, true);
obj->damage = 0;
prop->timetoregen = 0;
@@ -2190,7 +2190,7 @@ glabel var7f1b3a44
/* f1984e4: 00002825 */ or $a1,$zero,$zero
/* f1984e8: 24060001 */ addiu $a2,$zero,0x1
/* f1984ec: 8e510004 */ lw $s1,0x4($s2)
/* f1984f0: 0fc1a7e4 */ jal objRemove2
/* f1984f0: 0fc1a7e4 */ jal objFree
/* f1984f4: 02202025 */ or $a0,$s1,$zero
/* f1984f8: a620004c */ sh $zero,0x4c($s1)
/* f1984fc: a6400002 */ sh $zero,0x2($s2)
@@ -2662,7 +2662,7 @@ void frEndSession(bool hidetargets)
}
if (g_ThrownLaptops[0].base.prop) {
objRemove(&g_ThrownLaptops[0].base, true);
objFreePermanently(&g_ThrownLaptops[0].base, true);
}
roomsCopy(g_Vars.currentplayer->prop->rooms, rooms);
@@ -2685,7 +2685,7 @@ void frEndSession(bool hidetargets)
if (prop->type == PROPTYPE_WEAPON) {
if (obj->type == OBJTYPE_AUTOGUN) {
objRemove(obj, true);
objFreePermanently(obj, true);
}
if (obj->type == OBJTYPE_WEAPON) {
@@ -2704,7 +2704,7 @@ void frEndSession(bool hidetargets)
|| weapon->weaponnum == WEAPON_SKROCKET
|| (weapon->weaponnum == WEAPON_DRAGON && weapon->gunfunc == FUNC_SECONDARY)
|| (weapon->weaponnum == WEAPON_LAPTOPGUN && weapon->gunfunc == FUNC_SECONDARY)) {
objRemove(obj, true);
objFreePermanently(obj, true);
}
}
}
@@ -7450,7 +7450,7 @@ void dtRestorePlayer(void)
bgunSetPassiveMode(true);
if (g_DtData.obj) {
objRemove(g_DtData.obj, true);
objFreePermanently(g_DtData.obj, true);
}
g_DtData.obj = NULL;
@@ -7869,7 +7869,7 @@ void htEnd(void)
struct defaultobj *obj = prop->obj;
if (obj->type == OBJTYPE_WEAPON) {
objRemove(obj, true);
objFreePermanently(obj, true);
}
}
+52 -48
View File
@@ -729,7 +729,9 @@
#define EXPLOSIONTYPE_12 12
#define EXPLOSIONTYPE_13 13
#define EXPLOSIONTYPE_14 14
#define EXPLOSIONTYPE_17 17
#define EXPLOSIONTYPE_18 18
#define EXPLOSIONTYPE_21 21
#define EXPLOSIONTYPE_22 22
#define EXPLOSIONTYPE_23 23
#define EXPLOSIONTYPE_25 25
@@ -857,7 +859,7 @@
#define FUNC_PRIMARY 0
#define FUNC_SECONDARY 1
#define FUNC_2 2
#define FUNC_POISON 3 // Internal function for delivering knife poison periodically
#define FUNC_POISON 3 // Internal function for delivering knife poison periodically
#define FUNCFLAG_BURST3 0x00000002
#define FUNCFLAG_BURST50 0x00000020 // automatics only
@@ -2803,51 +2805,53 @@
#define OBJECTIVEFLAG_AUTOCOMPLETE 0x01
// obj->flags
#define OBJFLAG_00000001 0x00000001 // Editor: "Fall to Ground"
#define OBJFLAG_00000002 0x00000002 // Editor: "In Air Rotated 90 Deg Upside-Down"
#define OBJFLAG_00000004 0x00000004 // Editor: "In Air Upside-Down"
#define OBJFLAG_00000008 0x00000008 // Editor: "In Air"
#define OBJFLAG_00000010 0x00000010 // Editor: "Scale to Pad Bounds"
#define OBJFLAG_00000020 0x00000020 // Editor: "X to Pad Bounds"
#define OBJFLAG_00000040 0x00000040 // Editor: "Y to Pad Bounds"
#define OBJFLAG_00000080 0x00000080 // Editor: "Z to Pad Bounds"
#define OBJFLAG_00000100 0x00000100 // G5 mines, Air Base brown door, AF1 grate and escape door, Defense shuttle, Ruins mines, MBR lift door. Editor suggests "Force Collisions" but this seems wrong
#define OBJFLAG_00000200 0x00000200 // Editor: "Special Environment Mapping"
#define OBJFLAG_ILLUMINATED 0x00000400
#define OBJFLAG_00000800 0x00000800 // Editor: "Free Standing Glass"
#define OBJFLAG_00001000 0x00001000 // Editor: "Absolute Position"
#define OBJFLAG_00002000 0x00002000 // AF1 commhubs. Editor suggests "Weapon Not Dropped"
#define OBJFLAG_ASSIGNEDTOCHR 0x00004000
#define OBJFLAG_00008000 0x00008000 // Editor: "Embedded Object"
#define OBJFLAG_00010000 0x00010000 // Not used in scripts
#define OBJFLAG_INVINCIBLE 0x00020000
#define OBJFLAG_COLLECTABLE 0x00040000
#define OBJFLAG_THROWNLAPTOP 0x00080000
#define OBJFLAG_UNCOLLECTABLE 0x00100000
#define OBJFLAG_00200000 0x00200000 // Editor: "Bounce and Destroy If Shot"
#define OBJFLAG_00400000 0x00400000 // Not used in scripts
#define OBJFLAG_00800000 0x00800000 // Not used in scripts
#define OBJFLAG_01000000 0x01000000 // Editor: "Embedded Object"
#define OBJFLAG_CANNOT_ACTIVATE 0x02000000 // Makes it do nothing if player presses B on object. Used mostly for doors.
#define OBJFLAG_04000000 0x04000000 // Editor: "AI Sees Through Door/Object"
#define OBJFLAG_08000000 0x08000000 // Not used in scripts
#define OBJFLAG_DEACTIVATED 0x10000000
#define OBJFLAG_DOOR_HASPORTAL 0x10000000
#define OBJFLAG_WEAPON_LEFTHANDED 0x10000000
#define OBJFLAG_ESCSTEP_ZALIGNED 0x10000000
#define OBJFLAG_20000000 0x20000000 // Editor: "Door Opens Backwards/Special Function/Conceal Weapon"
#define OBJFLAG_CAMERA_DISABLED 0x20000000
#define OBJFLAG_DOOR_OPENTOFRONT 0x20000000
#define OBJFLAG_HOVERCAR_20000000 0x20000000
#define OBJFLAG_WEAPON_AICANNOTUSE 0x20000000
#define OBJFLAG_40000000 0x40000000
#define OBJFLAG_AUTOGUN_ALERTED 0x40000000
#define OBJFLAG_CAMERA_BONDINVIEW 0x40000000
#define OBJFLAG_DOOR_KEEPOPEN 0x40000000 // Editor: "Door open by default/Empty weapon"
#define OBJFLAG_LIFT_TRIGGERDISABLE 0x40000000
#define OBJFLAG_80000000 0x80000000
#define OBJFLAG_DOOR_TWOWAY 0x80000000 // Door swings in both directions
#define OBJFLAG_CHOPPER_INACTIVE 0x80000000 // Or lift disabled, or hovercar something
#define OBJFLAG_00000001 0x00000001 // Editor: "Fall to Ground"
#define OBJFLAG_00000002 0x00000002 // Editor: "In Air Rotated 90 Deg Upside-Down"
#define OBJFLAG_00000004 0x00000004 // Editor: "In Air Upside-Down"
#define OBJFLAG_00000008 0x00000008 // Editor: "In Air"
#define OBJFLAG_00000010 0x00000010 // Editor: "Scale to Pad Bounds"
#define OBJFLAG_00000020 0x00000020 // Editor: "X to Pad Bounds"
#define OBJFLAG_00000040 0x00000040 // Editor: "Y to Pad Bounds"
#define OBJFLAG_00000080 0x00000080 // Editor: "Z to Pad Bounds"
#define OBJFLAG_00000100 0x00000100 // G5 mines, Air Base brown door, AF1 grate and escape door, Defense shuttle, Ruins mines, MBR lift door. Editor suggests "Force Collisions" but this seems wrong
#define OBJFLAG_00000200 0x00000200 // Editor: "Special Environment Mapping"
#define OBJFLAG_ILLUMINATED 0x00000400
#define OBJFLAG_00000800 0x00000800 // Editor: "Free Standing Glass"
#define OBJFLAG_00001000 0x00001000 // Editor: "Absolute Position"
#define OBJFLAG_00002000 0x00002000 // AF1 commhubs. Editor suggests "Weapon Not Dropped"
#define OBJFLAG_ASSIGNEDTOCHR 0x00004000
#define OBJFLAG_00008000 0x00008000 // Editor: "Embedded Object"
#define OBJFLAG_00010000 0x00010000 // Not used in scripts
#define OBJFLAG_INVINCIBLE 0x00020000
#define OBJFLAG_COLLECTABLE 0x00040000
#define OBJFLAG_THROWNLAPTOP 0x00080000
#define OBJFLAG_UNCOLLECTABLE 0x00100000
#define OBJFLAG_00200000 0x00200000 // Editor: "Bounce and Destroy If Shot"
#define OBJFLAG_00400000 0x00400000 // Not used in scripts
#define OBJFLAG_00800000 0x00800000 // Not used in scripts
#define OBJFLAG_01000000 0x01000000 // Editor: "Embedded Object"
#define OBJFLAG_CANNOT_ACTIVATE 0x02000000 // Makes it do nothing if player presses B on object. Used mostly for doors.
#define OBJFLAG_04000000 0x04000000 // Editor: "AI Sees Through Door/Object"
#define OBJFLAG_08000000 0x08000000 // Not used in scripts
#define OBJFLAG_DEACTIVATED 0x10000000
#define OBJFLAG_AMMOCRATE_EXPLODENOW 0x10000000
#define OBJFLAG_DOOR_HASPORTAL 0x10000000
#define OBJFLAG_GLASS_HASPORTAL 0x10000000
#define OBJFLAG_WEAPON_LEFTHANDED 0x10000000
#define OBJFLAG_ESCSTEP_ZALIGNED 0x10000000
#define OBJFLAG_20000000 0x20000000 // Editor: "Door Opens Backwards/Special Function/Conceal Weapon"
#define OBJFLAG_CAMERA_DISABLED 0x20000000
#define OBJFLAG_DOOR_OPENTOFRONT 0x20000000
#define OBJFLAG_HOVERCAR_20000000 0x20000000
#define OBJFLAG_WEAPON_AICANNOTUSE 0x20000000
#define OBJFLAG_40000000 0x40000000
#define OBJFLAG_AUTOGUN_ALERTED 0x40000000
#define OBJFLAG_CAMERA_BONDINVIEW 0x40000000
#define OBJFLAG_DOOR_KEEPOPEN 0x40000000 // Editor: "Door open by default/Empty weapon"
#define OBJFLAG_LIFT_TRIGGERDISABLE 0x40000000
#define OBJFLAG_80000000 0x80000000
#define OBJFLAG_DOOR_TWOWAY 0x80000000 // Door swings in both directions
#define OBJFLAG_CHOPPER_INACTIVE 0x80000000 // Or lift disabled, or hovercar something
// obj->flags2
#define OBJFLAG2_00000001 0x00000001 // Used only in CI Training
@@ -2891,8 +2895,8 @@
#define OBJFLAG3_00000010 0x00000010 // Used heaps
#define OBJFLAG3_AUTOCUTSCENESOUNDS 0x00000020 // For doors and objs - play default open/close noises
#define OBJFLAG3_RTRACKED_YELLOW 0x00000040
#define OBJFLAG3_00000080 0x00000080 // Not used in scripts
#define OBJFLAG3_00000100 0x00000100 // Not used in scripts
#define OBJFLAG3_CANHARDFREE 0x00000080
#define OBJFLAG3_HARDFREEING 0x00000100
#define OBJFLAG3_00000200 0x00000200 // Not used in scripts
#define OBJFLAG3_WALKTHROUGH 0x00000400
#define OBJFLAG3_RTRACKED_BLUE 0x00000800
+1 -1
View File
@@ -207,7 +207,7 @@ extern struct sndstate *g_GasAudioHandle;
extern u32 g_CountdownTimerOff;
extern bool g_CountdownTimerRunning;
extern f32 g_CountdownTimerValue60;
extern u32 var80069910;
extern u32 g_PlayersDetonatingMines;
extern u32 var80069914;
extern u32 var80069918;
extern struct linkliftdoorobj *g_LiftDoors;
+2 -2
View File
@@ -14,7 +14,7 @@ void bgun0f098030(struct hand *hand, struct modelfiledata *arg1);
f32 bgun0f09815c(struct hand *hand);
u32 bgun0f0981e8(void);
bool bgun0f098884(struct guncmd *cmd, struct gset *gset);
void bgun0f0988e0(struct guncmd *cmd, s32 handnum, struct hand *hand);
void bgunStartAnimation(struct guncmd *cmd, s32 handnum, struct hand *hand);
bool bgun0f098a44(struct hand *hand, s32 time);
bool bgunIsAnimBusy(struct hand *hand);
void bgunResetAnim(struct hand *hand);
@@ -116,7 +116,7 @@ bool bgunIsMissionCritical(s32 weaponnum);
void bgunLoseGun(struct prop *attacker);
u32 bgun0f0a2da8(void);
u32 bgun0f0a2e94(void);
void bgunDetonateRemoteMines(s32 playernum);
void bgunStartDetonateAnimation(s32 playernum);
u32 bgun0f0a3160(void);
u32 bgun0f0a3490(void);
u32 bgun0f0a37b4(void);
+1 -1
View File
@@ -16,7 +16,7 @@ void nbombInflictDamage(struct nbomb *nbomb);
void nbombTick(struct nbomb *nbomb);
void nbombsTick(void);
Gfx *nbombsRender(Gfx *gdl);
void nbombCreate(struct coord *pos, struct prop *prop);
void nbombCreateStorm(struct coord *pos, struct prop *prop);
f32 gasGetDoorFrac(s32 tagnum);
Gfx *func0f00a490(Gfx *gdl);
Gfx *gasRender(Gfx *gdl);
+1 -1
View File
@@ -15,7 +15,7 @@ void nbombInflictDamage(struct nbomb *nbomb);
void nbombTick(struct nbomb *nbomb);
void nbombsTick(void);
Gfx *nbombsRender(Gfx *gdl);
void nbombCreate(struct coord *pos, struct prop *prop);
void nbombCreateStorm(struct coord *pos, struct prop *ownerprop);
f32 gasGetDoorFrac(s32 tagnum);
Gfx *func0f00a490(Gfx *gdl);
Gfx *gasRender(Gfx *gdl);
+6 -6
View File
@@ -36,7 +36,7 @@ u32 func0f0667b4(void);
f32 modelBboxGetYMin(struct modelrodata_bbox *bbox);
u32 func0f0667c4(void);
u32 func0f0667cc(void);
u32 func0f0667d4(void);
f32 func0f0667d4(struct modelrodata_bbox *bbox);
u32 func0f0667dc(void);
u32 func0f06680c(void);
u32 func0f06683c(void);
@@ -106,8 +106,8 @@ void func0f06a730(struct defaultobj *obj, struct pad *newpad, Mtxf *matrix, s16
u32 func0f06ab60(void);
void objEndFlight(struct defaultobj *obj);
void func0f06ac90(struct prop *prop);
void objRemove2(struct defaultobj *obj, bool freeprop, bool regen);
void objRemove(struct defaultobj *obj, bool freeprop);
void objFree(struct defaultobj *obj, bool freeprop, bool canregen);
void objFreePermanently(struct defaultobj *obj, bool freeprop);
u32 func0f06b36c(void);
bool func0f06b39c(struct coord *arg0, struct coord *arg1, struct coord *arg2, f32 arg3);
u32 func0f06b488(void);
@@ -128,9 +128,9 @@ u32 func0f06ec20(void);
u32 func0f06ed64(void);
u32 func0f06ef44(void);
u32 func0f06f0a0(void);
void func0f06f314(struct prop *prop, u32 explosiontype);
void func0f06f504(struct prop *ammocrate);
void func0f06f54c(struct prop *weapon);
bool propExplode(struct prop *prop, s32 explosiontype);
void ammocrateTick(struct prop *ammocrate);
void weaponTick(struct prop *weapon);
void func0f07063c(struct prop *prop, bool arg1);
void func0f070698(struct prop *prop, bool arg1);
void func0f0706f8(struct prop *prop, bool arg1);
+7 -7
View File
@@ -192,7 +192,7 @@ struct g_vars {
/*000430*/ struct chopperobj *hovercar;
/*000434*/ u8 *ailist;
/*000438*/ u32 aioffset;
/*00043c*/ u32 unk00043c;
/*00043c*/ s32 hardfreeabletally;
/*000440*/ s32 antiheadnum;
/*000444*/ s32 antibodynum;
/*000448*/ s32 coopradaron;
@@ -1485,9 +1485,9 @@ struct projectile {
/*0x028*/ u32 unk028;
/*0x02c*/ u32 unk02c;
/*0x030*/ u32 unk030;
/*0x034*/ u32 unk034;
/*0x038*/ u32 unk038;
/*0x03c*/ u32 unk03c;
/*0x034*/ f32 unk034;
/*0x038*/ f32 unk038;
/*0x03c*/ f32 unk03c;
/*0x040*/ u32 unk040;
/*0x044*/ struct projectile *unk044;
/*0x048*/ u32 unk048;
@@ -1508,7 +1508,7 @@ struct projectile {
/*0x084*/ u32 unk084;
/*0x088*/ struct prop *ownerprop;
/*0x08c*/ f32 unk08c;
/*0x090*/ u32 unk090;
/*0x090*/ s32 unk090;
/*0x094*/ s32 unk094;
/*0x098*/ f32 unk098;
/*0x09c*/ s32 unk09c;
@@ -1716,7 +1716,7 @@ struct weaponobj { // objtype 0x08
/*0x5d*/ s8 unk5d;
/*0x5e*/ s8 unk5e;
/*0x5f*/ u8 gunfunc;
/*0x60*/ s8 unk60;
/*0x60*/ s8 fadeouttimer60;
/*0x61*/ s8 dualweaponnum;
/**
@@ -6818,7 +6818,7 @@ struct nbomb {
f32 radius;
s16 unk14;
f32 unk18;
struct prop *prop;
struct prop *ownerprop;
struct sndstate *audiohandle20;
struct sndstate *audiohandle24;
};