pass actor to FModelRenderer::SetMaterial
This commit is contained in:
parent
24abcc18d1
commit
8c3268ae1c
17 changed files with 25 additions and 23 deletions
|
|
@ -630,7 +630,7 @@ int FOBJModel::FindFrame(const char* name, bool nodefault)
|
|||
* @param inter The amount to interpolate the two frames.
|
||||
* @param translation The translation for the skin
|
||||
*/
|
||||
void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int frameno, int frameno2, double inter, FTranslationID translation, const FTextureID* surfaceskinids, const TArray<VSMatrix>& boneData, int boneStartPosition)
|
||||
void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int frameno, int frameno2, double inter, FTranslationID translation, const FTextureID* surfaceskinids, const TArray<VSMatrix>& boneData, int boneStartPosition, AActor * act)
|
||||
{
|
||||
// Prevent the model from rendering if the frame number is < 0
|
||||
if (frameno < 0 || frameno2 < 0) return;
|
||||
|
|
@ -658,7 +658,7 @@ void FOBJModel::RenderFrame(FModelRenderer *renderer, FGameTexture * skin, int f
|
|||
continue;
|
||||
}
|
||||
|
||||
renderer->SetMaterial(userSkin, false, translation);
|
||||
renderer->SetMaterial(userSkin, false, translation, act);
|
||||
renderer->SetupFrame(this, surf->vbStart, surf->vbStart, surf->numTris * 3, {}, -1);
|
||||
renderer->DrawArrays(0, surf->numTris * 3);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue