diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index aee466eb3..c8c97d19c 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -18300,1131 +18300,176 @@ void chrAttackAmountUpdateAnimation(struct chrdata *chr) } } -#if VERSION >= VERSION_PAL_FINAL -GLOBAL_ASM( -glabel func0f041e48 -.late_rodata -glabel var7f1aa3ecpf -.word 0x3d2aaaab -glabel var7f1aa3f0pf -.word 0x40c907a9 -glabel var7f1aa3f4pf -.word 0x3f555555 -.text -/* f041fec: 27bdff90 */ addiu $sp,$sp,-112 -/* f041ff0: afbf0044 */ sw $ra,0x44($sp) -/* f041ff4: afb30040 */ sw $s3,0x40($sp) -/* f041ff8: afb2003c */ sw $s2,0x3c($sp) -/* f041ffc: afb10038 */ sw $s1,0x38($sp) -/* f042000: afb00034 */ sw $s0,0x34($sp) -/* f042004: f7b80028 */ sdc1 $f24,0x28($sp) -/* f042008: f7b60020 */ sdc1 $f22,0x20($sp) -/* f04200c: f7b40018 */ sdc1 $f20,0x18($sp) -/* f042010: 8c930020 */ lw $s3,0x20($a0) -/* f042014: 00808025 */ move $s0,$a0 -/* f042018: 0c0073d3 */ jal modelGetCurAnimFrame -/* f04201c: 02602025 */ move $a0,$s3 -/* f042020: 46000506 */ mov.s $f20,$f0 -/* f042024: 0c0073c3 */ jal modelGetAnimNum -/* f042028: 02602025 */ move $a0,$s3 -/* f04202c: 24010269 */ li $at,0x269 -/* f042030: 504101e2 */ beql $v0,$at,.PF0f0427bc -/* f042034: 8fbf0044 */ lw $ra,0x44($sp) -/* f042038: 8e0f0044 */ lw $t7,0x44($s0) -/* f04203c: 8e0e0048 */ lw $t6,0x48($s0) -/* f042040: 25f8ffe7 */ addiu $t8,$t7,-25 -/* f042044: 01d8082a */ slt $at,$t6,$t8 -/* f042048: 50200051 */ beqzl $at,.PF0f042190 -/* f04204c: 3c013f00 */ lui $at,0x3f00 -/* f042050: 8e790020 */ lw $t9,0x20($s3) -/* f042054: 87280002 */ lh $t0,0x2($t9) -/* f042058: 5500004d */ bnezl $t0,.PF0f042190 -/* f04205c: 3c013f00 */ lui $at,0x3f00 -/* f042060: 8e05002c */ lw $a1,0x2c($s0) -/* f042064: 3c014120 */ lui $at,0x4120 -/* f042068: 44813000 */ mtc1 $at,$f6 -/* f04206c: c4a40018 */ lwc1 $f4,0x18($a1) -/* f042070: 46062200 */ add.s $f8,$f4,$f6 -/* f042074: 4614403c */ c.lt.s $f8,$f20 -/* f042078: 00000000 */ nop -/* f04207c: 45020044 */ bc1fl .PF0f042190 -/* f042080: 3c013f00 */ lui $at,0x3f00 -/* f042084: c4aa001c */ lwc1 $f10,0x1c($a1) -/* f042088: 460aa03c */ c.lt.s $f20,$f10 -/* f04208c: 00000000 */ nop -/* f042090: 4502003f */ bc1fl .PF0f042190 -/* f042094: 3c013f00 */ lui $at,0x3f00 -/* f042098: 4480b000 */ mtc1 $zero,$f22 -/* f04209c: c4a00024 */ lwc1 $f0,0x24($a1) -/* f0420a0: 4616003c */ c.lt.s $f0,$f22 -/* f0420a4: 00000000 */ nop -/* f0420a8: 45030006 */ bc1tl .PF0f0420c4 -/* f0420ac: 82090036 */ lb $t1,0x36($s0) -/* f0420b0: 4600a03c */ c.lt.s $f20,$f0 -/* f0420b4: 00000000 */ nop -/* f0420b8: 45020035 */ bc1fl .PF0f042190 -/* f0420bc: 3c013f00 */ lui $at,0x3f00 -/* f0420c0: 82090036 */ lb $t1,0x36($s0) -.PF0f0420c4: -/* f0420c4: 15200029 */ bnez $t1,.PF0f04216c -/* f0420c8: 00000000 */ nop -/* f0420cc: 0fc1077a */ jal func0f041c44 -/* f0420d0: 02002025 */ move $a0,$s0 -/* f0420d4: 14400023 */ bnez $v0,.PF0f042164 -/* f0420d8: 00000000 */ nop -/* f0420dc: 0c0073c3 */ jal modelGetAnimNum -/* f0420e0: 02602025 */ move $a0,$s3 -/* f0420e4: 3c013f00 */ lui $at,0x3f00 -/* f0420e8: 4481c000 */ mtc1 $at,$f24 -/* f0420ec: 00028c00 */ sll $s1,$v0,0x10 -/* f0420f0: 00115403 */ sra $t2,$s1,0x10 -/* f0420f4: 3c063f4c */ lui $a2,0x3f4c -/* f0420f8: 4405c000 */ mfc1 $a1,$f24 -/* f0420fc: 34c6cccd */ ori $a2,$a2,0xcccd -/* f042100: 01408825 */ move $s1,$t2 -/* f042104: 0fc0b89f */ jal chrGetRangedSpeed -/* f042108: 02002025 */ move $a0,$s0 -/* f04210c: 8e6c0020 */ lw $t4,0x20($s3) -/* f042110: 8e0d002c */ lw $t5,0x2c($s0) -/* f042114: 3c014100 */ lui $at,0x4100 -/* f042118: 44818000 */ mtc1 $at,$f16 -/* f04211c: 00112c00 */ sll $a1,$s1,0x10 -/* f042120: 00055c03 */ sra $t3,$a1,0x10 -/* f042124: 81860008 */ lb $a2,0x8($t4) -/* f042128: 8da7001c */ lw $a3,0x1c($t5) -/* f04212c: e7a00010 */ swc1 $f0,0x10($sp) -/* f042130: 01602825 */ move $a1,$t3 -/* f042134: 02602025 */ move $a0,$s3 -/* f042138: 0c0076a7 */ jal modelSetAnimation -/* f04213c: e7b00014 */ swc1 $f16,0x14($sp) -/* f042140: 8e0f002c */ lw $t7,0x2c($s0) -/* f042144: c5e00014 */ lwc1 $f0,0x14($t7) -/* f042148: 4600b03e */ c.le.s $f22,$f0 -/* f04214c: 00000000 */ nop -/* f042150: 45000004 */ bc1f .PF0f042164 -/* f042154: 00000000 */ nop -/* f042158: 44050000 */ mfc1 $a1,$f0 -/* f04215c: 0c0076fb */ jal modelSetAnimEndFrame -/* f042160: 02602025 */ move $a0,$s3 -.PF0f042164: -/* f042164: 10000004 */ b .PF0f042178 -/* f042168: 820e0034 */ lb $t6,0x34($s0) -.PF0f04216c: -/* f04216c: 0fc107b7 */ jal chrAttackAmountUpdateAnimation -/* f042170: 02002025 */ move $a0,$s0 -/* f042174: 820e0034 */ lb $t6,0x34($s0) -.PF0f042178: -/* f042178: 02602025 */ move $a0,$s3 -/* f04217c: 25d80001 */ addiu $t8,$t6,0x1 -/* f042180: 0c0073d3 */ jal modelGetCurAnimFrame -/* f042184: a2180033 */ sb $t8,0x33($s0) -/* f042188: 46000506 */ mov.s $f20,$f0 -/* f04218c: 3c013f00 */ lui $at,0x3f00 -.PF0f042190: -/* f042190: 4481c000 */ mtc1 $at,$f24 -/* f042194: 4480b000 */ mtc1 $zero,$f22 -/* f042198: 0c0073dc */ jal modelGetAnimEndFrame -/* f04219c: 02602025 */ move $a0,$s3 -/* f0421a0: 4614003e */ c.le.s $f0,$f20 -/* f0421a4: 00000000 */ nop -/* f0421a8: 45000080 */ bc1f .PF0f0423ac -/* f0421ac: 00000000 */ nop -/* f0421b0: 0c0073c3 */ jal modelGetAnimNum -/* f0421b4: 02602025 */ move $a0,$s3 -/* f0421b8: 2401026a */ li $at,0x26a -/* f0421bc: 50410018 */ beql $v0,$at,.PF0f042220 -/* f0421c0: 82020033 */ lb $v0,0x33($s0) -/* f0421c4: 82190037 */ lb $t9,0x37($s0) -/* f0421c8: 17200006 */ bnez $t9,.PF0f0421e4 -/* f0421cc: 00000000 */ nop -/* f0421d0: 82080034 */ lb $t0,0x34($s0) -/* f0421d4: 82090033 */ lb $t1,0x33($s0) -/* f0421d8: 0109082a */ slt $at,$t0,$t1 -/* f0421dc: 50200010 */ beqzl $at,.PF0f042220 -/* f0421e0: 82020033 */ lb $v0,0x33($s0) -.PF0f0421e4: -/* f0421e4: 0fc1077a */ jal func0f041c44 -/* f0421e8: 02002025 */ move $a0,$s0 -/* f0421ec: 1440006c */ bnez $v0,.PF0f0423a0 -/* f0421f0: 00000000 */ nop -/* f0421f4: 8e0a004c */ lw $t2,0x4c($s0) -/* f0421f8: 314b0200 */ andi $t3,$t2,0x200 -/* f0421fc: 11600003 */ beqz $t3,.PF0f04220c -/* f042200: 00000000 */ nop -/* f042204: 0fc0e5cc */ jal chrRecordLastSeeTargetTime -/* f042208: 02002025 */ move $a0,$s0 -.PF0f04220c: -/* f04220c: 0fc0bb9f */ jal chrStop -/* f042210: 02002025 */ move $a0,$s0 -/* f042214: 10000169 */ b .PF0f0427bc -/* f042218: 8fbf0044 */ lw $ra,0x44($sp) -/* f04221c: 82020033 */ lb $v0,0x33($s0) -.PF0f042220: -/* f042220: 820c0034 */ lb $t4,0x34($s0) -/* f042224: 02002025 */ move $a0,$s0 -/* f042228: 244d0001 */ addiu $t5,$v0,0x1 -/* f04222c: 55820006 */ bnel $t4,$v0,.PF0f042248 -/* f042230: 820f0031 */ lb $t7,0x31($s0) -/* f042234: 0fc107b7 */ jal chrAttackAmountUpdateAnimation -/* f042238: a20d0033 */ sb $t5,0x33($s0) -/* f04223c: 10000058 */ b .PF0f0423a0 -/* f042240: 00000000 */ nop -/* f042244: 820f0031 */ lb $t7,0x31($s0) -.PF0f042248: -/* f042248: 3c014140 */ lui $at,0x4140 -/* f04224c: 02602025 */ move $a0,$s3 -/* f042250: 11e00053 */ beqz $t7,.PF0f0423a0 -/* f042254: 00000000 */ nop -/* f042258: 820e0036 */ lb $t6,0x36($s0) -/* f04225c: 4600c086 */ mov.s $f2,$f24 -/* f042260: 51c00014 */ beqzl $t6,.PF0f0422b4 -/* f042264: 8e05002c */ lw $a1,0x2c($s0) -/* f042268: 8e05002c */ lw $a1,0x2c($s0) -/* f04226c: c4a00020 */ lwc1 $f0,0x20($a1) -/* f042270: 4600b03c */ c.lt.s $f22,$f0 -/* f042274: 00000000 */ nop -/* f042278: 45020004 */ bc1fl .PF0f04228c -/* f04227c: c4ac0018 */ lwc1 $f12,0x18($a1) -/* f042280: 10000002 */ b .PF0f04228c -/* f042284: 46000306 */ mov.s $f12,$f0 -/* f042288: c4ac0018 */ lwc1 $f12,0x18($a1) -.PF0f04228c: -/* f04228c: c4a00024 */ lwc1 $f0,0x24($a1) -/* f042290: 4600b03c */ c.lt.s $f22,$f0 -/* f042294: 00000000 */ nop -/* f042298: 45000003 */ bc1f .PF0f0422a8 -/* f04229c: 00000000 */ nop -/* f0422a0: 1000000d */ b .PF0f0422d8 -/* f0422a4: 46000506 */ mov.s $f20,$f0 -.PF0f0422a8: -/* f0422a8: 1000000b */ b .PF0f0422d8 -/* f0422ac: c4b4001c */ lwc1 $f20,0x1c($a1) -/* f0422b0: 8e05002c */ lw $a1,0x2c($s0) -.PF0f0422b4: -/* f0422b4: c4a00020 */ lwc1 $f0,0x20($a1) -/* f0422b8: c4ac0018 */ lwc1 $f12,0x18($a1) -/* f0422bc: 4600b03c */ c.lt.s $f22,$f0 -/* f0422c0: 00000000 */ nop -/* f0422c4: 45020004 */ bc1fl .PF0f0422d8 -/* f0422c8: c4b4001c */ lwc1 $f20,0x1c($a1) -/* f0422cc: 10000002 */ b .PF0f0422d8 -/* f0422d0: 46000506 */ mov.s $f20,$f0 -/* f0422d4: c4b4001c */ lwc1 $f20,0x1c($a1) -.PF0f0422d8: -/* f0422d8: 460ca001 */ sub.s $f0,$f20,$f12 -/* f0422dc: 44819000 */ mtc1 $at,$f18 -/* f0422e0: 3c014180 */ lui $at,0x4180 -/* f0422e4: 4612003c */ c.lt.s $f0,$f18 -/* f0422e8: 00000000 */ nop -/* f0422ec: 45020007 */ bc1fl .PF0f04230c -/* f0422f0: 44813000 */ mtc1 $at,$f6 -/* f0422f4: 3c017f1b */ lui $at,0x7f1b -/* f0422f8: c424a3ec */ lwc1 $f4,-0x5c14($at) -/* f0422fc: 46040082 */ mul.s $f2,$f0,$f4 -/* f042300: 1000000c */ b .PF0f042334 -/* f042304: 8218003a */ lb $t8,0x3a($s0) -/* f042308: 44813000 */ mtc1 $at,$f6 -.PF0f04230c: -/* f04230c: 3c013d00 */ lui $at,0x3d00 -/* f042310: 4600303c */ c.lt.s $f6,$f0 -/* f042314: 00000000 */ nop -/* f042318: 45020006 */ bc1fl .PF0f042334 -/* f04231c: 8218003a */ lb $t8,0x3a($s0) -/* f042320: 44814000 */ mtc1 $at,$f8 -/* f042324: 00000000 */ nop -/* f042328: 46080082 */ mul.s $f2,$f0,$f8 -/* f04232c: 00000000 */ nop -/* f042330: 8218003a */ lb $t8,0x3a($s0) -.PF0f042334: -/* f042334: 53000006 */ beqzl $t8,.PF0f042350 -/* f042338: a2000031 */ sb $zero,0x31($s0) -/* f04233c: 8219003b */ lb $t9,0x3b($s0) -/* f042340: 53200003 */ beqzl $t9,.PF0f042350 -/* f042344: a2000031 */ sb $zero,0x31($s0) -/* f042348: 46021080 */ add.s $f2,$f2,$f2 -/* f04234c: a2000031 */ sb $zero,0x31($s0) -.PF0f042350: -/* f042350: e7ac005c */ swc1 $f12,0x5c($sp) -/* f042354: 0c0073c3 */ jal modelGetAnimNum -/* f042358: e7a20060 */ swc1 $f2,0x60($sp) -/* f04235c: c7ac005c */ lwc1 $f12,0x5c($sp) -/* f042360: 8e690020 */ lw $t1,0x20($s3) -/* f042364: 3c014100 */ lui $at,0x4100 -/* f042368: 44815000 */ mtc1 $at,$f10 -/* f04236c: c7a20060 */ lwc1 $f2,0x60($sp) -/* f042370: 00022c00 */ sll $a1,$v0,0x10 -/* f042374: 00054403 */ sra $t0,$a1,0x10 -/* f042378: 44076000 */ mfc1 $a3,$f12 -/* f04237c: 81260008 */ lb $a2,0x8($t1) -/* f042380: 01002825 */ move $a1,$t0 -/* f042384: 02602025 */ move $a0,$s3 -/* f042388: e7aa0014 */ swc1 $f10,0x14($sp) -/* f04238c: 0c0076a7 */ jal modelSetAnimation -/* f042390: e7a20010 */ swc1 $f2,0x10($sp) -/* f042394: 4405a000 */ mfc1 $a1,$f20 -/* f042398: 0c0076fb */ jal modelSetAnimEndFrame -/* f04239c: 02602025 */ move $a0,$s3 -.PF0f0423a0: -/* f0423a0: 0c0073d3 */ jal modelGetCurAnimFrame -/* f0423a4: 02602025 */ move $a0,$s3 -/* f0423a8: 46000506 */ mov.s $f20,$f0 -.PF0f0423ac: -/* f0423ac: 0c0073c3 */ jal modelGetAnimNum -/* f0423b0: 02602025 */ move $a0,$s3 -/* f0423b4: 2401026a */ li $at,0x26a -/* f0423b8: 50410030 */ beql $v0,$at,.PF0f04247c -/* f0423bc: 8e05002c */ lw $a1,0x2c($s0) -/* f0423c0: 8e02004c */ lw $v0,0x4c($s0) -/* f0423c4: 304a0040 */ andi $t2,$v0,0x40 -/* f0423c8: 5540002c */ bnezl $t2,.PF0f04247c -/* f0423cc: 8e05002c */ lw $a1,0x2c($s0) -/* f0423d0: 8e05002c */ lw $a1,0x2c($s0) -/* f0423d4: 304b0020 */ andi $t3,$v0,0x20 -/* f0423d8: 02602025 */ move $a0,$s3 -/* f0423dc: c4a2000c */ lwc1 $f2,0xc($a1) -/* f0423e0: 1160000f */ beqz $t3,.PF0f042420 -/* f0423e4: c4ac0004 */ lwc1 $f12,0x4($a1) -/* f0423e8: e7a20050 */ swc1 $f2,0x50($sp) -/* f0423ec: 0c0073dc */ jal modelGetAnimEndFrame -/* f0423f0: e7ac004c */ swc1 $f12,0x4c($sp) -/* f0423f4: c7ac004c */ lwc1 $f12,0x4c($sp) -/* f0423f8: c7a20050 */ lwc1 $f2,0x50($sp) -/* f0423fc: 02602025 */ move $a0,$s3 -/* f042400: 460c003c */ c.lt.s $f0,$f12 -/* f042404: 00000000 */ nop -/* f042408: 45020006 */ bc1fl .PF0f042424 -/* f04240c: 8e6c0020 */ lw $t4,0x20($s3) -/* f042410: 0c0073dc */ jal modelGetAnimEndFrame -/* f042414: e7a20050 */ swc1 $f2,0x50($sp) -/* f042418: c7a20050 */ lwc1 $f2,0x50($sp) -/* f04241c: 46000306 */ mov.s $f12,$f0 -.PF0f042420: -/* f042420: 8e6c0020 */ lw $t4,0x20($s3) -.PF0f042424: -/* f042424: 3c063fcc */ lui $a2,0x3fcc -/* f042428: 3c017f1b */ lui $at,0x7f1b -/* f04242c: 818d0008 */ lb $t5,0x8($t4) -/* f042430: 34c6cccd */ ori $a2,$a2,0xcccd -/* f042434: 02002025 */ move $a0,$s0 -/* f042438: 11a00003 */ beqz $t5,.PF0f042448 -/* f04243c: 3c053f80 */ lui $a1,0x3f80 -/* f042440: c430a3f0 */ lwc1 $f16,-0x5c10($at) -/* f042444: 46028081 */ sub.s $f2,$f16,$f2 -.PF0f042448: -/* f042448: e7a20050 */ swc1 $f2,0x50($sp) -/* f04244c: 0fc0b89f */ jal chrGetRangedSpeed -/* f042450: e7ac004c */ swc1 $f12,0x4c($sp) -/* f042454: c7ac004c */ lwc1 $f12,0x4c($sp) -/* f042458: c7a20050 */ lwc1 $f2,0x50($sp) -/* f04245c: 82050030 */ lb $a1,0x30($s0) -/* f042460: 44070000 */ mfc1 $a3,$f0 -/* f042464: 44066000 */ mfc1 $a2,$f12 -/* f042468: 02002025 */ move $a0,$s0 -/* f04246c: 0fc0fa43 */ jal func0f03e788 -/* f042470: e7a20010 */ swc1 $f2,0x10($sp) -/* f042474: a2020030 */ sb $v0,0x30($s0) -/* f042478: 8e05002c */ lw $a1,0x2c($s0) -.PF0f04247c: -/* f04247c: c4b20028 */ lwc1 $f18,0x28($a1) -/* f042480: 4614903c */ c.lt.s $f18,$f20 -/* f042484: 00000000 */ nop -/* f042488: 45000006 */ bc1f .PF0f0424a4 -/* f04248c: 00000000 */ nop -/* f042490: c4a4002c */ lwc1 $f4,0x2c($a1) -/* f042494: 4604a03c */ c.lt.s $f20,$f4 -/* f042498: 00000000 */ nop -/* f04249c: 45030008 */ bc1tl .PF0f0424c0 -/* f0424a0: 3c013f80 */ lui $at,0x3f80 -.PF0f0424a4: -/* f0424a4: 0c0073c3 */ jal modelGetAnimNum -/* f0424a8: 02602025 */ move $a0,$s3 -/* f0424ac: 2401026a */ li $at,0x26a -/* f0424b0: 1441000b */ bne $v0,$at,.PF0f0424e0 -/* f0424b4: 00000000 */ nop -/* f0424b8: 8e05002c */ lw $a1,0x2c($s0) -/* f0424bc: 3c013f80 */ lui $at,0x3f80 -.PF0f0424c0: -/* f0424c0: 44813000 */ mtc1 $at,$f6 -/* f0424c4: 82060039 */ lb $a2,0x39($s0) -/* f0424c8: 82070038 */ lb $a3,0x38($s0) -/* f0424cc: 02002025 */ move $a0,$s0 -/* f0424d0: 0fc0fade */ jal func0f03e9f4 -/* f0424d4: e7a60010 */ swc1 $f6,0x10($sp) -/* f0424d8: 10000004 */ b .PF0f0424ec -/* f0424dc: 00008825 */ move $s1,$zero -.PF0f0424e0: -/* f0424e0: 0fc0fe6b */ jal chrResetAimEndProperties -/* f0424e4: 02002025 */ move $a0,$s0 -/* f0424e8: 00008825 */ move $s1,$zero -.PF0f0424ec: -/* f0424ec: 02009025 */ move $s2,$s0 -.PF0f0424f0: -/* f0424f0: 824f0038 */ lb $t7,0x38($s2) -/* f0424f4: 02002025 */ move $a0,$s0 -/* f0424f8: 02202825 */ move $a1,$s1 -/* f0424fc: 11e000a8 */ beqz $t7,.PF0f0427a0 -/* f042500: 00000000 */ nop -/* f042504: 824e003a */ lb $t6,0x3a($s2) -/* f042508: 15c0006a */ bnez $t6,.PF0f0426b4 -/* f04250c: 00000000 */ nop -/* f042510: 0c0073c3 */ jal modelGetAnimNum -/* f042514: 02602025 */ move $a0,$s3 -/* f042518: 2401026a */ li $at,0x26a -/* f04251c: 1041000c */ beq $v0,$at,.PF0f042550 -/* f042520: 02002025 */ move $a0,$s0 -/* f042524: 8e05002c */ lw $a1,0x2c($s0) -/* f042528: 00003025 */ move $a2,$zero -/* f04252c: c4a80018 */ lwc1 $f8,0x18($a1) -/* f042530: 4614403e */ c.le.s $f8,$f20 -/* f042534: 00000000 */ nop -/* f042538: 45020043 */ bc1fl .PF0f042648 -/* f04253c: 02002025 */ move $a0,$s0 -/* f042540: c4aa001c */ lwc1 $f10,0x1c($a1) -/* f042544: 460aa03c */ c.lt.s $f20,$f10 -/* f042548: 00000000 */ nop -/* f04254c: 4500003d */ bc1f .PF0f042644 -.PF0f042550: -/* f042550: 02202825 */ move $a1,$s1 -/* f042554: 0fc0fec3 */ jal func0f03f988 -/* f042558: 24060001 */ li $a2,0x1 -/* f04255c: 82190007 */ lb $t9,0x7($s0) -/* f042560: 3c18800a */ lui $t8,0x800a -/* f042564: 8f18a518 */ lw $t8,-0x5ae8($t8) -/* f042568: 2401000a */ li $at,0xa -/* f04256c: 1721002f */ bne $t9,$at,.PF0f04262c -/* f042570: ae180044 */ sw $t8,0x44($s0) -/* f042574: 8e05002c */ lw $a1,0x2c($s0) -/* f042578: 3c0141f0 */ lui $at,0x41f0 -/* f04257c: 44812000 */ mtc1 $at,$f4 -/* f042580: c4b0001c */ lwc1 $f16,0x1c($a1) -/* f042584: c4b20018 */ lwc1 $f18,0x18($a1) -/* f042588: 3c017f1b */ lui $at,0x7f1b -/* f04258c: 46128001 */ sub.s $f0,$f16,$f18 -/* f042590: 4604003c */ c.lt.s $f0,$f4 -/* f042594: 00000000 */ nop -/* f042598: 4502001f */ bc1fl .PF0f042618 -/* f04259c: 4405c000 */ mfc1 $a1,$f24 -/* f0425a0: c426a3f4 */ lwc1 $f6,-0x5c0c($at) -/* f0425a4: 8e080040 */ lw $t0,0x40($s0) -/* f0425a8: 240c0032 */ li $t4,0x32 -/* f0425ac: 46060202 */ mul.s $f8,$f0,$f6 -/* f0425b0: 02602025 */ move $a0,$s3 -/* f0425b4: 3c053dcc */ lui $a1,0x3dcc -/* f0425b8: 4600428d */ trunc.w.s $f10,$f8 -/* f0425bc: 440a5000 */ mfc1 $t2,$f10 -/* f0425c0: 00000000 */ nop -/* f0425c4: 000a5840 */ sll $t3,$t2,0x1 -/* f0425c8: 018b6823 */ subu $t5,$t4,$t3 -/* f0425cc: 010d082a */ slt $at,$t0,$t5 -/* f0425d0: 54200008 */ bnezl $at,.PF0f0425f4 -/* f0425d4: 4406b000 */ mfc1 $a2,$f22 -/* f0425d8: 4405c000 */ mfc1 $a1,$f24 -/* f0425dc: 4406b000 */ mfc1 $a2,$f22 -/* f0425e0: 0c007720 */ jal modelSetAnimSpeed -/* f0425e4: 02602025 */ move $a0,$s3 -/* f0425e8: 10000070 */ b .PF0f0427ac -/* f0425ec: 26310001 */ addiu $s1,$s1,0x1 -/* f0425f0: 4406b000 */ mfc1 $a2,$f22 -.PF0f0425f4: -/* f0425f4: 0c007720 */ jal modelSetAnimSpeed -/* f0425f8: 34a5cccd */ ori $a1,$a1,0xcccd -/* f0425fc: 3c0e800a */ lui $t6,0x800a -/* f042600: 8dcea548 */ lw $t6,-0x5ab8($t6) -/* f042604: 8e0f0040 */ lw $t7,0x40($s0) -/* f042608: 01eec021 */ addu $t8,$t7,$t6 -/* f04260c: 10000066 */ b .PF0f0427a8 -/* f042610: ae180040 */ sw $t8,0x40($s0) -/* f042614: 4405c000 */ mfc1 $a1,$f24 -.PF0f042618: -/* f042618: 4406b000 */ mfc1 $a2,$f22 -/* f04261c: 0c007720 */ jal modelSetAnimSpeed -/* f042620: 02602025 */ move $a0,$s3 -/* f042624: 10000061 */ b .PF0f0427ac -/* f042628: 26310001 */ addiu $s1,$s1,0x1 -.PF0f04262c: -/* f04262c: 4405c000 */ mfc1 $a1,$f24 -/* f042630: 4406b000 */ mfc1 $a2,$f22 -/* f042634: 0c007720 */ jal modelSetAnimSpeed -/* f042638: 02602025 */ move $a0,$s3 -/* f04263c: 1000005b */ b .PF0f0427ac -/* f042640: 26310001 */ addiu $s1,$s1,0x1 -.PF0f042644: -/* f042644: 02002025 */ move $a0,$s0 -.PF0f042648: -/* f042648: 0fc0fec3 */ jal func0f03f988 -/* f04264c: 02202825 */ move $a1,$s1 -/* f042650: 82190007 */ lb $t9,0x7($s0) -/* f042654: 2401000a */ li $at,0xa -/* f042658: 02002025 */ move $a0,$s0 -/* f04265c: 1721000c */ bne $t9,$at,.PF0f042690 -/* f042660: 3c063f4c */ lui $a2,0x3f4c -/* f042664: 4405c000 */ mfc1 $a1,$f24 -/* f042668: 3c063f4c */ lui $a2,0x3f4c -/* f04266c: 34c6cccd */ ori $a2,$a2,0xcccd -/* f042670: 0fc0b89f */ jal chrGetRangedSpeed -/* f042674: 02002025 */ move $a0,$s0 -/* f042678: 44050000 */ mfc1 $a1,$f0 -/* f04267c: 4406b000 */ mfc1 $a2,$f22 -/* f042680: 0c007720 */ jal modelSetAnimSpeed -/* f042684: 02602025 */ move $a0,$s3 -/* f042688: 10000048 */ b .PF0f0427ac -/* f04268c: 26310001 */ addiu $s1,$s1,0x1 -.PF0f042690: -/* f042690: 4405c000 */ mfc1 $a1,$f24 -/* f042694: 0fc0b89f */ jal chrGetRangedSpeed -/* f042698: 34c6cccd */ ori $a2,$a2,0xcccd -/* f04269c: 44050000 */ mfc1 $a1,$f0 -/* f0426a0: 4406b000 */ mfc1 $a2,$f22 -/* f0426a4: 0c007720 */ jal modelSetAnimSpeed -/* f0426a8: 02602025 */ move $a0,$s3 -/* f0426ac: 1000003f */ b .PF0f0427ac -/* f0426b0: 26310001 */ addiu $s1,$s1,0x1 -.PF0f0426b4: -/* f0426b4: 0c0073c3 */ jal modelGetAnimNum -/* f0426b8: 02602025 */ move $a0,$s3 -/* f0426bc: 2401026a */ li $at,0x26a -/* f0426c0: 10410023 */ beq $v0,$at,.PF0f042750 -/* f0426c4: 24060001 */ li $a2,0x1 -/* f0426c8: 82090031 */ lb $t1,0x31($s0) -/* f0426cc: 02002025 */ move $a0,$s0 -/* f0426d0: 5520002f */ bnezl $t1,.PF0f042790 -/* f0426d4: 02202825 */ move $a1,$s1 -/* f0426d8: 82020032 */ lb $v0,0x32($s0) -/* f0426dc: 12220004 */ beq $s1,$v0,.PF0f0426f0 -/* f0426e0: 02025021 */ addu $t2,$s0,$v0 -/* f0426e4: 814c003a */ lb $t4,0x3a($t2) -/* f0426e8: 55800029 */ bnezl $t4,.PF0f042790 -/* f0426ec: 02202825 */ move $a1,$s1 -.PF0f0426f0: -/* f0426f0: 8e05002c */ lw $a1,0x2c($s0) -/* f0426f4: c4a00020 */ lwc1 $f0,0x20($a1) -/* f0426f8: 4600b03e */ c.le.s $f22,$f0 -/* f0426fc: 00000000 */ nop -/* f042700: 4502000b */ bc1fl .PF0f042730 -/* f042704: 4616003c */ c.lt.s $f0,$f22 -/* f042708: 4614003e */ c.le.s $f0,$f20 -/* f04270c: 00000000 */ nop -/* f042710: 45020007 */ bc1fl .PF0f042730 -/* f042714: 4616003c */ c.lt.s $f0,$f22 -/* f042718: c4b00024 */ lwc1 $f16,0x24($a1) -/* f04271c: 4610a03e */ c.le.s $f20,$f16 -/* f042720: 00000000 */ nop -/* f042724: 4503000b */ bc1tl .PF0f042754 -/* f042728: 820b0032 */ lb $t3,0x32($s0) -/* f04272c: 4616003c */ c.lt.s $f0,$f22 -.PF0f042730: -/* f042730: 00000000 */ nop -/* f042734: 45020016 */ bc1fl .PF0f042790 -/* f042738: 02202825 */ move $a1,$s1 -/* f04273c: c4b20018 */ lwc1 $f18,0x18($a1) -/* f042740: 4614903e */ c.le.s $f18,$f20 -/* f042744: 00000000 */ nop -/* f042748: 45020011 */ bc1fl .PF0f042790 -/* f04274c: 02202825 */ move $a1,$s1 -.PF0f042750: -/* f042750: 820b0032 */ lb $t3,0x32($s0) -.PF0f042754: -/* f042754: 820d0033 */ lb $t5,0x33($s0) -/* f042758: a2060031 */ sb $a2,0x31($s0) -/* f04275c: 00cb4023 */ subu $t0,$a2,$t3 -/* f042760: 25af0001 */ addiu $t7,$t5,0x1 -/* f042764: a2080032 */ sb $t0,0x32($s0) -/* f042768: a20f0033 */ sb $t7,0x33($s0) -/* f04276c: 3c0e800a */ lui $t6,0x800a -/* f042770: 8dcea518 */ lw $t6,-0x5ae8($t6) -/* f042774: 02002025 */ move $a0,$s0 -/* f042778: 02202825 */ move $a1,$s1 -/* f04277c: 0fc0fec3 */ jal func0f03f988 -/* f042780: ae0e0044 */ sw $t6,0x44($s0) -/* f042784: 10000009 */ b .PF0f0427ac -/* f042788: 26310001 */ addiu $s1,$s1,0x1 -/* f04278c: 02202825 */ move $a1,$s1 -.PF0f042790: -/* f042790: 0fc0fec3 */ jal func0f03f988 -/* f042794: 00003025 */ move $a2,$zero -/* f042798: 10000004 */ b .PF0f0427ac -/* f04279c: 26310001 */ addiu $s1,$s1,0x1 -.PF0f0427a0: -/* f0427a0: 0fc0fec3 */ jal func0f03f988 -/* f0427a4: 00003025 */ move $a2,$zero -.PF0f0427a8: -/* f0427a8: 26310001 */ addiu $s1,$s1,0x1 -.PF0f0427ac: -/* f0427ac: 24010002 */ li $at,0x2 -/* f0427b0: 1621ff4f */ bne $s1,$at,.PF0f0424f0 -/* f0427b4: 26520001 */ addiu $s2,$s2,0x1 -/* f0427b8: 8fbf0044 */ lw $ra,0x44($sp) -.PF0f0427bc: -/* f0427bc: d7b40018 */ ldc1 $f20,0x18($sp) -/* f0427c0: d7b60020 */ ldc1 $f22,0x20($sp) -/* f0427c4: d7b80028 */ ldc1 $f24,0x28($sp) -/* f0427c8: 8fb00034 */ lw $s0,0x34($sp) -/* f0427cc: 8fb10038 */ lw $s1,0x38($sp) -/* f0427d0: 8fb2003c */ lw $s2,0x3c($sp) -/* f0427d4: 8fb30040 */ lw $s3,0x40($sp) -/* f0427d8: 03e00008 */ jr $ra -/* f0427dc: 27bd0070 */ addiu $sp,$sp,0x70 -); -#else -GLOBAL_ASM( -glabel func0f041e48 -.late_rodata -glabel var7f1a9188 -.word 0x3d2aaaab -glabel var7f1a918c -.word 0x40c907a9 -.text -/* f041e48: 27bdff90 */ addiu $sp,$sp,-112 -/* f041e4c: afbf0044 */ sw $ra,0x44($sp) -/* f041e50: afb30040 */ sw $s3,0x40($sp) -/* f041e54: afb2003c */ sw $s2,0x3c($sp) -/* f041e58: afb10038 */ sw $s1,0x38($sp) -/* f041e5c: afb00034 */ sw $s0,0x34($sp) -/* f041e60: f7b80028 */ sdc1 $f24,0x28($sp) -/* f041e64: f7b60020 */ sdc1 $f22,0x20($sp) -/* f041e68: f7b40018 */ sdc1 $f20,0x18($sp) -/* f041e6c: 8c930020 */ lw $s3,0x20($a0) -/* f041e70: 00808025 */ or $s0,$a0,$zero -/* f041e74: 0c00745f */ jal modelGetCurAnimFrame -/* f041e78: 02602025 */ or $a0,$s3,$zero -/* f041e7c: 46000506 */ mov.s $f20,$f0 -/* f041e80: 0c00744f */ jal modelGetAnimNum -/* f041e84: 02602025 */ or $a0,$s3,$zero -/* f041e88: 24010269 */ addiu $at,$zero,0x269 -/* f041e8c: 504101de */ beql $v0,$at,.L0f042608 -/* f041e90: 8fbf0044 */ lw $ra,0x44($sp) -/* f041e94: 8e0f0044 */ lw $t7,0x44($s0) -/* f041e98: 8e0e0048 */ lw $t6,0x48($s0) -/* f041e9c: 25f8ffe2 */ addiu $t8,$t7,-30 -/* f041ea0: 01d8082a */ slt $at,$t6,$t8 -/* f041ea4: 50200051 */ beqzl $at,.L0f041fec -/* f041ea8: 3c013f00 */ lui $at,0x3f00 -/* f041eac: 8e790020 */ lw $t9,0x20($s3) -/* f041eb0: 87280002 */ lh $t0,0x2($t9) -/* f041eb4: 5500004d */ bnezl $t0,.L0f041fec -/* f041eb8: 3c013f00 */ lui $at,0x3f00 -/* f041ebc: 8e05002c */ lw $a1,0x2c($s0) -/* f041ec0: 3c014120 */ lui $at,0x4120 -/* f041ec4: 44813000 */ mtc1 $at,$f6 -/* f041ec8: c4a40018 */ lwc1 $f4,0x18($a1) -/* f041ecc: 46062200 */ add.s $f8,$f4,$f6 -/* f041ed0: 4614403c */ c.lt.s $f8,$f20 -/* f041ed4: 00000000 */ nop -/* f041ed8: 45020044 */ bc1fl .L0f041fec -/* f041edc: 3c013f00 */ lui $at,0x3f00 -/* f041ee0: c4aa001c */ lwc1 $f10,0x1c($a1) -/* f041ee4: 460aa03c */ c.lt.s $f20,$f10 -/* f041ee8: 00000000 */ nop -/* f041eec: 4502003f */ bc1fl .L0f041fec -/* f041ef0: 3c013f00 */ lui $at,0x3f00 -/* f041ef4: 4480b000 */ mtc1 $zero,$f22 -/* f041ef8: c4a00024 */ lwc1 $f0,0x24($a1) -/* f041efc: 4616003c */ c.lt.s $f0,$f22 -/* f041f00: 00000000 */ nop -/* f041f04: 45030006 */ bc1tl .L0f041f20 -/* f041f08: 82090036 */ lb $t1,0x36($s0) -/* f041f0c: 4600a03c */ c.lt.s $f20,$f0 -/* f041f10: 00000000 */ nop -/* f041f14: 45020035 */ bc1fl .L0f041fec -/* f041f18: 3c013f00 */ lui $at,0x3f00 -/* f041f1c: 82090036 */ lb $t1,0x36($s0) -.L0f041f20: -/* f041f20: 15200029 */ bnez $t1,.L0f041fc8 -/* f041f24: 00000000 */ nop -/* f041f28: 0fc10711 */ jal func0f041c44 -/* f041f2c: 02002025 */ or $a0,$s0,$zero -/* f041f30: 14400023 */ bnez $v0,.L0f041fc0 -/* f041f34: 00000000 */ nop -/* f041f38: 0c00744f */ jal modelGetAnimNum -/* f041f3c: 02602025 */ or $a0,$s3,$zero -/* f041f40: 3c013f00 */ lui $at,0x3f00 -/* f041f44: 4481c000 */ mtc1 $at,$f24 -/* f041f48: 00028c00 */ sll $s1,$v0,0x10 -/* f041f4c: 00115403 */ sra $t2,$s1,0x10 -/* f041f50: 3c063f4c */ lui $a2,0x3f4c -/* f041f54: 4405c000 */ mfc1 $a1,$f24 -/* f041f58: 34c6cccd */ ori $a2,$a2,0xcccd -/* f041f5c: 01408825 */ or $s1,$t2,$zero -/* f041f60: 0fc0b857 */ jal chrGetRangedSpeed -/* f041f64: 02002025 */ or $a0,$s0,$zero -/* f041f68: 8e6c0020 */ lw $t4,0x20($s3) -/* f041f6c: 8e0d002c */ lw $t5,0x2c($s0) -/* f041f70: 3c014100 */ lui $at,0x4100 -/* f041f74: 44818000 */ mtc1 $at,$f16 -/* f041f78: 00112c00 */ sll $a1,$s1,0x10 -/* f041f7c: 00055c03 */ sra $t3,$a1,0x10 -/* f041f80: 81860008 */ lb $a2,0x8($t4) -/* f041f84: 8da7001c */ lw $a3,0x1c($t5) -/* f041f88: e7a00010 */ swc1 $f0,0x10($sp) -/* f041f8c: 01602825 */ or $a1,$t3,$zero -/* f041f90: 02602025 */ or $a0,$s3,$zero -/* f041f94: 0c007733 */ jal modelSetAnimation -/* f041f98: e7b00014 */ swc1 $f16,0x14($sp) -/* f041f9c: 8e0f002c */ lw $t7,0x2c($s0) -/* f041fa0: c5e00014 */ lwc1 $f0,0x14($t7) -/* f041fa4: 4600b03e */ c.le.s $f22,$f0 -/* f041fa8: 00000000 */ nop -/* f041fac: 45000004 */ bc1f .L0f041fc0 -/* f041fb0: 00000000 */ nop -/* f041fb4: 44050000 */ mfc1 $a1,$f0 -/* f041fb8: 0c007787 */ jal modelSetAnimEndFrame -/* f041fbc: 02602025 */ or $a0,$s3,$zero -.L0f041fc0: -/* f041fc0: 10000004 */ b .L0f041fd4 -/* f041fc4: 820e0034 */ lb $t6,0x34($s0) -.L0f041fc8: -/* f041fc8: 0fc1074e */ jal chrAttackAmountUpdateAnimation -/* f041fcc: 02002025 */ or $a0,$s0,$zero -/* f041fd0: 820e0034 */ lb $t6,0x34($s0) -.L0f041fd4: -/* f041fd4: 02602025 */ or $a0,$s3,$zero -/* f041fd8: 25d80001 */ addiu $t8,$t6,0x1 -/* f041fdc: 0c00745f */ jal modelGetCurAnimFrame -/* f041fe0: a2180033 */ sb $t8,0x33($s0) -/* f041fe4: 46000506 */ mov.s $f20,$f0 -/* f041fe8: 3c013f00 */ lui $at,0x3f00 -.L0f041fec: -/* f041fec: 4481c000 */ mtc1 $at,$f24 -/* f041ff0: 4480b000 */ mtc1 $zero,$f22 -/* f041ff4: 0c007468 */ jal modelGetAnimEndFrame -/* f041ff8: 02602025 */ or $a0,$s3,$zero -/* f041ffc: 4614003e */ c.le.s $f0,$f20 -/* f042000: 00000000 */ nop -/* f042004: 45000080 */ bc1f .L0f042208 -/* f042008: 00000000 */ nop -/* f04200c: 0c00744f */ jal modelGetAnimNum -/* f042010: 02602025 */ or $a0,$s3,$zero -/* f042014: 2401026a */ addiu $at,$zero,0x26a -/* f042018: 50410018 */ beql $v0,$at,.L0f04207c -/* f04201c: 82020033 */ lb $v0,0x33($s0) -/* f042020: 82190037 */ lb $t9,0x37($s0) -/* f042024: 17200006 */ bnez $t9,.L0f042040 -/* f042028: 00000000 */ nop -/* f04202c: 82080034 */ lb $t0,0x34($s0) -/* f042030: 82090033 */ lb $t1,0x33($s0) -/* f042034: 0109082a */ slt $at,$t0,$t1 -/* f042038: 50200010 */ beqzl $at,.L0f04207c -/* f04203c: 82020033 */ lb $v0,0x33($s0) -.L0f042040: -/* f042040: 0fc10711 */ jal func0f041c44 -/* f042044: 02002025 */ or $a0,$s0,$zero -/* f042048: 1440006c */ bnez $v0,.L0f0421fc -/* f04204c: 00000000 */ nop -/* f042050: 8e0a004c */ lw $t2,0x4c($s0) -/* f042054: 314b0200 */ andi $t3,$t2,0x200 -/* f042058: 11600003 */ beqz $t3,.L0f042068 -/* f04205c: 00000000 */ nop -/* f042060: 0fc0e56b */ jal chrRecordLastSeeTargetTime -/* f042064: 02002025 */ or $a0,$s0,$zero -.L0f042068: -/* f042068: 0fc0bb57 */ jal chrStop -/* f04206c: 02002025 */ or $a0,$s0,$zero -/* f042070: 10000165 */ b .L0f042608 -/* f042074: 8fbf0044 */ lw $ra,0x44($sp) -/* f042078: 82020033 */ lb $v0,0x33($s0) -.L0f04207c: -/* f04207c: 820c0034 */ lb $t4,0x34($s0) -/* f042080: 02002025 */ or $a0,$s0,$zero -/* f042084: 244d0001 */ addiu $t5,$v0,0x1 -/* f042088: 55820006 */ bnel $t4,$v0,.L0f0420a4 -/* f04208c: 820f0031 */ lb $t7,0x31($s0) -/* f042090: 0fc1074e */ jal chrAttackAmountUpdateAnimation -/* f042094: a20d0033 */ sb $t5,0x33($s0) -/* f042098: 10000058 */ b .L0f0421fc -/* f04209c: 00000000 */ nop -/* f0420a0: 820f0031 */ lb $t7,0x31($s0) -.L0f0420a4: -/* f0420a4: 3c014140 */ lui $at,0x4140 -/* f0420a8: 02602025 */ or $a0,$s3,$zero -/* f0420ac: 11e00053 */ beqz $t7,.L0f0421fc -/* f0420b0: 00000000 */ nop -/* f0420b4: 820e0036 */ lb $t6,0x36($s0) -/* f0420b8: 4600c086 */ mov.s $f2,$f24 -/* f0420bc: 51c00014 */ beqzl $t6,.L0f042110 -/* f0420c0: 8e05002c */ lw $a1,0x2c($s0) -/* f0420c4: 8e05002c */ lw $a1,0x2c($s0) -/* f0420c8: c4a00020 */ lwc1 $f0,0x20($a1) -/* f0420cc: 4600b03c */ c.lt.s $f22,$f0 -/* f0420d0: 00000000 */ nop -/* f0420d4: 45020004 */ bc1fl .L0f0420e8 -/* f0420d8: c4ac0018 */ lwc1 $f12,0x18($a1) -/* f0420dc: 10000002 */ b .L0f0420e8 -/* f0420e0: 46000306 */ mov.s $f12,$f0 -/* f0420e4: c4ac0018 */ lwc1 $f12,0x18($a1) -.L0f0420e8: -/* f0420e8: c4a00024 */ lwc1 $f0,0x24($a1) -/* f0420ec: 4600b03c */ c.lt.s $f22,$f0 -/* f0420f0: 00000000 */ nop -/* f0420f4: 45000003 */ bc1f .L0f042104 -/* f0420f8: 00000000 */ nop -/* f0420fc: 1000000d */ b .L0f042134 -/* f042100: 46000506 */ mov.s $f20,$f0 -.L0f042104: -/* f042104: 1000000b */ b .L0f042134 -/* f042108: c4b4001c */ lwc1 $f20,0x1c($a1) -/* f04210c: 8e05002c */ lw $a1,0x2c($s0) -.L0f042110: -/* f042110: c4a00020 */ lwc1 $f0,0x20($a1) -/* f042114: c4ac0018 */ lwc1 $f12,0x18($a1) -/* f042118: 4600b03c */ c.lt.s $f22,$f0 -/* f04211c: 00000000 */ nop -/* f042120: 45020004 */ bc1fl .L0f042134 -/* f042124: c4b4001c */ lwc1 $f20,0x1c($a1) -/* f042128: 10000002 */ b .L0f042134 -/* f04212c: 46000506 */ mov.s $f20,$f0 -/* f042130: c4b4001c */ lwc1 $f20,0x1c($a1) -.L0f042134: -/* f042134: 460ca001 */ sub.s $f0,$f20,$f12 -/* f042138: 44819000 */ mtc1 $at,$f18 -/* f04213c: 3c014180 */ lui $at,0x4180 -/* f042140: 4612003c */ c.lt.s $f0,$f18 -/* f042144: 00000000 */ nop -/* f042148: 45020007 */ bc1fl .L0f042168 -/* f04214c: 44813000 */ mtc1 $at,$f6 -/* f042150: 3c017f1b */ lui $at,%hi(var7f1a9188) -/* f042154: c4249188 */ lwc1 $f4,%lo(var7f1a9188)($at) -/* f042158: 46040082 */ mul.s $f2,$f0,$f4 -/* f04215c: 1000000c */ b .L0f042190 -/* f042160: 8218003a */ lb $t8,0x3a($s0) -/* f042164: 44813000 */ mtc1 $at,$f6 -.L0f042168: -/* f042168: 3c013d00 */ lui $at,0x3d00 -/* f04216c: 4600303c */ c.lt.s $f6,$f0 -/* f042170: 00000000 */ nop -/* f042174: 45020006 */ bc1fl .L0f042190 -/* f042178: 8218003a */ lb $t8,0x3a($s0) -/* f04217c: 44814000 */ mtc1 $at,$f8 -/* f042180: 00000000 */ nop -/* f042184: 46080082 */ mul.s $f2,$f0,$f8 -/* f042188: 00000000 */ nop -/* f04218c: 8218003a */ lb $t8,0x3a($s0) -.L0f042190: -/* f042190: 53000006 */ beqzl $t8,.L0f0421ac -/* f042194: a2000031 */ sb $zero,0x31($s0) -/* f042198: 8219003b */ lb $t9,0x3b($s0) -/* f04219c: 53200003 */ beqzl $t9,.L0f0421ac -/* f0421a0: a2000031 */ sb $zero,0x31($s0) -/* f0421a4: 46021080 */ add.s $f2,$f2,$f2 -/* f0421a8: a2000031 */ sb $zero,0x31($s0) -.L0f0421ac: -/* f0421ac: e7ac005c */ swc1 $f12,0x5c($sp) -/* f0421b0: 0c00744f */ jal modelGetAnimNum -/* f0421b4: e7a20060 */ swc1 $f2,0x60($sp) -/* f0421b8: c7ac005c */ lwc1 $f12,0x5c($sp) -/* f0421bc: 8e690020 */ lw $t1,0x20($s3) -/* f0421c0: 3c014100 */ lui $at,0x4100 -/* f0421c4: 44815000 */ mtc1 $at,$f10 -/* f0421c8: c7a20060 */ lwc1 $f2,0x60($sp) -/* f0421cc: 00022c00 */ sll $a1,$v0,0x10 -/* f0421d0: 00054403 */ sra $t0,$a1,0x10 -/* f0421d4: 44076000 */ mfc1 $a3,$f12 -/* f0421d8: 81260008 */ lb $a2,0x8($t1) -/* f0421dc: 01002825 */ or $a1,$t0,$zero -/* f0421e0: 02602025 */ or $a0,$s3,$zero -/* f0421e4: e7aa0014 */ swc1 $f10,0x14($sp) -/* f0421e8: 0c007733 */ jal modelSetAnimation -/* f0421ec: e7a20010 */ swc1 $f2,0x10($sp) -/* f0421f0: 4405a000 */ mfc1 $a1,$f20 -/* f0421f4: 0c007787 */ jal modelSetAnimEndFrame -/* f0421f8: 02602025 */ or $a0,$s3,$zero -.L0f0421fc: -/* f0421fc: 0c00745f */ jal modelGetCurAnimFrame -/* f042200: 02602025 */ or $a0,$s3,$zero -/* f042204: 46000506 */ mov.s $f20,$f0 -.L0f042208: -/* f042208: 0c00744f */ jal modelGetAnimNum -/* f04220c: 02602025 */ or $a0,$s3,$zero -/* f042210: 2401026a */ addiu $at,$zero,0x26a -/* f042214: 50410030 */ beql $v0,$at,.L0f0422d8 -/* f042218: 8e05002c */ lw $a1,0x2c($s0) -/* f04221c: 8e02004c */ lw $v0,0x4c($s0) -/* f042220: 304a0040 */ andi $t2,$v0,0x40 -/* f042224: 5540002c */ bnezl $t2,.L0f0422d8 -/* f042228: 8e05002c */ lw $a1,0x2c($s0) -/* f04222c: 8e05002c */ lw $a1,0x2c($s0) -/* f042230: 304b0020 */ andi $t3,$v0,0x20 -/* f042234: 02602025 */ or $a0,$s3,$zero -/* f042238: c4a2000c */ lwc1 $f2,0xc($a1) -/* f04223c: 1160000f */ beqz $t3,.L0f04227c -/* f042240: c4ac0004 */ lwc1 $f12,0x4($a1) -/* f042244: e7a20050 */ swc1 $f2,0x50($sp) -/* f042248: 0c007468 */ jal modelGetAnimEndFrame -/* f04224c: e7ac004c */ swc1 $f12,0x4c($sp) -/* f042250: c7ac004c */ lwc1 $f12,0x4c($sp) -/* f042254: c7a20050 */ lwc1 $f2,0x50($sp) -/* f042258: 02602025 */ or $a0,$s3,$zero -/* f04225c: 460c003c */ c.lt.s $f0,$f12 -/* f042260: 00000000 */ nop -/* f042264: 45020006 */ bc1fl .L0f042280 -/* f042268: 8e6c0020 */ lw $t4,0x20($s3) -/* f04226c: 0c007468 */ jal modelGetAnimEndFrame -/* f042270: e7a20050 */ swc1 $f2,0x50($sp) -/* f042274: c7a20050 */ lwc1 $f2,0x50($sp) -/* f042278: 46000306 */ mov.s $f12,$f0 -.L0f04227c: -/* f04227c: 8e6c0020 */ lw $t4,0x20($s3) -.L0f042280: -/* f042280: 3c063fcc */ lui $a2,0x3fcc -/* f042284: 3c017f1b */ lui $at,%hi(var7f1a918c) -/* f042288: 818d0008 */ lb $t5,0x8($t4) -/* f04228c: 34c6cccd */ ori $a2,$a2,0xcccd -/* f042290: 02002025 */ or $a0,$s0,$zero -/* f042294: 11a00003 */ beqz $t5,.L0f0422a4 -/* f042298: 3c053f80 */ lui $a1,0x3f80 -/* f04229c: c430918c */ lwc1 $f16,%lo(var7f1a918c)($at) -/* f0422a0: 46028081 */ sub.s $f2,$f16,$f2 -.L0f0422a4: -/* f0422a4: e7a20050 */ swc1 $f2,0x50($sp) -/* f0422a8: 0fc0b857 */ jal chrGetRangedSpeed -/* f0422ac: e7ac004c */ swc1 $f12,0x4c($sp) -/* f0422b0: c7ac004c */ lwc1 $f12,0x4c($sp) -/* f0422b4: c7a20050 */ lwc1 $f2,0x50($sp) -/* f0422b8: 82050030 */ lb $a1,0x30($s0) -/* f0422bc: 44070000 */ mfc1 $a3,$f0 -/* f0422c0: 44066000 */ mfc1 $a2,$f12 -/* f0422c4: 02002025 */ or $a0,$s0,$zero -/* f0422c8: 0fc0f9e2 */ jal func0f03e788 -/* f0422cc: e7a20010 */ swc1 $f2,0x10($sp) -/* f0422d0: a2020030 */ sb $v0,0x30($s0) -/* f0422d4: 8e05002c */ lw $a1,0x2c($s0) -.L0f0422d8: -/* f0422d8: c4b20028 */ lwc1 $f18,0x28($a1) -/* f0422dc: 4614903c */ c.lt.s $f18,$f20 -/* f0422e0: 00000000 */ nop -/* f0422e4: 45000006 */ bc1f .L0f042300 -/* f0422e8: 00000000 */ nop -/* f0422ec: c4a4002c */ lwc1 $f4,0x2c($a1) -/* f0422f0: 4604a03c */ c.lt.s $f20,$f4 -/* f0422f4: 00000000 */ nop -/* f0422f8: 45030008 */ bc1tl .L0f04231c -/* f0422fc: 3c013f80 */ lui $at,0x3f80 -.L0f042300: -/* f042300: 0c00744f */ jal modelGetAnimNum -/* f042304: 02602025 */ or $a0,$s3,$zero -/* f042308: 2401026a */ addiu $at,$zero,0x26a -/* f04230c: 1441000b */ bne $v0,$at,.L0f04233c -/* f042310: 00000000 */ nop -/* f042314: 8e05002c */ lw $a1,0x2c($s0) -/* f042318: 3c013f80 */ lui $at,0x3f80 -.L0f04231c: -/* f04231c: 44813000 */ mtc1 $at,$f6 -/* f042320: 82060039 */ lb $a2,0x39($s0) -/* f042324: 82070038 */ lb $a3,0x38($s0) -/* f042328: 02002025 */ or $a0,$s0,$zero -/* f04232c: 0fc0fa7d */ jal func0f03e9f4 -/* f042330: e7a60010 */ swc1 $f6,0x10($sp) -/* f042334: 10000004 */ b .L0f042348 -/* f042338: 00008825 */ or $s1,$zero,$zero -.L0f04233c: -/* f04233c: 0fc0fe0a */ jal chrResetAimEndProperties -/* f042340: 02002025 */ or $a0,$s0,$zero -/* f042344: 00008825 */ or $s1,$zero,$zero -.L0f042348: -/* f042348: 02009025 */ or $s2,$s0,$zero -.L0f04234c: -/* f04234c: 824f0038 */ lb $t7,0x38($s2) -/* f042350: 02002025 */ or $a0,$s0,$zero -/* f042354: 02202825 */ or $a1,$s1,$zero -/* f042358: 11e000a4 */ beqz $t7,.L0f0425ec -/* f04235c: 00000000 */ nop -/* f042360: 824e003a */ lb $t6,0x3a($s2) -/* f042364: 15c00066 */ bnez $t6,.L0f042500 -/* f042368: 00000000 */ nop -/* f04236c: 0c00744f */ jal modelGetAnimNum -/* f042370: 02602025 */ or $a0,$s3,$zero -/* f042374: 2401026a */ addiu $at,$zero,0x26a -/* f042378: 1041000c */ beq $v0,$at,.L0f0423ac -/* f04237c: 02002025 */ or $a0,$s0,$zero -/* f042380: 8e05002c */ lw $a1,0x2c($s0) -/* f042384: 00003025 */ or $a2,$zero,$zero -/* f042388: c4a80018 */ lwc1 $f8,0x18($a1) -/* f04238c: 4614403e */ c.le.s $f8,$f20 -/* f042390: 00000000 */ nop -/* f042394: 4502003f */ bc1fl .L0f042494 -/* f042398: 02002025 */ or $a0,$s0,$zero -/* f04239c: c4aa001c */ lwc1 $f10,0x1c($a1) -/* f0423a0: 460aa03c */ c.lt.s $f20,$f10 -/* f0423a4: 00000000 */ nop -/* f0423a8: 45000039 */ bc1f .L0f042490 -.L0f0423ac: -/* f0423ac: 02202825 */ or $a1,$s1,$zero -/* f0423b0: 0fc0fe62 */ jal func0f03f988 -/* f0423b4: 24060001 */ addiu $a2,$zero,0x1 -/* f0423b8: 82190007 */ lb $t9,0x7($s0) -/* f0423bc: 3c18800a */ lui $t8,%hi(g_Vars+0x8) -/* f0423c0: 8f189fc8 */ lw $t8,%lo(g_Vars+0x8)($t8) -/* f0423c4: 2401000a */ addiu $at,$zero,0xa -/* f0423c8: 1721002b */ bne $t9,$at,.L0f042478 -/* f0423cc: ae180044 */ sw $t8,0x44($s0) -/* f0423d0: 8e05002c */ lw $a1,0x2c($s0) -/* f0423d4: 3c0141f0 */ lui $at,0x41f0 -/* f0423d8: 44812000 */ mtc1 $at,$f4 -/* f0423dc: c4b0001c */ lwc1 $f16,0x1c($a1) -/* f0423e0: c4b20018 */ lwc1 $f18,0x18($a1) -/* f0423e4: 46128001 */ sub.s $f0,$f16,$f18 -/* f0423e8: 4604003c */ c.lt.s $f0,$f4 -/* f0423ec: 00000000 */ nop -/* f0423f0: 4502001c */ bc1fl .L0f042464 -/* f0423f4: 4405c000 */ mfc1 $a1,$f24 -/* f0423f8: 4600018d */ trunc.w.s $f6,$f0 -/* f0423fc: 8e080040 */ lw $t0,0x40($s0) -/* f042400: 240c003c */ addiu $t4,$zero,0x3c -/* f042404: 02602025 */ or $a0,$s3,$zero -/* f042408: 440a3000 */ mfc1 $t2,$f6 -/* f04240c: 3c053dcc */ lui $a1,0x3dcc -/* f042410: 000a5840 */ sll $t3,$t2,0x1 -/* f042414: 018b6823 */ subu $t5,$t4,$t3 -/* f042418: 010d082a */ slt $at,$t0,$t5 -/* f04241c: 54200008 */ bnezl $at,.L0f042440 -/* f042420: 4406b000 */ mfc1 $a2,$f22 -/* f042424: 4405c000 */ mfc1 $a1,$f24 -/* f042428: 4406b000 */ mfc1 $a2,$f22 -/* f04242c: 0c0077ac */ jal modelSetAnimSpeed -/* f042430: 02602025 */ or $a0,$s3,$zero -/* f042434: 10000070 */ b .L0f0425f8 -/* f042438: 26310001 */ addiu $s1,$s1,0x1 -/* f04243c: 4406b000 */ mfc1 $a2,$f22 -.L0f042440: -/* f042440: 0c0077ac */ jal modelSetAnimSpeed -/* f042444: 34a5cccd */ ori $a1,$a1,0xcccd -/* f042448: 3c0e800a */ lui $t6,%hi(g_Vars+0x38) -/* f04244c: 8dce9ff8 */ lw $t6,%lo(g_Vars+0x38)($t6) -/* f042450: 8e0f0040 */ lw $t7,0x40($s0) -/* f042454: 01eec021 */ addu $t8,$t7,$t6 -/* f042458: 10000066 */ b .L0f0425f4 -/* f04245c: ae180040 */ sw $t8,0x40($s0) -/* f042460: 4405c000 */ mfc1 $a1,$f24 -.L0f042464: -/* f042464: 4406b000 */ mfc1 $a2,$f22 -/* f042468: 0c0077ac */ jal modelSetAnimSpeed -/* f04246c: 02602025 */ or $a0,$s3,$zero -/* f042470: 10000061 */ b .L0f0425f8 -/* f042474: 26310001 */ addiu $s1,$s1,0x1 -.L0f042478: -/* f042478: 4405c000 */ mfc1 $a1,$f24 -/* f04247c: 4406b000 */ mfc1 $a2,$f22 -/* f042480: 0c0077ac */ jal modelSetAnimSpeed -/* f042484: 02602025 */ or $a0,$s3,$zero -/* f042488: 1000005b */ b .L0f0425f8 -/* f04248c: 26310001 */ addiu $s1,$s1,0x1 -.L0f042490: -/* f042490: 02002025 */ or $a0,$s0,$zero -.L0f042494: -/* f042494: 0fc0fe62 */ jal func0f03f988 -/* f042498: 02202825 */ or $a1,$s1,$zero -/* f04249c: 82190007 */ lb $t9,0x7($s0) -/* f0424a0: 2401000a */ addiu $at,$zero,0xa -/* f0424a4: 02002025 */ or $a0,$s0,$zero -/* f0424a8: 1721000c */ bne $t9,$at,.L0f0424dc -/* f0424ac: 3c063f4c */ lui $a2,0x3f4c -/* f0424b0: 4405c000 */ mfc1 $a1,$f24 -/* f0424b4: 3c063f4c */ lui $a2,0x3f4c -/* f0424b8: 34c6cccd */ ori $a2,$a2,0xcccd -/* f0424bc: 0fc0b857 */ jal chrGetRangedSpeed -/* f0424c0: 02002025 */ or $a0,$s0,$zero -/* f0424c4: 44050000 */ mfc1 $a1,$f0 -/* f0424c8: 4406b000 */ mfc1 $a2,$f22 -/* f0424cc: 0c0077ac */ jal modelSetAnimSpeed -/* f0424d0: 02602025 */ or $a0,$s3,$zero -/* f0424d4: 10000048 */ b .L0f0425f8 -/* f0424d8: 26310001 */ addiu $s1,$s1,0x1 -.L0f0424dc: -/* f0424dc: 4405c000 */ mfc1 $a1,$f24 -/* f0424e0: 0fc0b857 */ jal chrGetRangedSpeed -/* f0424e4: 34c6cccd */ ori $a2,$a2,0xcccd -/* f0424e8: 44050000 */ mfc1 $a1,$f0 -/* f0424ec: 4406b000 */ mfc1 $a2,$f22 -/* f0424f0: 0c0077ac */ jal modelSetAnimSpeed -/* f0424f4: 02602025 */ or $a0,$s3,$zero -/* f0424f8: 1000003f */ b .L0f0425f8 -/* f0424fc: 26310001 */ addiu $s1,$s1,0x1 -.L0f042500: -/* f042500: 0c00744f */ jal modelGetAnimNum -/* f042504: 02602025 */ or $a0,$s3,$zero -/* f042508: 2401026a */ addiu $at,$zero,0x26a -/* f04250c: 10410023 */ beq $v0,$at,.L0f04259c -/* f042510: 24060001 */ addiu $a2,$zero,0x1 -/* f042514: 82090031 */ lb $t1,0x31($s0) -/* f042518: 02002025 */ or $a0,$s0,$zero -/* f04251c: 5520002f */ bnezl $t1,.L0f0425dc -/* f042520: 02202825 */ or $a1,$s1,$zero -/* f042524: 82020032 */ lb $v0,0x32($s0) -/* f042528: 12220004 */ beq $s1,$v0,.L0f04253c -/* f04252c: 02025021 */ addu $t2,$s0,$v0 -/* f042530: 814c003a */ lb $t4,0x3a($t2) -/* f042534: 55800029 */ bnezl $t4,.L0f0425dc -/* f042538: 02202825 */ or $a1,$s1,$zero -.L0f04253c: -/* f04253c: 8e05002c */ lw $a1,0x2c($s0) -/* f042540: c4a00020 */ lwc1 $f0,0x20($a1) -/* f042544: 4600b03e */ c.le.s $f22,$f0 -/* f042548: 00000000 */ nop -/* f04254c: 4502000b */ bc1fl .L0f04257c -/* f042550: 4616003c */ c.lt.s $f0,$f22 -/* f042554: 4614003e */ c.le.s $f0,$f20 -/* f042558: 00000000 */ nop -/* f04255c: 45020007 */ bc1fl .L0f04257c -/* f042560: 4616003c */ c.lt.s $f0,$f22 -/* f042564: c4a80024 */ lwc1 $f8,0x24($a1) -/* f042568: 4608a03e */ c.le.s $f20,$f8 -/* f04256c: 00000000 */ nop -/* f042570: 4503000b */ bc1tl .L0f0425a0 -/* f042574: 820b0032 */ lb $t3,0x32($s0) -/* f042578: 4616003c */ c.lt.s $f0,$f22 -.L0f04257c: -/* f04257c: 00000000 */ nop -/* f042580: 45020016 */ bc1fl .L0f0425dc -/* f042584: 02202825 */ or $a1,$s1,$zero -/* f042588: c4aa0018 */ lwc1 $f10,0x18($a1) -/* f04258c: 4614503e */ c.le.s $f10,$f20 -/* f042590: 00000000 */ nop -/* f042594: 45020011 */ bc1fl .L0f0425dc -/* f042598: 02202825 */ or $a1,$s1,$zero -.L0f04259c: -/* f04259c: 820b0032 */ lb $t3,0x32($s0) -.L0f0425a0: -/* f0425a0: 820d0033 */ lb $t5,0x33($s0) -/* f0425a4: a2060031 */ sb $a2,0x31($s0) -/* f0425a8: 00cb4023 */ subu $t0,$a2,$t3 -/* f0425ac: 25af0001 */ addiu $t7,$t5,0x1 -/* f0425b0: a2080032 */ sb $t0,0x32($s0) -/* f0425b4: a20f0033 */ sb $t7,0x33($s0) -/* f0425b8: 3c0e800a */ lui $t6,%hi(g_Vars+0x8) -/* f0425bc: 8dce9fc8 */ lw $t6,%lo(g_Vars+0x8)($t6) -/* f0425c0: 02002025 */ or $a0,$s0,$zero -/* f0425c4: 02202825 */ or $a1,$s1,$zero -/* f0425c8: 0fc0fe62 */ jal func0f03f988 -/* f0425cc: ae0e0044 */ sw $t6,0x44($s0) -/* f0425d0: 10000009 */ b .L0f0425f8 -/* f0425d4: 26310001 */ addiu $s1,$s1,0x1 -/* f0425d8: 02202825 */ or $a1,$s1,$zero -.L0f0425dc: -/* f0425dc: 0fc0fe62 */ jal func0f03f988 -/* f0425e0: 00003025 */ or $a2,$zero,$zero -/* f0425e4: 10000004 */ b .L0f0425f8 -/* f0425e8: 26310001 */ addiu $s1,$s1,0x1 -.L0f0425ec: -/* f0425ec: 0fc0fe62 */ jal func0f03f988 -/* f0425f0: 00003025 */ or $a2,$zero,$zero -.L0f0425f4: -/* f0425f4: 26310001 */ addiu $s1,$s1,0x1 -.L0f0425f8: -/* f0425f8: 24010002 */ addiu $at,$zero,0x2 -/* f0425fc: 1621ff53 */ bne $s1,$at,.L0f04234c -/* f042600: 26520001 */ addiu $s2,$s2,0x1 -/* f042604: 8fbf0044 */ lw $ra,0x44($sp) -.L0f042608: -/* f042608: d7b40018 */ ldc1 $f20,0x18($sp) -/* f04260c: d7b60020 */ ldc1 $f22,0x20($sp) -/* f042610: d7b80028 */ ldc1 $f24,0x28($sp) -/* f042614: 8fb00034 */ lw $s0,0x34($sp) -/* f042618: 8fb10038 */ lw $s1,0x38($sp) -/* f04261c: 8fb2003c */ lw $s2,0x3c($sp) -/* f042620: 8fb30040 */ lw $s3,0x40($sp) -/* f042624: 03e00008 */ jr $ra -/* f042628: 27bd0070 */ addiu $sp,$sp,0x70 -); -#endif +void chrTickFire(struct chrdata *chr) +{ + struct model *model = chr->model; + f32 curframe = modelGetCurAnimFrame(model); + s32 i; + + if (modelGetAnimNum(model) == ANIM_SNIPING_GETDOWN) { + return; + } + + if (chr->act_attack.lastontarget60 < chr->act_attack.lastfire60 - PALDOWN(30) + && model->anim->animnum2 == 0 + && curframe > chr->act_attack.animcfg->unk18 + 10 + && curframe < chr->act_attack.animcfg->unk1c + && (chr->act_attack.animcfg->unk24 < 0 || curframe < chr->act_attack.animcfg->unk24)) { + if (!chr->act_attack.dorecoil) { + if (!func0f041c44(chr)) { + modelSetAnimation(model, modelGetAnimNum(model), model->anim->flip, + chr->act_attack.animcfg->unk1c, chrGetRangedSpeed(chr, 0.5f, 0.8f), 8); + + if (chr->act_attack.animcfg->unk14 >= 0) { + modelSetAnimEndFrame(model, chr->act_attack.animcfg->unk14); + } + } + } else { + chrAttackAmountUpdateAnimation(chr); + } + + chr->act_attack.numshots = chr->act_attack.maxshots + 1; + + curframe = modelGetCurAnimFrame(model); + } + + if (curframe >= modelGetAnimEndFrame(model)) { + if (modelGetAnimNum(model) != ANIM_SNIPING_ONGROUND + && (chr->act_attack.dooneburst || chr->act_attack.numshots > chr->act_attack.maxshots)) { + if (!func0f041c44(chr)) { + if (chr->act_attack.flags & ATTACKFLAG_AIMATTARGET) { + chrRecordLastSeeTargetTime(chr); + } + + chrStop(chr); + return; + } + } else if (chr->act_attack.numshots == chr->act_attack.maxshots) { + chr->act_attack.numshots++; + chrAttackAmountUpdateAnimation(chr); + } else if (chr->act_attack.fired) { + f32 f2 = 0.5f; + f32 startframe; + f32 endframe; + f32 diff; + + if (chr->act_attack.dorecoil) { + if (chr->act_attack.animcfg->unk20 > 0) { + startframe = chr->act_attack.animcfg->unk20; + } else { + startframe = chr->act_attack.animcfg->unk18; + } + + if (chr->act_attack.animcfg->unk24 > 0) { + endframe = chr->act_attack.animcfg->unk24; + } else { + endframe = chr->act_attack.animcfg->unk1c; + } + } else { + startframe = chr->act_attack.animcfg->unk18; + + if (chr->act_attack.animcfg->unk20 > 0) { + endframe = chr->act_attack.animcfg->unk20; + } else { + endframe = chr->act_attack.animcfg->unk1c; + } + } + + diff = endframe - startframe; + + if (diff < 12) { + f2 = diff * (1.0f / 24.0f); + } else if (diff > 16) { + f2 = diff * (1.0f / 32.0f); + } + + if (chr->act_attack.everytick[HAND_RIGHT] && chr->act_attack.everytick[HAND_LEFT]) { + f2 = f2 + f2; + } + + chr->act_attack.fired = false; + + modelSetAnimation(model, modelGetAnimNum(model), model->anim->flip, startframe, f2, 8); + modelSetAnimEndFrame(model, endframe); + } + + curframe = modelGetCurAnimFrame(model); + } + + if (modelGetAnimNum(model) != ANIM_SNIPING_ONGROUND && (chr->act_attack.flags & ATTACKFLAG_DONTTURN) == 0) { + f32 f2 = chr->act_attack.animcfg->unk0c; + f32 f12 = chr->act_attack.animcfg->unk04; + + if ((chr->act_attack.flags & ATTACKFLAG_AIMONLY) && f12 > modelGetAnimEndFrame(model)) { + f12 = modelGetAnimEndFrame(model); + } + + if (model->anim->flip) { + f2 = M_BADTAU - f2; + } + + chr->act_attack.turning = func0f03e788(chr, chr->act_attack.turning, f12, chrGetRangedSpeed(chr, 1, 1.6f), f2); + } + + if ((curframe > chr->act_attack.animcfg->unk28 && curframe < chr->act_attack.animcfg->unk2c) + || modelGetAnimNum(model) == ANIM_SNIPING_ONGROUND) { + func0f03e9f4(chr, chr->act_attack.animcfg, chr->act_attack.firegun[HAND_LEFT], chr->act_attack.firegun[HAND_RIGHT], 1); + } else { + chrResetAimEndProperties(chr); + } + + for (i = 0; i < 2; i++) { + if (chr->act_attack.firegun[i]) { + if (chr->act_attack.everytick[i] == 0) { + if (modelGetAnimNum(model) == ANIM_SNIPING_ONGROUND + || (curframe >= chr->act_attack.animcfg->unk18 && curframe < chr->act_attack.animcfg->unk1c)) { + func0f03f988(chr, i, true); + + chr->act_attack.lastfire60 = g_Vars.lvframe60; + + if (chr->actiontype == ACT_ATTACKROLL) { + f32 f12 = chr->act_attack.animcfg->unk1c - chr->act_attack.animcfg->unk18; + + if (f12 < 30) { + if (chr->act_attack.pausecount >= PALDOWN(60) - (s32)(PAL ? f12 * (50.0f / 60.0f) : f12) * 2) { + modelSetAnimSpeed(model, 0.5f, 0); + } else { + modelSetAnimSpeed(model, 0.1f, 0); + chr->act_attack.pausecount += g_Vars.lvupdate240_60; + } + } else { + modelSetAnimSpeed(model, 0.5f, 0); + } + } else { + modelSetAnimSpeed(model, 0.5f, 0); + } + } else { + func0f03f988(chr, i, false); + + if (chr->actiontype == ACT_ATTACKROLL) { + modelSetAnimSpeed(model, chrGetRangedSpeed(chr, 0.5f, 0.8f), 0); + } else { + modelSetAnimSpeed(model, chrGetRangedSpeed(chr, 0.5f, 0.8f), 0); + } + } + } else if (modelGetAnimNum(model) == ANIM_SNIPING_ONGROUND + || ((!chr->act_attack.fired && (i == chr->act_attack.nextgun || !chr->act_attack.everytick[chr->act_attack.nextgun])) + && ((chr->act_attack.animcfg->unk20 >= 0 && curframe >= chr->act_attack.animcfg->unk20 && curframe <= chr->act_attack.animcfg->unk24) + || (chr->act_attack.animcfg->unk20 < 0 && curframe >= chr->act_attack.animcfg->unk18)))) { + chr->act_attack.fired = true; + chr->act_attack.nextgun = 1 - chr->act_attack.nextgun; + chr->act_attack.numshots++; + chr->act_attack.lastfire60 = g_Vars.lvframe60; + + func0f03f988(chr, i, true); + } else { + func0f03f988(chr, i, false); + } + } else { + func0f03f988(chr, i, false); + } + } +} void chrTickAttackAmount(struct chrdata *chr) { @@ -20069,7 +19114,7 @@ void chrTickAttack(struct chrdata *chr) } } - func0f041e48(chr); + chrTickFire(chr); } void chrTickAttackRoll(struct chrdata *chr) @@ -20195,7 +19240,7 @@ void chrTickAttackRoll(struct chrdata *chr) } } - func0f041e48(chr); + chrTickFire(chr); } void propPrintDangerous(void) diff --git a/src/include/game/chr/chraction.h b/src/include/game/chr/chraction.h index b4c83e21b..2ca55c8c0 100644 --- a/src/include/game/chr/chraction.h +++ b/src/include/game/chr/chraction.h @@ -138,7 +138,7 @@ void func0f03e29c(struct chrdata *chr, s32 arg1, s32 arg2, s32 arg3, struct coor f32 chrGetInverseTheta(struct chrdata *chr); f32 chrGetAimAngle(struct chrdata *chr); f32 func0f03e754(struct chrdata *chr); -void func0f03e788(struct chrdata *chr, s32 arg1, f32 arg2, f32 arg3, f32 arg4); +s32 func0f03e788(struct chrdata *chr, s32 turning, f32 arg2, f32 arg3, f32 arg4); bool func0f03e9f4(struct chrdata *chr, struct attackanimconfig *animcfg, s32 arg2, s32 arg3, f32 arg4); u32 func0f03f778(void); f32 chrGetAimLimitAngle(f32 sqdist); @@ -148,9 +148,9 @@ void chrCalculateShieldHit(struct chrdata *chr, struct coord *pos, struct coord void func0f04031c(struct coord *coord, f32 arg1, struct coord *coord2, f32 *arg3); u32 func0f0404d4(void); u32 func0f041a74(void); -u32 func0f041c44(void); +bool func0f041c44(struct chrdata *chr); void chrAttackAmountUpdateAnimation(struct chrdata *chr); -void func0f041e48(struct chrdata *chr); +void chrTickFire(struct chrdata *chr); void chrTickAttackAmount(struct chrdata *chr); void robotSetMuzzleFlash(struct chrdata *chr, bool right, bool enabled); void robotAttack(struct chrdata *chr); diff --git a/src/include/types.h b/src/include/types.h index 4be36f4e6..9f4325eab 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -1076,15 +1076,15 @@ struct act_preargh { struct act_attack { /*0x2c*/ struct attackanimconfig *animcfg; /*0x30*/ s8 turning; - /*0x31*/ u8 fired; - /*0x32*/ u8 nextgun; + /*0x31*/ s8 fired; + /*0x32*/ s8 nextgun; /*0x33*/ s8 numshots; // number of shots fired so far in this anim /*0x34*/ s8 maxshots; // number of shots to attempt in this anim /*0x35*/ s8 onehanded; /*0x36*/ s8 dorecoil; /*0x37*/ s8 dooneburst; /*0x38*/ s8 firegun[2]; // whether this gun is going to attempt to fire in this anim - /*0x3a*/ u8 everytick[2]; // whether gun's fire rate is high enough to fire on every tick + /*0x3a*/ s8 everytick[2]; // whether gun's fire rate is high enough to fire on every tick /*0x3c*/ u8 singleshot[2]; /*0x3e*/ s8 flip; /*0x40*/ s32 pausecount;