- 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

View file

@ -1058,7 +1058,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_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); PARAM_FLOAT(fov);
FTextureID textureid = TexMan.CheckForTexture(texturename, ETextureType::Wall, FTextureManager::TEXMAN_Overridable); 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; return 0;
} }