mirror of
https://github.com/DarkPlacesEngine/dpmodel.git
synced 2025-04-23 22:50:51 +00:00
same fixes for dpmodel: optional args for scale and rotate, and fixed orientation of model
git-svn-id: svn://svn.icculus.org/twilight/trunk/dpmodel@8794 d7cf8633-e32d-0410-b094-e92efae38249
This commit is contained in:
parent
502009c9f4
commit
5eb7767497
1 changed files with 6 additions and 2 deletions
|
@ -1465,6 +1465,10 @@ void fixrootbones(void)
|
|||
bonepose_t rootpose;
|
||||
|
||||
AngleVectors(modelrotate, rootpose.m[0], rootpose.m[1], rootpose.m[2]);
|
||||
// AngleVectors makes a right vector, we need a left vector
|
||||
rootpose.m[1][0] *= -1;
|
||||
rootpose.m[1][1] *= -1;
|
||||
rootpose.m[1][2] *= -1;
|
||||
rootpose.m[0][3] = -modelorigin[0] * rootpose.m[0][0] + -modelorigin[1] * rootpose.m[1][0] + -modelorigin[2] * rootpose.m[2][0];
|
||||
rootpose.m[1][3] = -modelorigin[0] * rootpose.m[0][1] + -modelorigin[1] * rootpose.m[1][1] + -modelorigin[2] * rootpose.m[2][1];
|
||||
rootpose.m[2][3] = -modelorigin[0] * rootpose.m[0][2] + -modelorigin[1] * rootpose.m[1][2] + -modelorigin[2] * rootpose.m[2][2];
|
||||
|
@ -1706,7 +1710,7 @@ int sc_rotate(void)
|
|||
modelrotate[0] = atof(c);
|
||||
|
||||
c = gettoken();
|
||||
if(c)
|
||||
if(c && *c && *c != '\n' && *c != '\r')
|
||||
{
|
||||
if(!isdouble(c))
|
||||
return 0;
|
||||
|
@ -1738,7 +1742,7 @@ int sc_scale(void)
|
|||
modelscale[0] = atof(c);
|
||||
|
||||
c = gettoken();
|
||||
if(c)
|
||||
if(c && *c && *c != '\n' && *c != '\r')
|
||||
{
|
||||
if(!isdouble(c))
|
||||
return 0;
|
||||
|
|
Loading…
Reference in a new issue