Add bounds check

This commit is contained in:
yvt 2019-08-08 01:08:12 +09:00
parent 0ce6371142
commit 066eda82df
No known key found for this signature in database
GPG Key ID: 48F2768FA8D07C92

View File

@ -788,8 +788,8 @@ namespace spades {
front.y = reader.ReadFloat();
front.z = reader.ReadFloat();
savedPlayerPos[idx] = pos;
savedPlayerFront[idx] = front;
savedPlayerPos.at(idx) = pos;
savedPlayerFront.at(idx) = front;
if (pos.x != 0.f || pos.y != 0.f || pos.z != 0.f || front.x != 0.f ||
front.y != 0.f || front.z != 0.f) {
SPAssert(!std::isnan(pos.x));