mirror of
https://github.com/DrBeef/ioq3quest.git
synced 2024-11-10 23:02:01 +00:00
Fix IQM quat normalize fail case
Should only happen with invalid models though.
This commit is contained in:
parent
95b9cab4d6
commit
2a2646fe43
2 changed files with 4 additions and 2 deletions
|
@ -154,7 +154,8 @@ static vec_t QuatNormalize2( const quat_t v, quat_t out) {
|
|||
out[2] = v[2]*ilength;
|
||||
out[3] = v[3]*ilength;
|
||||
} else {
|
||||
out[0] = out[1] = out[2] = out[3] = 0;
|
||||
out[0] = out[1] = out[2] = 0;
|
||||
out[3] = -1;
|
||||
}
|
||||
|
||||
return length;
|
||||
|
|
|
@ -154,7 +154,8 @@ static vec_t QuatNormalize2( const quat_t v, quat_t out) {
|
|||
out[2] = v[2]*ilength;
|
||||
out[3] = v[3]*ilength;
|
||||
} else {
|
||||
out[0] = out[1] = out[2] = out[3] = 0;
|
||||
out[0] = out[1] = out[2] = 0;
|
||||
out[3] = -1;
|
||||
}
|
||||
|
||||
return length;
|
||||
|
|
Loading…
Reference in a new issue