mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-11-23 21:07:17 +00:00
3d-models:: yet another fix to make_revolution_cut
This commit is contained in:
parent
d868548fa2
commit
21e399648f
@ -579,7 +579,11 @@ void geometry_information::make_revolution_cut(hpcshape &sh, int each, ld push,
|
||||
for(int i=0; i<n; i++) if(!stillin[i] && !stillin[lastid[i]]) lastid[i] = lastid[lastid[i]];
|
||||
|
||||
for(int i=0; i<n; i++) {
|
||||
if(!stillin[i]) gbody[i] = cgi.emb->normalize_flat(gbody[lastid[i]] * (i - lastid[i]) + gbody[nextid[i]] * (nextid[i] - i));
|
||||
if(!stillin[i]) {
|
||||
auto gl = cgi.emb->actual_to_logical(gbody[lastid[i]]);
|
||||
auto gn = cgi.emb->actual_to_logical(gbody[nextid[i]]);
|
||||
gbody[i] = cgi.emb->logical_to_actual((gl * (i - lastid[i]) + gn * (nextid[i] - i)) / (nextid[i] - lastid[i]));
|
||||
}
|
||||
}
|
||||
|
||||
bshape(sh, PPR::MONSTER_BODY);
|
||||
|
Loading…
Reference in New Issue
Block a user