A_ChangeModeldef
-Added A_ChangeModelDef A_ChangeModel(modeldef, modelpath, model, modelindex, skinpath, skin, skinid, flags) This can change the modeldef, model and skins of an actor. Currently, modelindex and skinindex accept indices from 0-15. An actor MUST have a modeldef in order to use this function, either defined from modeldef, or given one through the modeldef parameter. You can pass "" to use the same modeldef. Likewise, passing "" for model or skin will just revert to the default model. Available flags: CMDL_WEAPONTOPLAYER - If used on a weapon, this instead change's the model on the player instead. One issue I am aware of right now is that clearing a model by "" sort of works but is buggy. For now you can just manually set the model back using the names explicitly. However, I am stumped and I think getting more eyes on it would help.
This commit is contained in:
parent
e649357d4e
commit
5abadd3aab
6 changed files with 60 additions and 7 deletions
|
|
@ -834,7 +834,7 @@ void HWSprite::Process(HWDrawInfo *di, AActor* thing, sector_t * sector, area_t
|
|||
z += fz;
|
||||
}
|
||||
|
||||
modelframe = isPicnumOverride ? nullptr : FindModelFrame(thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
|
||||
modelframe = isPicnumOverride ? nullptr : FindModelFrame(thing->modelDef != nullptr ? PClass::FindActor(thing->modelDef) : thing->GetClass(), spritenum, thing->frame, !!(thing->flags & MF_DROPPED));
|
||||
|
||||
// don't bother drawing sprite shadows if this is a model (it will never look right)
|
||||
if (modelframe && isSpriteShadow)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue