Update p_actionfunctions.cpp

Woah, this didn't work with custom inventory chains!
This commit is contained in:
Shiny Metagross 2022-07-05 20:48:17 -07:00 committed by Christoph Oelckers
parent 69ee1eb0a2
commit fa6dfdf64c

View file

@ -5050,7 +5050,7 @@ DEFINE_ACTION_FUNCTION(AActor, A_ChangeModel)
if (self == nullptr)
ACTION_RETURN_BOOL(false);
AActor* mobj = ACTION_CALL_FROM_PSPRITE() && (flags & CMDL_WEAPONTOPLAYER) ? self : stateowner;
AActor* mobj = (ACTION_CALL_FROM_PSPRITE() && (flags & CMDL_WEAPONTOPLAYER)) || ACTION_CALL_FROM_INVENTORY() ? self : stateowner;
if (modelpath[(int)modelpath.Len() - 1] != '/') modelpath += '/';
if (skinpath[(int)skinpath.Len() - 1] != '/') skinpath += '/';