- reverted AActor::scale to a DVector2.

This was causing comparison precision issues with existing script code.
This commit is contained in:
Christoph Oelckers 2022-07-11 12:20:34 +02:00
parent edc8204a61
commit aae1d1439a
5 changed files with 5 additions and 5 deletions

View file

@ -670,7 +670,7 @@ void DIntermissionScreenCast::Drawer ()
// draw the current frame in the middle of the screen // draw the current frame in the middle of the screen
if (caststate != NULL) if (caststate != NULL)
{ {
FVector2 castscale = mDefaults->Scale; DVector2 castscale = mDefaults->Scale;
int castsprite = caststate->sprite; int castsprite = caststate->sprite;

View file

@ -1029,7 +1029,7 @@ public:
DRotator Angles; DRotator Angles;
DRotator ViewAngles; // Angle offsets for cameras DRotator ViewAngles; // Angle offsets for cameras
TObjPtr<DViewPosition*> ViewPos; // Position offsets for cameras TObjPtr<DViewPosition*> ViewPos; // Position offsets for cameras
FVector2 Scale; // Scaling values; 1 is normal size DVector2 Scale; // Scaling values; 1 is normal size
double Alpha; // Since P_CheckSight makes an alpha check this can't be a float. It has to be a double. double Alpha; // Since P_CheckSight makes an alpha check this can't be a float. It has to be a double.
int sprite; // used to find patch_t and flip value int sprite; // used to find patch_t and flip value

View file

@ -970,7 +970,7 @@ void P_CheckPlayerSprite(AActor *actor, int &spritenum, DVector2 &scale)
if (player->userinfo.GetSkin() != 0 && !(actor->flags4 & MF4_NOSKIN)) if (player->userinfo.GetSkin() != 0 && !(actor->flags4 & MF4_NOSKIN))
{ {
// Convert from default scale to skin scale. // Convert from default scale to skin scale.
FVector2 defscale = actor->GetDefault()->Scale; DVector2 defscale = actor->GetDefault()->Scale;
scale.X *= Skins[player->userinfo.GetSkin()].Scale.X / double(defscale.X); scale.X *= Skins[player->userinfo.GetSkin()].Scale.X / double(defscale.X);
scale.Y *= Skins[player->userinfo.GetSkin()].Scale.Y / double(defscale.Y); scale.Y *= Skins[player->userinfo.GetSkin()].Scale.Y / double(defscale.Y);
} }

View file

@ -55,7 +55,7 @@ public:
uint8_t range0start = 0; uint8_t range0start = 0;
uint8_t range0end = 0; uint8_t range0end = 0;
bool othergame = 0; // [GRB] bool othergame = 0; // [GRB]
FVector2 Scale = { 1, 1 }; DVector2 Scale = { 1, 1 };
int sprite = 0; int sprite = 0;
int crouchsprite = 0; int crouchsprite = 0;
int namespc = 0; // namespace for this skin int namespc = 0; // namespace for this skin

View file

@ -2901,7 +2901,7 @@ struct PlayerSkin native
native readonly uint8 range0start; native readonly uint8 range0start;
native readonly uint8 range0end; native readonly uint8 range0end;
native readonly bool othergame; native readonly bool othergame;
native readonly FVector2 Scale; native readonly Vector2 Scale;
native readonly int sprite; native readonly int sprite;
native readonly int crouchsprite; native readonly int crouchsprite;
native readonly int namespc; native readonly int namespc;