Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
Gore.cs
Go to the documentation of this file.
1using System;
8using Terraria.ID;
10
11namespace Terraria;
12
13public class Gore
14{
15 public static int goreTime = 600;
16
18
20
21 public float rotation;
22
23 public float scale;
24
25 public int alpha;
26
27 public int type;
28
29 public float light;
30
31 public bool active;
32
33 public bool sticky = true;
34
35 public int timeLeft = goreTime;
36
37 public bool behindTiles;
38
39 public byte frameCounter;
40
41 public SpriteFrame Frame = new SpriteFrame(1, 1);
42
43 public float Width
44 {
45 get
46 {
47 if (TextureAssets.Gore[type].IsLoaded)
48 {
50 }
51 return 1f;
52 }
53 }
54
55 public float Height
56 {
57 get
58 {
59 if (TextureAssets.Gore[type].IsLoaded)
60 {
62 }
63 return 1f;
64 }
65 }
66
68 {
69 get
70 {
71 if (TextureAssets.Gore[type].IsLoaded)
72 {
73 Rectangle sourceRectangle = Frame.GetSourceRectangle(TextureAssets.Gore[type].Value);
74 return new Rectangle((int)position.X, (int)position.Y, (int)((float)sourceRectangle.Width * scale), (int)((float)sourceRectangle.Height * scale));
75 }
76 return new Rectangle(0, 0, 1, 1);
77 }
78 }
79
80 [Old("Please use Frame instead.")]
81 public byte frame
82 {
83 get
84 {
85 return Frame.CurrentRow;
86 }
87 set
88 {
89 Frame.CurrentRow = value;
90 }
91 }
92
93 [Old("Please use Frame instead.")]
94 public byte numFrames
95 {
96 get
97 {
98 return Frame.RowCount;
99 }
100 set
101 {
102 SpriteFrame spriteFrame = new SpriteFrame(Frame.ColumnCount, value);
103 spriteFrame.CurrentColumn = Frame.CurrentColumn;
104 spriteFrame.CurrentRow = Frame.CurrentRow;
105 SpriteFrame spriteFrame2 = spriteFrame;
106 Frame = spriteFrame2;
107 }
108 }
109
111 {
113 if (timeLeft <= 0)
114 {
115 active = false;
116 return;
117 }
118 bool flag = false;
119 Point point = (position + new Vector2(15f, 0f)).ToTileCoordinates();
120 Tile tile = Main.tile[point.X, point.Y];
121 Tile tile2 = Main.tile[point.X, point.Y + 1];
122 Tile tile3 = Main.tile[point.X, point.Y + 2];
123 if (tile == null || tile2 == null || tile3 == null)
124 {
125 active = false;
126 return;
127 }
128 if (WorldGen.SolidTile(tile) || (!WorldGen.SolidTile(tile2) && !WorldGen.SolidTile(tile3)))
129 {
130 flag = true;
131 }
132 if (timeLeft <= 30)
133 {
134 flag = true;
135 }
136 velocity.X = 0.4f * Main.WindForVisuals;
137 if (!flag)
138 {
139 if (alpha > 220)
140 {
141 alpha--;
142 }
143 }
144 else
145 {
146 alpha++;
147 if (alpha >= 255)
148 {
149 active = false;
150 return;
151 }
152 }
154 }
155
157 {
159 if (timeLeft <= 0)
160 {
161 active = false;
162 return;
163 }
164 bool flag = false;
165 Point point = (position + new Vector2(15f, 0f)).ToTileCoordinates();
166 rotation = velocity.ToRotation();
167 Tile tile = Main.tile[point.X, point.Y];
168 if (tile == null)
169 {
170 active = false;
171 return;
172 }
173 if (WorldGen.SolidTile(tile))
174 {
175 flag = true;
176 }
177 if (timeLeft <= 60)
178 {
179 flag = true;
180 }
181 if (!flag)
182 {
183 if (alpha > 240 && Main.rand.Next(5) == 0)
184 {
185 alpha--;
186 }
187 }
188 else
189 {
190 if (Main.rand.Next(5) == 0)
191 {
192 alpha++;
193 }
194 if (alpha >= 255)
195 {
196 active = false;
197 return;
198 }
199 }
201 }
202
204 {
206 if (timeLeft <= 0)
207 {
208 active = false;
209 return;
210 }
211 bool flag = false;
212 Point point = (position + new Vector2(15f, 0f)).ToTileCoordinates();
213 if (WorldGen.SolidTile(Main.tile[point.X, point.Y]))
214 {
215 flag = true;
216 }
217 if (timeLeft <= 240)
218 {
219 flag = true;
220 }
221 if (!flag)
222 {
223 if (alpha > 225 && Main.rand.Next(2) == 0)
224 {
225 alpha--;
226 }
227 }
228 else
229 {
230 if (Main.rand.Next(2) == 0)
231 {
232 alpha++;
233 }
234 if (alpha >= 255)
235 {
236 active = false;
237 return;
238 }
239 }
241 }
242
244 {
245 if (frameCounter == 0)
246 {
247 frameCounter = 1;
248 Frame.CurrentRow = (byte)Main.rand.Next(3);
249 }
251 if (timeLeft <= 0)
252 {
253 active = false;
254 return;
255 }
256 alpha = (int)MathHelper.Lerp(255f, 0f, (float)timeLeft / 15f);
257 float num = (255f - (float)alpha) / 255f;
258 num *= scale;
259 Lighting.AddLight(position + new Vector2(Width / 2f, Height / 2f), num * 0.4f, num, num);
261 }
262
263 private float ChumFloatingChunk_GetWaterLine(int X, int Y)
264 {
265 float result = position.Y + Height;
266 if (Main.tile[X, Y - 1] == null)
267 {
268 Main.tile[X, Y - 1] = new Tile();
269 }
270 if (Main.tile[X, Y] == null)
271 {
272 Main.tile[X, Y] = new Tile();
273 }
274 if (Main.tile[X, Y + 1] == null)
275 {
276 Main.tile[X, Y + 1] = new Tile();
277 }
278 if (Main.tile[X, Y - 1].liquid > 0)
279 {
280 result = Y * 16;
281 result -= (float)(Main.tile[X, Y - 1].liquid / 16);
282 }
283 else if (Main.tile[X, Y].liquid > 0)
284 {
285 result = (Y + 1) * 16;
286 result -= (float)(Main.tile[X, Y].liquid / 16);
287 }
288 else if (Main.tile[X, Y + 1].liquid > 0)
289 {
290 result = (Y + 2) * 16;
291 result -= (float)(Main.tile[X, Y + 1].liquid / 16);
292 }
293 return result;
294 }
295
297 {
298 Point point = position.ToTileCoordinates();
299 if (!WorldGen.InWorld(point.X, point.Y))
300 {
301 active = false;
302 return true;
303 }
304 if (Main.tile[point.X, point.Y] == null)
305 {
306 active = false;
307 return true;
308 }
309 return false;
310 }
311
312 public void Update()
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;
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 }
1085
1086 private void Gore_UpdateLeaf()
1087 {
1088 Vector2 vector = position + new Vector2(12f) / 2f - new Vector2(4f) / 2f;
1089 vector.Y -= 4f;
1090 Vector2 vector2 = position - vector;
1091 if (velocity.Y < 0f)
1092 {
1093 Vector2 vector3 = new Vector2(velocity.X, -0.2f);
1094 int num = 4;
1095 num = (int)((float)num * 0.9f);
1096 Point point = (new Vector2(num, num) / 2f + vector).ToTileCoordinates();
1097 if (!WorldGen.InWorld(point.X, point.Y))
1098 {
1099 active = false;
1100 return;
1101 }
1102 Tile tile = Main.tile[point.X, point.Y];
1103 if (tile == null)
1104 {
1105 active = false;
1106 return;
1107 }
1108 int num2 = 6;
1109 Rectangle rectangle = new Rectangle(point.X * 16, point.Y * 16 + tile.liquid / 16, 16, 16 - tile.liquid / 16);
1110 Rectangle value = new Rectangle((int)vector.X, (int)vector.Y + num2, num, num);
1111 bool flag = tile != null && tile.liquid > 0 && rectangle.Intersects(value);
1112 if (flag)
1113 {
1114 if (tile.honey())
1115 {
1116 vector3.X = 0f;
1117 }
1118 else if (tile.lava())
1119 {
1120 active = false;
1121 for (int i = 0; i < 5; i++)
1122 {
1123 Dust.NewDust(position, num, num, 31, 0f, -0.2f);
1124 }
1125 }
1126 else
1127 {
1128 vector3.X = Main.WindForVisuals;
1129 }
1130 if ((double)position.Y > Main.worldSurface * 16.0)
1131 {
1132 vector3.X = 0f;
1133 }
1134 }
1135 if (!WorldGen.SolidTile(point.X, point.Y + 1) && !flag)
1136 {
1137 velocity.Y = 0.1f;
1138 timeLeft = 0;
1139 alpha += 20;
1140 }
1141 vector3 = Collision.TileCollision(vector, vector3, num, num);
1142 if (flag)
1143 {
1144 rotation = vector3.ToRotation() + (float)Math.PI / 2f;
1145 }
1146 vector3.X *= 0.94f;
1147 if (!flag || ((double)vector3.X > -0.01 && (double)vector3.X < 0.01))
1148 {
1149 vector3.X = 0f;
1150 }
1151 if (timeLeft > 0)
1152 {
1154 }
1155 else
1156 {
1158 }
1159 velocity.X = vector3.X;
1160 position.X += velocity.X;
1161 return;
1162 }
1163 velocity.Y += (float)Math.PI / 180f;
1164 Vector2 vector4 = new Vector2(Vector2.UnitY.RotatedBy(velocity.Y).X * 1f, Math.Abs(Vector2.UnitY.RotatedBy(velocity.Y).Y) * 1f);
1165 int num3 = 4;
1166 if ((double)position.Y < Main.worldSurface * 16.0)
1167 {
1168 vector4.X += Main.WindForVisuals * 4f;
1169 }
1170 Vector2 vector5 = vector4;
1171 vector4 = Collision.TileCollision(vector, vector4, num3, num3);
1172 Vector4 vector6 = Collision.SlopeCollision(vector, vector4, num3, num3, 1f);
1173 position.X = vector6.X;
1174 position.Y = vector6.Y;
1175 vector4.X = vector6.Z;
1176 vector4.Y = vector6.W;
1177 position += vector2;
1178 if (vector4 != vector5)
1179 {
1180 velocity.Y = -1f;
1181 }
1182 Point point2 = (new Vector2(Width, Height) * 0.5f + position).ToTileCoordinates();
1183 if (!WorldGen.InWorld(point2.X, point2.Y))
1184 {
1185 active = false;
1186 return;
1187 }
1188 Tile tile2 = Main.tile[point2.X, point2.Y];
1189 if (tile2 == null)
1190 {
1191 active = false;
1192 return;
1193 }
1194 int num4 = 6;
1195 Rectangle rectangle2 = new Rectangle(point2.X * 16, point2.Y * 16 + tile2.liquid / 16, 16, 16 - tile2.liquid / 16);
1196 Rectangle value2 = new Rectangle((int)vector.X, (int)vector.Y + num4, num3, num3);
1197 if (tile2 != null && tile2.liquid > 0 && rectangle2.Intersects(value2))
1198 {
1199 velocity.Y = -1f;
1200 }
1201 position += vector4;
1202 rotation = vector4.ToRotation() + (float)Math.PI / 2f;
1203 if (timeLeft > 0)
1204 {
1206 }
1207 else
1208 {
1210 }
1211 }
1212
1213 private void Gore_UpdateSail()
1214 {
1215 if (velocity.Y < 0f)
1216 {
1217 Vector2 vector = new Vector2(velocity.X, 0.6f);
1218 int num = 32;
1219 if (TextureAssets.Gore[type].IsLoaded)
1220 {
1221 num = TextureAssets.Gore[type].Width();
1222 if (TextureAssets.Gore[type].Height() < num)
1223 {
1224 num = TextureAssets.Gore[type].Height();
1225 }
1226 }
1227 num = (int)((float)num * 0.9f);
1228 vector = Collision.TileCollision(position, vector, (int)((float)num * scale), (int)((float)num * scale));
1229 vector.X *= 0.97f;
1230 if ((double)vector.X > -0.01 && (double)vector.X < 0.01)
1231 {
1232 vector.X = 0f;
1233 }
1234 if (timeLeft > 0)
1235 {
1236 timeLeft--;
1237 }
1238 else
1239 {
1240 alpha++;
1241 }
1242 velocity.X = vector.X;
1243 return;
1244 }
1245 velocity.Y += (float)Math.PI / 60f;
1246 Vector2 vector2 = new Vector2(Vector2.UnitY.RotatedBy(velocity.Y).X * 2f, Math.Abs(Vector2.UnitY.RotatedBy(velocity.Y).Y) * 3f);
1247 vector2 *= 2f;
1248 int num2 = 32;
1249 if (TextureAssets.Gore[type].IsLoaded)
1250 {
1251 num2 = TextureAssets.Gore[type].Width();
1252 if (TextureAssets.Gore[type].Height() < num2)
1253 {
1254 num2 = TextureAssets.Gore[type].Height();
1255 }
1256 }
1257 Vector2 vector3 = vector2;
1258 vector2 = Collision.TileCollision(position, vector2, (int)((float)num2 * scale), (int)((float)num2 * scale));
1259 if (vector2 != vector3)
1260 {
1261 velocity.Y = -1f;
1262 }
1263 position += vector2;
1264 rotation = vector2.ToRotation() + (float)Math.PI;
1265 if (timeLeft > 0)
1266 {
1267 timeLeft--;
1268 }
1269 else
1270 {
1271 alpha++;
1272 }
1273 }
1274
1275 public static Gore NewGorePerfect(Vector2 Position, Vector2 Velocity, int Type, float Scale = 1f)
1276 {
1277 Gore gore = NewGoreDirect(Position, Velocity, Type, Scale);
1278 gore.position = Position;
1279 gore.velocity = Velocity;
1280 return gore;
1281 }
1282
1283 public static Gore NewGoreDirect(Vector2 Position, Vector2 Velocity, int Type, float Scale = 1f)
1284 {
1285 return Main.gore[NewGore(Position, Velocity, Type, Scale)];
1286 }
1287
1288 public static int NewGore(Vector2 Position, Vector2 Velocity, int Type, float Scale = 1f)
1289 {
1290 if (Main.netMode == 2)
1291 {
1292 return 600;
1293 }
1294 if (Main.gamePaused)
1295 {
1296 return 600;
1297 }
1298 if (WorldGen.gen)
1299 {
1300 return 600;
1301 }
1302 if (Main.rand == null)
1303 {
1304 Main.rand = new UnifiedRandom();
1305 }
1306 if (Type == -1)
1307 {
1308 return 600;
1309 }
1310 int num = 600;
1311 for (int i = 0; i < 600; i++)
1312 {
1313 if (!Main.gore[i].active)
1314 {
1315 num = i;
1316 break;
1317 }
1318 }
1319 if (num == 600)
1320 {
1321 return num;
1322 }
1323 Main.gore[num].Frame = new SpriteFrame(1, 1);
1324 Main.gore[num].frameCounter = 0;
1325 Main.gore[num].behindTiles = false;
1326 Main.gore[num].light = 0f;
1327 Main.gore[num].position = Position;
1328 Main.gore[num].velocity = Velocity;
1329 Main.gore[num].velocity.Y -= (float)Main.rand.Next(10, 31) * 0.1f;
1330 Main.gore[num].velocity.X += (float)Main.rand.Next(-20, 21) * 0.1f;
1331 Main.gore[num].type = Type;
1332 Main.gore[num].active = true;
1333 Main.gore[num].alpha = 0;
1334 Main.gore[num].rotation = 0f;
1335 Main.gore[num].scale = Scale;
1337 {
1338 Main.gore[num].type = Main.rand.Next(11, 14);
1339 Main.gore[num].scale = Main.rand.NextFloat() * 0.5f + 0.5f;
1340 Main.gore[num].velocity /= 2f;
1341 }
1342 if (goreTime == 0 || Type == 11 || Type == 12 || Type == 13 || Type == 16 || Type == 17 || Type == 61 || Type == 62 || Type == 63 || Type == 99 || Type == 220 || Type == 221 || Type == 222 || Type == 435 || Type == 436 || Type == 437 || (Type >= 861 && Type <= 862))
1343 {
1344 Main.gore[num].sticky = false;
1345 }
1346 else if (Type >= 375 && Type <= 377)
1347 {
1348 Main.gore[num].sticky = false;
1349 Main.gore[num].alpha = 100;
1350 }
1351 else
1352 {
1353 Main.gore[num].sticky = true;
1354 Main.gore[num].timeLeft = goreTime;
1355 }
1356 if ((Type >= 706 && Type <= 717) || Type == 943 || Type == 1147 || (Type >= 1160 && Type <= 1162))
1357 {
1358 Main.gore[num].numFrames = 15;
1359 Main.gore[num].behindTiles = true;
1360 Main.gore[num].timeLeft = goreTime * 3;
1361 }
1362 if (Type == 16 || Type == 17)
1363 {
1364 Main.gore[num].alpha = 100;
1365 Main.gore[num].scale = 0.7f;
1366 Main.gore[num].light = 1f;
1367 }
1368 if (Type >= 570 && Type <= 572)
1369 {
1370 Main.gore[num].velocity = Velocity;
1371 }
1372 if (Type == 1201 || Type == 1208)
1373 {
1374 Main.gore[num].Frame = new SpriteFrame(1, 4);
1375 }
1376 if (Type == 1217 || Type == 1218)
1377 {
1378 Main.gore[num].Frame = new SpriteFrame(1, 3);
1379 }
1380 if (Type == 1225)
1381 {
1382 Main.gore[num].Frame = new SpriteFrame(1, 3);
1383 Main.gore[num].timeLeft = 10 + Main.rand.Next(6);
1384 Main.gore[num].sticky = false;
1385 if (TextureAssets.Gore[Type].IsLoaded)
1386 {
1387 Main.gore[num].position.X = Position.X - (float)(TextureAssets.Gore[Type].Width() / 2) * Scale;
1388 Main.gore[num].position.Y = Position.Y - (float)TextureAssets.Gore[Type].Height() * Scale / 2f;
1389 }
1390 }
1391 int num2 = GoreID.Sets.SpecialAI[Type];
1392 if (num2 == 3)
1393 {
1394 Main.gore[num].velocity = new Vector2((Main.rand.NextFloat() - 0.5f) * 1f, Main.rand.NextFloat() * ((float)Math.PI * 2f));
1395 bool flag = (Type >= 910 && Type <= 925) || (Type >= 1113 && Type <= 1121) || (Type >= 1248 && Type <= 1255) || Type == 1257 || Type == 1278;
1396 Gore obj = Main.gore[num];
1397 SpriteFrame spriteFrame = new SpriteFrame((byte)((!flag) ? 1u : 32u), 8)
1398 {
1399 CurrentRow = (byte)Main.rand.Next(8)
1400 };
1401 obj.Frame = spriteFrame;
1402 Main.gore[num].frameCounter = (byte)Main.rand.Next(8);
1403 }
1404 if (num2 == 1)
1405 {
1406 Main.gore[num].velocity = new Vector2((Main.rand.NextFloat() - 0.5f) * 3f, Main.rand.NextFloat() * ((float)Math.PI * 2f));
1407 }
1408 if (Type >= 411 && Type <= 430 && TextureAssets.Gore[Type].IsLoaded)
1409 {
1410 Main.gore[num].position.X = Position.X - (float)(TextureAssets.Gore[Type].Width() / 2) * Scale;
1411 Main.gore[num].position.Y = Position.Y - (float)TextureAssets.Gore[Type].Height() * Scale;
1412 Main.gore[num].velocity.Y *= (float)Main.rand.Next(90, 150) * 0.01f;
1413 Main.gore[num].velocity.X *= (float)Main.rand.Next(40, 90) * 0.01f;
1414 int num3 = Main.rand.Next(4) * 5;
1415 Main.gore[num].type += num3;
1416 Main.gore[num].timeLeft = Main.rand.Next(goreTime / 2, goreTime * 2);
1417 Main.gore[num].sticky = true;
1418 if (goreTime == 0)
1419 {
1420 Main.gore[num].timeLeft = Main.rand.Next(150, 600);
1421 }
1422 }
1423 if (Type >= 907 && Type <= 909)
1424 {
1425 Main.gore[num].sticky = true;
1426 Main.gore[num].numFrames = 3;
1427 Main.gore[num].frame = (byte)Main.rand.Next(3);
1428 Main.gore[num].frameCounter = (byte)Main.rand.Next(5);
1429 Main.gore[num].rotation = 0f;
1430 }
1431 if (num2 == 2)
1432 {
1433 Main.gore[num].sticky = false;
1434 if (TextureAssets.Gore[Type].IsLoaded)
1435 {
1436 Main.gore[num].alpha = 150;
1437 Main.gore[num].velocity = Velocity;
1438 Main.gore[num].position.X = Position.X - (float)(TextureAssets.Gore[Type].Width() / 2) * Scale;
1439 Main.gore[num].position.Y = Position.Y - (float)TextureAssets.Gore[Type].Height() * Scale / 2f;
1440 Main.gore[num].timeLeft = Main.rand.Next(goreTime / 2, goreTime + 1);
1441 }
1442 }
1443 if (num2 == 4)
1444 {
1445 Main.gore[num].alpha = 254;
1446 Main.gore[num].timeLeft = 300;
1447 }
1448 if (num2 == 5)
1449 {
1450 Main.gore[num].alpha = 254;
1451 Main.gore[num].timeLeft = 240;
1452 }
1453 if (num2 == 6)
1454 {
1455 Main.gore[num].alpha = 254;
1456 Main.gore[num].timeLeft = 480;
1457 }
1458 if (Main.gore[num].DeactivateIfOutsideOfWorld())
1459 {
1460 return 600;
1461 }
1462 return num;
1463 }
1464
1465 public Color GetAlpha(Color newColor)
1466 {
1467 float num = (float)(255 - alpha) / 255f;
1468 int r;
1469 int g;
1470 int b;
1471 if (type == 16 || type == 17)
1472 {
1473 r = newColor.R;
1474 g = newColor.G;
1475 b = newColor.B;
1476 }
1477 else
1478 {
1479 if (type == 716)
1480 {
1481 return new Color(255, 255, 255, 200);
1482 }
1483 if (type >= 570 && type <= 572)
1484 {
1485 byte b2 = (byte)(255 - alpha);
1486 return new Color(b2, b2, b2, b2 / 2);
1487 }
1488 if (type == 331)
1489 {
1490 return new Color(255, 255, 255, 50);
1491 }
1492 if (type == 1225)
1493 {
1494 return new Color(num, num, num, num);
1495 }
1496 r = (int)((float)(int)newColor.R * num);
1497 g = (int)((float)(int)newColor.G * num);
1498 b = (int)((float)(int)newColor.B * num);
1499 }
1500 int num2 = newColor.A - alpha;
1501 if (num2 < 0)
1502 {
1503 num2 = 0;
1504 }
1505 if (num2 > 255)
1506 {
1507 num2 = 255;
1508 }
1509 if (type >= 1202 && type <= 1204)
1510 {
1511 return new Color(r, g, b, (num2 < 20) ? num2 : 20);
1512 }
1513 return new Color(r, g, b, num2);
1514 }
1515}
static float Lerp(float value1, float value2, float amount)
Definition MathHelper.cs:53
static double Abs(double value)
const double PI
Definition Math.cs:16
static void PlaySound(int type, Vector2 position, int style=1)
static bool WetCollision(Vector2 Position, int Width, int Height)
static Vector2 TileCollision(Vector2 Position, Vector2 Velocity, int Width, int Height, bool fallThrough=false, bool fall2=false, int gravDir=1)
static Vector4 SlopeCollision(Vector2 Position, Vector2 Velocity, int Width, int Height, float gravity=0f, bool fall=false)
static bool SolidCollision(Vector2 Position, int Width, int Height)
static int NewDust(Vector2 Position, int Width, int Height, int Type, float SpeedX=0f, float SpeedY=0f, int Alpha=0, Color newColor=default(Color), float Scale=1f)
Definition Dust.cs:73
static bool DangerousGore(int id)
static Asset< Texture2D >[] Gore
static int goreTime
Definition Gore.cs:15
Vector2 velocity
Definition Gore.cs:19
void UpdateFogMachineCloud()
Definition Gore.cs:203
bool behindTiles
Definition Gore.cs:37
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
Rectangle AABBRectangle
Definition Gore.cs:68
float Height
Definition Gore.cs:56
static Gore NewGorePerfect(Vector2 Position, Vector2 Velocity, int Type, float Scale=1f)
Definition Gore.cs:1275
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
Color GetAlpha(Color newColor)
Definition Gore.cs:1465
float scale
Definition Gore.cs:23
bool sticky
Definition Gore.cs:33
bool DeactivateIfOutsideOfWorld()
Definition Gore.cs:296
void Update()
Definition Gore.cs:312
int timeLeft
Definition Gore.cs:35
byte numFrames
Definition Gore.cs:95
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
static void AddLight(Vector2 position, Vector3 rgb)
Definition Lighting.cs:137
static double worldSurface
Definition Main.cs:1272
static int netMode
Definition Main.cs:2095
static Gore[] gore
Definition Main.cs:1687
static float WindForVisuals
Definition Main.cs:2827
static Tile[,] tile
Definition Main.cs:1675
static UnifiedRandom rand
Definition Main.cs:1387
static bool gamePaused
Definition Main.cs:1072
static Player[] player
Definition Main.cs:1803
static Dust[] dust
Definition Main.cs:1677
byte liquid
Definition Tile.cs:12
bool honey()
Definition Tile.cs:379
bool lava()
Definition Tile.cs:362
static volatile bool gen
Definition WorldGen.cs:972
static bool SolidTile(Tile testTile)
static bool InWorld(int x, int y, int fluff=0)
Definition WorldGen.cs:5816
bool Intersects(Rectangle value)
Definition Rectangle.cs:129
Rectangle GetSourceRectangle(Texture2D texture)