mirror of
https://github.com/nzp-team/dquakeplus.git
synced 2024-11-25 21:31:49 +00:00
Fix model origin offset when using scaling field
This commit is contained in:
parent
839570b698
commit
eb78c9ddb8
1 changed files with 3 additions and 3 deletions
|
@ -1970,14 +1970,14 @@ void R_DrawAliasModel (entity_t *e)
|
||||||
sceGumTranslate(&translation);
|
sceGumTranslate(&translation);
|
||||||
sceGumScale(&scaling);
|
sceGumScale(&scaling);
|
||||||
} else {
|
} else {
|
||||||
float scale = 128.0f;
|
float scale = 1.0f;
|
||||||
if (e->scale != ENTSCALE_DEFAULT && e->scale != 0) scale *= ENTSCALE_DECODE(e->scale);
|
if (e->scale != ENTSCALE_DEFAULT && e->scale != 0) scale *= ENTSCALE_DECODE(e->scale);
|
||||||
|
|
||||||
const ScePspFVector3 translation = {
|
const ScePspFVector3 translation = {
|
||||||
paliashdr->scale_origin[0], paliashdr->scale_origin[1], paliashdr->scale_origin[2]
|
paliashdr->scale_origin[0] * scale, paliashdr->scale_origin[1] * scale, paliashdr->scale_origin[2] * scale
|
||||||
};
|
};
|
||||||
const ScePspFVector3 scaling = {
|
const ScePspFVector3 scaling = {
|
||||||
paliashdr->scale[0] * scale, paliashdr->scale[1] * scale, paliashdr->scale[2] * scale
|
paliashdr->scale[0] * (scale * 128.0f), paliashdr->scale[1] * (scale * 128.0f), paliashdr->scale[2] * (scale * 128.0f)
|
||||||
};
|
};
|
||||||
|
|
||||||
sceGumTranslate(&translation);
|
sceGumTranslate(&translation);
|
||||||
|
|
Loading…
Reference in a new issue