2d3d:: boats

This commit is contained in:
Zeno Rogue 2019-05-10 01:28:18 +02:00
parent dbb8857a39
commit b6c8727e1f
2 changed files with 5 additions and 2 deletions

View File

@ -882,6 +882,9 @@ void make_3d_models() {
for(int i=0; i<3; i++)
shift_shape(shHalfFloor[i], geom3::lev_to_factor(geom3::human_height * .01));
}
shift_shape(shBoatOuter, geom3::FLOOR);
shift_shape(shBoatInner, (geom3::FLOOR+geom3::LAKE)/2);
}
#undef S

View File

@ -4114,7 +4114,7 @@ void drawBoat(cell *c, const transmatrix*& Vboat, transmatrix& Vboat0, transmatr
int incol = magical ? 0x0060C0FF : 0x804000FF;
bool nospin = false;
if(DIM == 3) {
if(WDIM == 3) {
Vboat0 = V;
nospin = c->wall == waBoat && applyAnimation(c, Vboat0, footphase, LAYER_BOAT);
if(!nospin) Vboat0 = face_the_player(V);
@ -4141,7 +4141,7 @@ void drawBoat(cell *c, const transmatrix*& Vboat, transmatrix& Vboat0, transmatr
if(applyAnimation(c, Vx, footphase, LAYER_SMALL))
animations[LAYER_SMALL][c].footphase = 0;
}
if(wmspatial)
if(wmspatial && GDIM == 2)
queuepolyat(mscale(Vboat0, (geom3::LAKE+1)/2), shBoatOuter, outcol, PPR::BOATLEV2);
queuepoly(Vboat0, shBoatOuter, outcol);
queuepoly(Vboat0, shBoatInner, incol);