- added missing validation to SetCameraToTexture ZScript function.

This commit is contained in:
Christoph Oelckers 2018-04-03 23:01:15 +02:00
parent fcc33f0a09
commit 927b351174
1 changed files with 2 additions and 1 deletions

View File

@ -1058,6 +1058,7 @@ DEFINE_ACTION_FUNCTION(_TexMan, SetCameraToTexture)
PARAM_STRING(texturename); // [ZZ] there is no point in having this as FTextureID because it's easier to refer to a cameratexture by name and it isn't executed too often to cache it.
PARAM_FLOAT(fov);
FTextureID textureid = TexMan.CheckForTexture(texturename, ETextureType::Wall, FTextureManager::TEXMAN_Overridable);
if (textureid.isValid())
FCanvasTextureInfo::Add(viewpoint, textureid, fov);
return 0;
}