Skip to content

Commit

Permalink
Merge pull request #750 from LoboEire/master
Browse files Browse the repository at this point in the history
Make SET_SCALE() handle models too
  • Loading branch information
dashodanger authored Dec 2, 2024
2 parents bc08dcc + e474da8 commit 78ae4e3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions source_files/edge/p_action.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5090,15 +5090,19 @@ void A_PainChanceSet(MapObject *mo)

void A_ScaleSet(MapObject *mo)
{
float value = mo->info_->scale_; //grab the default scale for this thing as a fallback
float valueSprite = mo->info_->scale_; //grab the default scale for this thing as a fallback
float valueModel = mo->info_->model_scale_; //grab the default scale for this thing as a fallback

const State *st = mo->state_;

if (st && st->action_par)
{
value = ((float *)st->action_par)[0];
valueSprite = ((float *)st->action_par)[0];
valueModel = valueSprite;
}
mo->scale_ = value;
mo->scale_ = valueSprite;
mo->model_scale_ = valueModel;

}

void A_Gravity(MapObject *mo)
Expand Down

0 comments on commit 78ae4e3

Please sign in to comment.