Skip to content

Commit

Permalink
Cloaked ships do mass lock the player now.
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherCommander committed Jul 18, 2020
1 parent 94d89fd commit 4f19c98
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Core/Entities/PlayerEntity.m
Original file line number Diff line number Diff line change
Expand Up @@ -3289,6 +3289,7 @@ - (void) setMaxFlightYaw:(GLfloat)new
- (BOOL) checkEntityForMassLock:(Entity *)ent withScanClass:(int)theirClass
{
BOOL massLocked = NO;
BOOL entIsCloakedShip = [ent isShip] && [(ShipEntity *)ent isCloaked];

if (EXPECT_NOT([ent isStellarObject]))
{
Expand All @@ -3308,8 +3309,7 @@ - (BOOL) checkEntityForMassLock:(Entity *)ent withScanClass:(int)theirClass
}
else if (theirClass != CLASS_NO_DRAW)
{
// cloaked ships do not mass lock!
if (EXPECT_NOT ([ent isShip] && [(ShipEntity *)ent isCloaked]))
if (EXPECT_NOT (entIsCloakedShip)
{
theirClass = CLASS_NO_DRAW;
}
Expand All @@ -3320,6 +3320,12 @@ - (BOOL) checkEntityForMassLock:(Entity *)ent withScanClass:(int)theirClass
switch (theirClass)
{
case CLASS_NO_DRAW:
// cloaked ships do mass lock! - Nikos 20200718
if (entIsCloakedShip && ![ent isPlayer])
{
massLocked = YES;
}
break;
case CLASS_PLAYER:
case CLASS_BUOY:
case CLASS_ROCK:
Expand Down

0 comments on commit 4f19c98

Please sign in to comment.