mirror of
https://github.com/godotengine/godot.git
synced 2025-01-24 11:32:51 -05:00
Set to enum variables, only correct values
This commit is contained in:
parent
5c66771e3e
commit
33c15799c7
2 changed files with 2 additions and 0 deletions
|
@ -163,6 +163,7 @@ float SpriteBase3D::get_opacity() const {
|
||||||
|
|
||||||
void SpriteBase3D::set_axis(Vector3::Axis p_axis) {
|
void SpriteBase3D::set_axis(Vector3::Axis p_axis) {
|
||||||
|
|
||||||
|
ERR_FAIL_INDEX(p_axis, 3);
|
||||||
axis = p_axis;
|
axis = p_axis;
|
||||||
_queue_update();
|
_queue_update();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1502,6 +1502,7 @@ void CubeMap::set_side(Side p_side, const Ref<Image> &p_image) {
|
||||||
|
|
||||||
Ref<Image> CubeMap::get_side(Side p_side) const {
|
Ref<Image> CubeMap::get_side(Side p_side) const {
|
||||||
|
|
||||||
|
ERR_FAIL_INDEX_V(p_side, 6, Ref<Image>());
|
||||||
if (!valid[p_side])
|
if (!valid[p_side])
|
||||||
return Ref<Image>();
|
return Ref<Image>();
|
||||||
return VS::get_singleton()->texture_get_data(cubemap, VS::CubeMapSide(p_side));
|
return VS::get_singleton()->texture_get_data(cubemap, VS::CubeMapSide(p_side));
|
||||||
|
|
Loading…
Add table
Reference in a new issue