- added missing validation to SetCameraToTexture ZScript function.

(cherry picked from commit 927b351174)
This commit is contained in:
Christoph Oelckers 2018-04-03 23:01:15 +02:00 committed by drfrag666
parent 192101ac29
commit f05fe61369

View file

@ -1063,7 +1063,8 @@ 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);
FCanvasTextureInfo::Add(viewpoint, textureid, fov);
if (textureid.isValid())
FCanvasTextureInfo::Add(viewpoint, textureid, fov);
return 0;
}