From e2db4a834ece73b88f2c49f0e818d22babed5d11 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 8 Apr 2023 09:37:51 +0200 Subject: [PATCH] - Duke: apply default scale only to enemies defined in CON. This code does not apply to the Recon! --- source/games/duke/src/spawn.cpp | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/source/games/duke/src/spawn.cpp b/source/games/duke/src/spawn.cpp index f74184ab8..ce835e556 100644 --- a/source/games/duke/src/spawn.cpp +++ b/source/games/duke/src/spawn.cpp @@ -302,15 +302,18 @@ bool commonEnemySetup(DDukeActor* self, DDukeActor* owner) { if (!self->mapSpawned) self->spr.lotag = 0; - // Init the size. This is different for internal and user enemies. - if (actorflag(self, SFLAG_INTERNAL_BADGUY)) + if (gs.actorinfo[self->spr.picnum].scriptaddress) // default scale only applies to actors with a CON part. Note: needs fixing later! { - self->spr.scale = DVector2(0.625, 0.625); - self->clipdist = 20; - } - else if (self->spr.scale.X == 0 || self->spr.scale.Y == 0) - { - self->spr.scale = DVector2(REPEAT_SCALE, REPEAT_SCALE); + // Init the size. This is different for internal and user enemies. + if (actorflag(self, SFLAG_INTERNAL_BADGUY)) + { + self->spr.scale = DVector2(0.625, 0.625); + self->clipdist = 20; + } + else if (self->spr.scale.X == 0 || self->spr.scale.Y == 0) + { + self->spr.scale = DVector2(REPEAT_SCALE, REPEAT_SCALE); + } } if ((self->spr.lotag > ud.player_skill) || ud.monsters_off == 1)