mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Fix the support for [s, v] for quaterions.
This commit is contained in:
parent
7f50333b2c
commit
c13f2c2c23
1 changed files with 5 additions and 1 deletions
|
@ -648,10 +648,14 @@ new_vector_list (expr_t *e)
|
||||||
// quaternion. first expression must be compatible with a float,
|
// quaternion. first expression must be compatible with a float,
|
||||||
// the other must be a vector
|
// the other must be a vector
|
||||||
if (!type_assignable (&type_float, get_type (e))
|
if (!type_assignable (&type_float, get_type (e))
|
||||||
|| type_assignable (&type_vector, get_type(e->next))) {
|
|| !type_assignable (&type_vector, get_type(e->next))) {
|
||||||
return error (t, "invalid types for vector elements");
|
return error (t, "invalid types for vector elements");
|
||||||
}
|
}
|
||||||
// s, v
|
// s, v
|
||||||
|
vec = new_expr ();
|
||||||
|
vec->type = ex_vector;
|
||||||
|
vec->e.vector.type = &type_quaternion;
|
||||||
|
vec->e.vector.list = e;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return error (e, "invalid number of elements in vector exprssion");
|
return error (e, "invalid number of elements in vector exprssion");
|
||||||
|
|
Loading…
Reference in a new issue