fix animation infinite loops
This commit is contained in:
parent
0509c9a790
commit
7186f411bb
|
|
@ -494,6 +494,9 @@ int FindMiptex(const char *name, std::optional<extended_texinfo_t> &extended_inf
|
||||||
|
|
||||||
// recursively load animated textures until we loop back to us
|
// recursively load animated textures until we loop back to us
|
||||||
while (true) {
|
while (true) {
|
||||||
|
if (wal->animation.empty())
|
||||||
|
break;
|
||||||
|
|
||||||
// wal for next chain
|
// wal for next chain
|
||||||
wal = map.load_image_meta(wal->animation.c_str());
|
wal = map.load_image_meta(wal->animation.c_str());
|
||||||
|
|
||||||
|
|
@ -511,7 +514,7 @@ int FindMiptex(const char *name, std::optional<extended_texinfo_t> &extended_inf
|
||||||
last_i = next_i;
|
last_i = next_i;
|
||||||
|
|
||||||
// looped back
|
// looped back
|
||||||
if (!Q_strcasecmp(wal->animation.c_str(), name))
|
if (!Q_strcasecmp(wal->animation.c_str(), name) || last_i == next_i)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue