Disable capital ship itself, when gun and engines are destroyed (not just components).
This commit is contained in:
parent
2a725471c7
commit
108a41310c
|
@ -135,7 +135,7 @@ static void think(void)
|
|||
|
||||
self->angle += dir;
|
||||
|
||||
self->angle = fmod(self->angle, 360);
|
||||
self->angle = mod(self->angle, 360);
|
||||
}
|
||||
|
||||
applyFighterThrust();
|
||||
|
@ -387,7 +387,7 @@ static void disable(void)
|
|||
|
||||
for (e = battle.entityHead.next ; e != NULL ; e = e->next)
|
||||
{
|
||||
if (e->owner == self->owner)
|
||||
if (e->owner == self->owner || e == self->owner)
|
||||
{
|
||||
e->systemPower = 0;
|
||||
e->flags |= EF_DISABLED;
|
||||
|
|
|
@ -49,6 +49,7 @@ extern void addLargeExplosion(void);
|
|||
extern char **toTypeArray(char *types, int *numTypes);
|
||||
extern void updateCondition(char *name, int type);
|
||||
extern void addMessageBox(char *title, char *body, int type);
|
||||
extern float mod(float n, float x);
|
||||
|
||||
extern Battle battle;
|
||||
extern Entity *player;
|
||||
|
|
Loading…
Reference in New Issue