|
43 | 43 | #include "libs/mathlib.h"
|
44 | 44 | #include "ships/ship.h"
|
45 | 45 |
|
| 46 | +#include "uqm/colors.h" // For Ilwrath INVIS_COLOR |
| 47 | + |
46 | 48 | static void cleanup_dead_ship (ELEMENT *ElementPtr);
|
47 | 49 |
|
48 | 50 | static BOOLEAN dittyIsPlaying;
|
@@ -628,6 +630,21 @@ ship_death (ELEMENT *ShipPtr)
|
628 | 630 | StopMusic ();
|
629 | 631 |
|
630 | 632 | GetElementStarShip (ShipPtr, &StarShipPtr);
|
| 633 | + |
| 634 | + // Enable Ilwrath's cloak visibility for both sides |
| 635 | + // if the ship was cloaked upon destruction |
| 636 | + // Having the cloak on for one side and off for one causes |
| 637 | + // a desynch in net play |
| 638 | + if (StarShipPtr->SpeciesID = ILWRATH_ID) |
| 639 | + { |
| 640 | + if (GetPrimType (&DisplayArray[ShipPtr->PrimIndex]) == STAMPFILL_PRIM) |
| 641 | + { |
| 642 | + PRIMITIVE *lpPrim; |
| 643 | + lpPrim = &(GLOBAL (DisplayArray))[ShipPtr->PrimIndex]; |
| 644 | + SetPrimType(lpPrim, STAMPFILL_PRIM); |
| 645 | + SetPrimColor(lpPrim, INVIS_COLOR); |
| 646 | + } |
| 647 | + } |
631 | 648 |
|
632 | 649 | if (ShipPtr->mass_points <= MAX_SHIP_MASS)
|
633 | 650 | { // Not running away and not reincarnating (Pkunk)
|
@@ -675,7 +692,7 @@ ship_death (ELEMENT *ShipPtr)
|
675 | 692 | StarShipPtr->RaceDescPtr->ship_data.ship_sounds, 1),
|
676 | 693 | CalcSoundPosition (ShipPtr), ShipPtr,
|
677 | 694 | GAME_SOUND_PRIORITY + 1);
|
678 |
| - |
| 695 | + |
679 | 696 | ++ShipPtr->life_span;
|
680 | 697 |
|
681 | 698 | DeltaCrew (ShipPtr, -(SIZE)ShipPtr->crew_level);
|
|
0 commit comments