Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Update()

void Terraria.Gore.Update ( )
inline

Definition at line 312 of file Gore.cs.

313 {
314 if (Main.netMode == 2 || !active)
315 {
316 return;
317 }
318 if (sticky)
319 {
321 {
322 return;
323 }
324 float num = velocity.Length();
325 if (num > 32f)
326 {
327 velocity *= 32f / num;
328 }
329 }
330 switch (GoreID.Sets.SpecialAI[type])
331 {
332 case 4:
334 return;
335 case 5:
337 return;
338 case 6:
340 return;
341 case 7:
343 return;
344 }
345 if ((type == 1217 || type == 1218) && frameCounter == 0)
346 {
347 frameCounter = 1;
348 Frame.CurrentRow = (byte)Main.rand.Next(3);
349 }
350 bool flag = type >= 1024 && type <= 1026;
351 if (type >= 276 && type <= 282)
352 {
353 velocity.X *= 0.98f;
354 velocity.Y *= 0.98f;
355 if (velocity.Y < scale)
356 {
357 velocity.Y += 0.05f;
358 }
359 if ((double)velocity.Y > 0.1)
360 {
361 if (velocity.X > 0f)
362 {
363 rotation += 0.01f;
364 }
365 else
366 {
367 rotation -= 0.01f;
368 }
369 }
370 }
371 if (type >= 570 && type <= 572)
372 {
373 scale -= 0.001f;
374 if ((double)scale <= 0.01)
375 {
376 scale = 0.01f;
377 timeLeft = 0;
378 }
379 sticky = false;
380 rotation = velocity.X * 0.1f;
381 }
382 else if ((type >= 706 && type <= 717) || type == 943 || type == 1147 || (type >= 1160 && type <= 1162))
383 {
384 if (type == 943 || (type >= 1160 && type <= 1162))
385 {
386 alpha = 0;
387 }
388 else if ((double)position.Y < Main.worldSurface * 16.0 + 8.0)
389 {
390 alpha = 0;
391 }
392 else
393 {
394 alpha = 100;
395 }
396 int num2 = 4;
397 frameCounter++;
398 if (frame <= 4)
399 {
400 int num3 = (int)(position.X / 16f);
401 int num4 = (int)(position.Y / 16f) - 1;
402 if (WorldGen.InWorld(num3, num4) && !Main.tile[num3, num4].active())
403 {
404 active = false;
405 }
406 if (frame == 0)
407 {
408 num2 = 24 + Main.rand.Next(256);
409 }
410 if (frame == 1)
411 {
412 num2 = 24 + Main.rand.Next(256);
413 }
414 if (frame == 2)
415 {
416 num2 = 24 + Main.rand.Next(256);
417 }
418 if (frame == 3)
419 {
420 num2 = 24 + Main.rand.Next(96);
421 }
422 if (frame == 5)
423 {
424 num2 = 16 + Main.rand.Next(64);
425 }
426 if (type == 716)
427 {
428 num2 *= 2;
429 }
430 if (type == 717)
431 {
432 num2 *= 4;
433 }
434 if ((type == 943 || (type >= 1160 && type <= 1162)) && frame < 6)
435 {
436 num2 = 4;
437 }
438 if (frameCounter >= num2)
439 {
440 frameCounter = 0;
441 frame++;
442 if (frame == 5)
443 {
444 int num5 = NewGore(position, velocity, type);
445 Main.gore[num5].frame = 9;
446 Main.gore[num5].velocity *= 0f;
447 }
448 }
449 }
450 else if (frame <= 6)
451 {
452 num2 = 8;
453 if (type == 716)
454 {
455 num2 *= 2;
456 }
457 if (type == 717)
458 {
459 num2 *= 3;
460 }
461 if (frameCounter >= num2)
462 {
463 frameCounter = 0;
464 frame++;
465 if (frame == 7)
466 {
467 active = false;
468 }
469 }
470 }
471 else if (frame <= 9)
472 {
473 num2 = 6;
474 if (type == 716)
475 {
476 num2 = (int)((double)num2 * 1.5);
477 velocity.Y += 0.175f;
478 }
479 else if (type == 717)
480 {
481 num2 *= 2;
482 velocity.Y += 0.15f;
483 }
484 else if (type == 943)
485 {
486 num2 = (int)((double)num2 * 1.5);
487 velocity.Y += 0.2f;
488 }
489 else
490 {
491 velocity.Y += 0.2f;
492 }
493 if ((double)velocity.Y < 0.5)
494 {
495 velocity.Y = 0.5f;
496 }
497 if (velocity.Y > 12f)
498 {
499 velocity.Y = 12f;
500 }
501 if (frameCounter >= num2)
502 {
503 frameCounter = 0;
504 frame++;
505 }
506 if (frame > 9)
507 {
508 frame = 7;
509 }
510 }
511 else
512 {
513 if (type == 716)
514 {
515 num2 *= 2;
516 }
517 else if (type == 717)
518 {
519 num2 *= 6;
520 }
521 velocity.Y += 0.1f;
522 if (frameCounter >= num2)
523 {
524 frameCounter = 0;
525 frame++;
526 }
527 velocity *= 0f;
528 if (frame > 14)
529 {
530 active = false;
531 }
532 }
533 }
534 else if (type == 11 || type == 12 || type == 13 || type == 61 || type == 62 || type == 63 || type == 99 || type == 220 || type == 221 || type == 222 || (type >= 375 && type <= 377) || (type >= 435 && type <= 437) || (type >= 861 && type <= 862))
535 {
536 velocity.Y *= 0.98f;
537 velocity.X *= 0.98f;
538 scale -= 0.007f;
539 if ((double)scale < 0.1)
540 {
541 scale = 0.1f;
542 alpha = 255;
543 }
544 }
545 else if (type == 16 || type == 17)
546 {
547 velocity.Y *= 0.98f;
548 velocity.X *= 0.98f;
549 scale -= 0.01f;
550 if ((double)scale < 0.1)
551 {
552 scale = 0.1f;
553 alpha = 255;
554 }
555 }
556 else if (type == 1201)
557 {
558 if (frameCounter == 0)
559 {
560 frameCounter = 1;
561 Frame.CurrentRow = (byte)Main.rand.Next(4);
562 }
563 scale -= 0.002f;
564 if ((double)scale < 0.1)
565 {
566 scale = 0.1f;
567 alpha = 255;
568 }
569 rotation += velocity.X * 0.1f;
570 int num6 = (int)(position.X + 6f) / 16;
571 int num7 = (int)(position.Y - 6f) / 16;
572 if (Main.tile[num6, num7] == null || Main.tile[num6, num7].liquid <= 0)
573 {
574 velocity.Y += 0.2f;
575 if (velocity.Y < 0f)
576 {
577 velocity *= 0.92f;
578 }
579 }
580 else
581 {
582 velocity.Y += 0.005f;
583 float num8 = velocity.Length();
584 if (num8 > 1f)
585 {
586 velocity *= 0.1f;
587 }
588 else if (num8 > 0.1f)
589 {
590 velocity *= 0.98f;
591 }
592 }
593 }
594 else if (type == 1208)
595 {
596 if (frameCounter == 0)
597 {
598 frameCounter = 1;
599 Frame.CurrentRow = (byte)Main.rand.Next(4);
600 }
601 Vector2 vector = position + new Vector2(Width, Height) / 2f;
602 int num9 = (int)vector.X / 16;
603 int num10 = (int)vector.Y / 16;
604 bool flag2 = Main.tile[num9, num10] != null && Main.tile[num9, num10].liquid > 0;
605 scale -= 0.0005f;
606 if ((double)scale < 0.1)
607 {
608 scale = 0.1f;
609 alpha = 255;
610 }
611 rotation += velocity.X * 0.1f;
612 if (flag2)
613 {
614 velocity.X *= 0.9f;
615 int num11 = (int)vector.X / 16;
616 int num12 = (int)(vector.Y / 16f);
617 _ = position.Y / 16f;
618 int num13 = (int)((position.Y + Height) / 16f);
619 if (Main.tile[num11, num12] == null)
620 {
621 Main.tile[num11, num12] = new Tile();
622 }
623 if (Main.tile[num11, num13] == null)
624 {
625 Main.tile[num11, num13] = new Tile();
626 }
627 if (velocity.Y > 0f)
628 {
629 velocity.Y *= 0.5f;
630 }
631 num11 = (int)(vector.X / 16f);
632 num12 = (int)(vector.Y / 16f);
633 float num14 = ChumFloatingChunk_GetWaterLine(num11, num12);
634 if (vector.Y > num14)
635 {
636 velocity.Y -= 0.1f;
637 if (velocity.Y < -8f)
638 {
639 velocity.Y = -8f;
640 }
641 if (vector.Y + velocity.Y < num14)
642 {
643 velocity.Y = num14 - vector.Y;
644 }
645 }
646 else
647 {
648 velocity.Y = num14 - vector.Y;
649 }
650 bool flag3 = !flag2 && velocity.Length() < 0.8f;
651 int maxValue = (flag2 ? 270 : 15);
652 if (Main.rand.Next(maxValue) == 0 && !flag3)
653 {
654 Gore gore = NewGoreDirect(position + Vector2.UnitY * 6f, Vector2.Zero, 1201, scale * 0.7f);
655 if (flag2)
656 {
657 gore.velocity = Vector2.UnitX * Main.rand.NextFloatDirection() * 0.5f + Vector2.UnitY * Main.rand.NextFloat();
658 }
659 else if (gore.velocity.Y < 0f)
660 {
661 gore.velocity.Y = 0f - gore.velocity.Y;
662 }
663 }
664 }
665 else
666 {
667 if (velocity.Y == 0f)
668 {
669 velocity.X *= 0.95f;
670 }
671 velocity.X *= 0.98f;
672 velocity.Y += 0.3f;
673 if (velocity.Y > 15.9f)
674 {
675 velocity.Y = 15.9f;
676 }
677 }
678 }
679 else if (type == 331)
680 {
681 alpha += 5;
682 velocity.Y *= 0.95f;
683 velocity.X *= 0.95f;
684 rotation = velocity.X * 0.1f;
685 }
686 else if (GoreID.Sets.SpecialAI[type] == 3)
687 {
688 if (++frameCounter >= 8 && velocity.Y > 0.2f)
689 {
690 frameCounter = 0;
691 int num15 = Frame.CurrentRow / 4;
692 if (++Frame.CurrentRow >= 4 + num15 * 4)
693 {
694 Frame.CurrentRow = (byte)(num15 * 4);
695 }
696 }
697 }
698 else if (GoreID.Sets.SpecialAI[type] != 1 && GoreID.Sets.SpecialAI[type] != 2)
699 {
700 if (type >= 907 && type <= 909)
701 {
702 rotation = 0f;
703 velocity.X *= 0.98f;
704 if (velocity.Y > 0f && velocity.Y < 0.001f)
705 {
706 velocity.Y = -0.5f + Main.rand.NextFloat() * -3f;
707 }
708 if (velocity.Y > -1f)
709 {
710 velocity.Y -= 0.1f;
711 }
712 if (scale < 1f)
713 {
714 scale += 0.1f;
715 }
716 if (++frameCounter >= 8)
717 {
718 frameCounter = 0;
719 if (++frame >= 3)
720 {
721 frame = 0;
722 }
723 }
724 }
725 else if (type == 1218)
726 {
727 if (timeLeft > 8)
728 {
729 timeLeft = 8;
730 }
731 velocity.X *= 0.95f;
732 if (Math.Abs(velocity.X) <= 0.1f)
733 {
734 velocity.X = 0f;
735 }
736 if (alpha < 100 && velocity.Length() > 0f && Main.rand.Next(5) == 0)
737 {
738 int num16 = 246;
739 switch (Frame.CurrentRow)
740 {
741 case 0:
742 num16 = 246;
743 break;
744 case 1:
745 num16 = 245;
746 break;
747 case 2:
748 num16 = 244;
749 break;
750 }
751 int num17 = Dust.NewDust(position + new Vector2(6f, 4f), 4, 4, num16);
752 Main.dust[num17].alpha = 255;
753 Main.dust[num17].scale = 0.8f;
754 Main.dust[num17].velocity = Vector2.Zero;
755 }
756 velocity.Y += 0.2f;
757 rotation = 0f;
758 }
759 else if (type < 411 || type > 430)
760 {
761 velocity.Y += 0.2f;
762 rotation += velocity.X * 0.05f;
763 }
764 else if (GoreID.Sets.SpecialAI[type] != 3)
765 {
766 rotation += velocity.X * 0.1f;
767 }
768 }
769 if (type >= 580 && type <= 582)
770 {
771 rotation = 0f;
772 velocity.X *= 0.95f;
773 }
774 if (GoreID.Sets.SpecialAI[type] == 2)
775 {
776 if (timeLeft < 60)
777 {
778 alpha += Main.rand.Next(1, 7);
779 }
780 else if (alpha > 100)
781 {
782 alpha -= Main.rand.Next(1, 4);
783 }
784 if (alpha < 0)
785 {
786 alpha = 0;
787 }
788 if (alpha > 255)
789 {
790 timeLeft = 0;
791 }
792 velocity.X = (velocity.X * 50f + Main.WindForVisuals * 2f + (float)Main.rand.Next(-10, 11) * 0.1f) / 51f;
793 float num18 = 0f;
794 if (velocity.X < 0f)
795 {
796 num18 = velocity.X * 0.2f;
797 }
798 velocity.Y = (velocity.Y * 50f + -0.35f + num18 + (float)Main.rand.Next(-10, 11) * 0.2f) / 51f;
799 rotation = velocity.X * 0.6f;
800 float num19 = -1f;
801 if (TextureAssets.Gore[type].IsLoaded)
802 {
803 Rectangle rectangle = new Rectangle((int)position.X, (int)position.Y, (int)((float)TextureAssets.Gore[type].Width() * scale), (int)((float)TextureAssets.Gore[type].Height() * scale));
804 for (int i = 0; i < 255; i++)
805 {
806 if (Main.player[i].active && !Main.player[i].dead)
807 {
808 Rectangle value = new Rectangle((int)Main.player[i].position.X, (int)Main.player[i].position.Y, Main.player[i].width, Main.player[i].height);
809 if (rectangle.Intersects(value))
810 {
811 timeLeft = 0;
812 num19 = Main.player[i].velocity.Length();
813 break;
814 }
815 }
816 }
817 }
818 if (timeLeft > 0)
819 {
820 if (Main.rand.Next(2) == 0)
821 {
822 timeLeft--;
823 }
824 if (Main.rand.Next(50) == 0)
825 {
826 timeLeft -= 5;
827 }
828 if (Main.rand.Next(100) == 0)
829 {
830 timeLeft -= 10;
831 }
832 }
833 else
834 {
835 alpha = 255;
836 if (TextureAssets.Gore[type].IsLoaded && num19 != -1f)
837 {
838 float num20 = (float)TextureAssets.Gore[type].Width() * scale * 0.8f;
839 float x = position.X;
840 float y = position.Y;
841 float num21 = (float)TextureAssets.Gore[type].Width() * scale;
842 float num22 = (float)TextureAssets.Gore[type].Height() * scale;
843 int num23 = 31;
844 for (int j = 0; (float)j < num20; j++)
845 {
846 int num24 = Dust.NewDust(new Vector2(x, y), (int)num21, (int)num22, num23);
847 Main.dust[num24].velocity *= (1f + num19) / 3f;
848 Main.dust[num24].noGravity = true;
849 Main.dust[num24].alpha = 100;
850 Main.dust[num24].scale = scale;
851 }
852 }
853 }
854 }
855 if (type >= 411 && type <= 430)
856 {
857 alpha = 50;
858 velocity.X = (velocity.X * 50f + Main.WindForVisuals * 2f + (float)Main.rand.Next(-10, 11) * 0.1f) / 51f;
859 velocity.Y = (velocity.Y * 50f + -0.25f + (float)Main.rand.Next(-10, 11) * 0.2f) / 51f;
860 rotation = velocity.X * 0.3f;
861 if (TextureAssets.Gore[type].IsLoaded)
862 {
863 Rectangle rectangle2 = new Rectangle((int)position.X, (int)position.Y, (int)((float)TextureAssets.Gore[type].Width() * scale), (int)((float)TextureAssets.Gore[type].Height() * scale));
864 for (int k = 0; k < 255; k++)
865 {
866 if (Main.player[k].active && !Main.player[k].dead)
867 {
868 Rectangle value2 = new Rectangle((int)Main.player[k].position.X, (int)Main.player[k].position.Y, Main.player[k].width, Main.player[k].height);
869 if (rectangle2.Intersects(value2))
870 {
871 timeLeft = 0;
872 }
873 }
874 }
875 if (Collision.SolidCollision(position, (int)((float)TextureAssets.Gore[type].Width() * scale), (int)((float)TextureAssets.Gore[type].Height() * scale)))
876 {
877 timeLeft = 0;
878 }
879 }
880 if (timeLeft > 0)
881 {
882 if (Main.rand.Next(2) == 0)
883 {
884 timeLeft--;
885 }
886 if (Main.rand.Next(50) == 0)
887 {
888 timeLeft -= 5;
889 }
890 if (Main.rand.Next(100) == 0)
891 {
892 timeLeft -= 10;
893 }
894 }
895 else
896 {
897 alpha = 255;
898 if (TextureAssets.Gore[type].IsLoaded)
899 {
900 float num25 = (float)TextureAssets.Gore[type].Width() * scale * 0.8f;
901 float x2 = position.X;
902 float y2 = position.Y;
903 float num26 = (float)TextureAssets.Gore[type].Width() * scale;
904 float num27 = (float)TextureAssets.Gore[type].Height() * scale;
905 int num28 = 176;
906 if (type >= 416 && type <= 420)
907 {
908 num28 = 177;
909 }
910 if (type >= 421 && type <= 425)
911 {
912 num28 = 178;
913 }
914 if (type >= 426 && type <= 430)
915 {
916 num28 = 179;
917 }
918 for (int l = 0; (float)l < num25; l++)
919 {
920 int num29 = Dust.NewDust(new Vector2(x2, y2), (int)num26, (int)num27, num28);
921 Main.dust[num29].noGravity = true;
922 Main.dust[num29].alpha = 100;
923 Main.dust[num29].scale = scale;
924 }
925 }
926 }
927 }
928 else if (GoreID.Sets.SpecialAI[type] != 3 && GoreID.Sets.SpecialAI[type] != 1)
929 {
930 if ((type >= 706 && type <= 717) || type == 943 || type == 1147 || (type >= 1160 && type <= 1162))
931 {
932 if (type == 716)
933 {
934 float num30 = 1f;
935 float num31 = 1f;
936 float num32 = 1f;
937 float num33 = 0.6f;
938 num33 = ((frame == 0) ? (num33 * 0.1f) : ((frame == 1) ? (num33 * 0.2f) : ((frame == 2) ? (num33 * 0.3f) : ((frame == 3) ? (num33 * 0.4f) : ((frame == 4) ? (num33 * 0.5f) : ((frame == 5) ? (num33 * 0.4f) : ((frame == 6) ? (num33 * 0.2f) : ((frame <= 9) ? (num33 * 0.5f) : ((frame == 10) ? (num33 * 0.5f) : ((frame == 11) ? (num33 * 0.4f) : ((frame == 12) ? (num33 * 0.3f) : ((frame == 13) ? (num33 * 0.2f) : ((frame != 14) ? 0f : (num33 * 0.1f))))))))))))));
939 num30 = 1f * num33;
940 num31 = 0.5f * num33;
941 num32 = 0.1f * num33;
942 Lighting.AddLight(position + new Vector2(8f, 8f), num30, num31, num32);
943 }
944 Vector2 vector2 = velocity;
945 velocity = Collision.TileCollision(position, velocity, 16, 14);
946 if (velocity != vector2)
947 {
948 if (frame < 10)
949 {
950 frame = 10;
951 frameCounter = 0;
952 if (type != 716 && type != 717 && type != 943 && (type < 1160 || type > 1162))
953 {
954 SoundEngine.PlaySound(39, (int)position.X + 8, (int)position.Y + 8, Main.rand.Next(2));
955 }
956 }
957 }
958 else if (Collision.WetCollision(position + velocity, 16, 14))
959 {
960 if (frame < 10)
961 {
962 frame = 10;
963 frameCounter = 0;
964 if (type != 716 && type != 717 && type != 943 && (type < 1160 || type > 1162))
965 {
966 SoundEngine.PlaySound(39, (int)position.X + 8, (int)position.Y + 8, 2);
967 }
968 ((WaterShaderData)Filters.Scene["WaterDistortion"].GetShader()).QueueRipple(position + new Vector2(8f, 8f));
969 }
970 int num34 = (int)(position.X + 8f) / 16;
971 int num35 = (int)(position.Y + 14f) / 16;
972 if (Main.tile[num34, num35] != null && Main.tile[num34, num35].liquid > 0)
973 {
974 velocity *= 0f;
975 position.Y = num35 * 16 - Main.tile[num34, num35].liquid / 16;
976 }
977 }
978 }
979 else if (sticky)
980 {
981 int num36 = 32;
982 if (TextureAssets.Gore[type].IsLoaded)
983 {
984 num36 = TextureAssets.Gore[type].Width();
985 if (TextureAssets.Gore[type].Height() < num36)
986 {
987 num36 = TextureAssets.Gore[type].Height();
988 }
989 }
990 if (flag)
991 {
992 num36 = 4;
993 }
994 num36 = (int)((float)num36 * 0.9f);
995 _ = velocity;
996 velocity = Collision.TileCollision(position, velocity, (int)((float)num36 * scale), (int)((float)num36 * scale));
997 if (velocity.Y == 0f)
998 {
999 if (flag)
1000 {
1001 velocity.X *= 0.94f;
1002 }
1003 else
1004 {
1005 velocity.X *= 0.97f;
1006 }
1007 if ((double)velocity.X > -0.01 && (double)velocity.X < 0.01)
1008 {
1009 velocity.X = 0f;
1010 }
1011 }
1012 if (timeLeft > 0)
1013 {
1015 }
1016 else
1017 {
1019 }
1020 }
1021 else
1022 {
1024 }
1025 }
1026 if (type >= 907 && type <= 909)
1027 {
1028 int num37 = 32;
1029 if (TextureAssets.Gore[type].IsLoaded)
1030 {
1031 num37 = TextureAssets.Gore[type].Width();
1032 if (TextureAssets.Gore[type].Height() < num37)
1033 {
1034 num37 = TextureAssets.Gore[type].Height();
1035 }
1036 }
1037 num37 = (int)((float)num37 * 0.9f);
1038 Vector4 vector3 = Collision.SlopeCollision(position, velocity, num37, num37, 0f, fall: true);
1039 position.X = vector3.X;
1040 position.Y = vector3.Y;
1041 velocity.X = vector3.Z;
1042 velocity.Y = vector3.W;
1043 }
1044 if (GoreID.Sets.SpecialAI[type] == 1)
1045 {
1047 }
1048 else if (GoreID.Sets.SpecialAI[type] == 3)
1049 {
1051 }
1052 else
1053 {
1054 position += velocity;
1055 }
1056 if (alpha >= 255)
1057 {
1058 active = false;
1059 }
1060 if (light > 0f)
1061 {
1062 float num38 = light * scale;
1063 float num39 = light * scale;
1064 float num40 = light * scale;
1065 if (type == 16)
1066 {
1067 num40 *= 0.3f;
1068 num39 *= 0.8f;
1069 }
1070 else if (type == 17)
1071 {
1072 num39 *= 0.6f;
1073 num38 *= 0.3f;
1074 }
1075 if (TextureAssets.Gore[type].IsLoaded)
1076 {
1077 Lighting.AddLight((int)((position.X + (float)TextureAssets.Gore[type].Width() * scale / 2f) / 16f), (int)((position.Y + (float)TextureAssets.Gore[type].Height() * scale / 2f) / 16f), num38, num39, num40);
1078 }
1079 else
1080 {
1081 Lighting.AddLight((int)((position.X + 32f * scale / 2f) / 16f), (int)((position.Y + 32f * scale / 2f) / 16f), num38, num39, num40);
1082 }
1083 }
1084 }
static double Abs(double value)
static void PlaySound(int type, Vector2 position, int style=1)
static Asset< Texture2D >[] Gore
Vector2 velocity
Definition Gore.cs:19
void UpdateFogMachineCloud()
Definition Gore.cs:203
Vector2 position
Definition Gore.cs:17
SpriteFrame Frame
Definition Gore.cs:41
void UpdateLightningBunnySparks()
Definition Gore.cs:243
byte frameCounter
Definition Gore.cs:39
int type
Definition Gore.cs:27
float Height
Definition Gore.cs:56
bool active
Definition Gore.cs:31
static Gore NewGoreDirect(Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
Definition Gore.cs:1283
float light
Definition Gore.cs:29
int alpha
Definition Gore.cs:25
float Width
Definition Gore.cs:44
float rotation
Definition Gore.cs:21
static int NewGore(Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
Definition Gore.cs:1288
float scale
Definition Gore.cs:23
bool sticky
Definition Gore.cs:33
bool DeactivateIfOutsideOfWorld()
Definition Gore.cs:296
int timeLeft
Definition Gore.cs:35
void Gore_UpdateLeaf()
Definition Gore.cs:1086
void UpdateAmbientFloorCloud()
Definition Gore.cs:110
float ChumFloatingChunk_GetWaterLine(int X, int Y)
Definition Gore.cs:263
byte frame
Definition Gore.cs:82
void UpdateAmbientAirborneCloud()
Definition Gore.cs:156
void Gore_UpdateSail()
Definition Gore.cs:1213
static FilterManager Scene
Definition Filters.cs:5
static int[] DisappearSpeed
Definition GoreID.cs:11
static int[] SpecialAI
Definition GoreID.cs:9
static int[] DisappearSpeedAlpha
Definition GoreID.cs:13
bool Intersects(Rectangle value)
Definition Rectangle.cs:129

References System.Math.Abs(), Terraria.Gore.active, Terraria.Lighting.AddLight(), Terraria.Gore.alpha, Terraria.Gore.ChumFloatingChunk_GetWaterLine(), Terraria.DataStructures.SpriteFrame.CurrentRow, Terraria.Gore.DeactivateIfOutsideOfWorld(), Terraria.ID.GoreID.Sets.DisappearSpeed, Terraria.ID.GoreID.Sets.DisappearSpeedAlpha, Terraria.Main.dust, Terraria.Gore.Frame, Terraria.Gore.frame, Terraria.Gore.frameCounter, Terraria.GameContent.TextureAssets.Gore, Terraria.Main.gore, Terraria.Gore.Gore_UpdateLeaf(), Terraria.Gore.Gore_UpdateSail(), Terraria.Gore.Height, Microsoft.Xna.Framework.Rectangle.Intersects(), Terraria.WorldGen.InWorld(), Microsoft.Xna.Framework.Vector2.Length(), Terraria.Gore.light, Terraria.Main.netMode, Terraria.Dust.NewDust(), Terraria.Gore.NewGore(), Terraria.Gore.NewGoreDirect(), Terraria.Main.player, Terraria.Audio.SoundEngine.PlaySound(), Terraria.Gore.position, Terraria.Main.rand, Terraria.Gore.rotation, Terraria.Gore.scale, Terraria.Graphics.Effects.Filters.Scene, Terraria.Collision.SlopeCollision(), Terraria.Collision.SolidCollision(), Terraria.ID.GoreID.Sets.SpecialAI, Terraria.Gore.sticky, Terraria.DataStructures.Tile, Terraria.Main.tile, Terraria.Collision.TileCollision(), Terraria.Gore.timeLeft, Terraria.Gore.type, Microsoft.Xna.Framework.Vector2.UnitY, Terraria.Gore.UpdateAmbientAirborneCloud(), Terraria.Gore.UpdateAmbientFloorCloud(), Terraria.Gore.UpdateFogMachineCloud(), Terraria.Gore.UpdateLightningBunnySparks(), System.value, Terraria.Gore.velocity, Microsoft.Xna.Framework.Vector4.W, Terraria.Collision.WetCollision(), Terraria.Gore.Width, Microsoft.Xna.Framework.Vector2.X, Microsoft.Xna.Framework.Vector4.X, Microsoft.Xna.Framework.Vector2.Y, Microsoft.Xna.Framework.Vector4.Y, Microsoft.Xna.Framework.Vector4.Z, and Microsoft.Xna.Framework.Vector2.Zero.