fixed issues with falling animations; fall for a longer time in non-hyperbolic

This commit is contained in:
Zeno Rogue 2017-11-13 11:57:05 +01:00
parent 005abefa09
commit d8a279b15d
2 changed files with 11 additions and 7 deletions

View File

@ -3014,18 +3014,18 @@ void pushdown(cell *c, int& q, const transmatrix &V, double down, bool rezoom, b
ptd.u.poly.V = xyzscale( V, xyscale*zscale, zscale)
* inverse(V) * ptd.u.poly.V;
if(!repriority) ;
else if(nlev < -geom3::lake_bottom-1e-3) {
ptd.prio = PPR_BELOWBOTTOM;
ptd.prio = PPR_BELOWBOTTOM_FALLANIM;
if(c->wall != waChasm)
ptd.col = 0; // disappear!
}
else if(nlev < -geom3::lake_top-1e-3)
ptd.prio = PPR_INLAKEWALL;
ptd.prio = PPR_INLAKEWALL_FALLANIM;
else if(nlev < 0)
ptd.prio = PPR_LAKEWALL;
}
ptd.prio = PPR_LAKEWALL_FALLANIM;
}
}
}
@ -4266,12 +4266,13 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
if(chasmg) {
int q = size(ptds);
int maxtime = euclid || sphere ? 20000 : 1500;
if(fallanims.count(c)) {
fallanim& fa = fallanims[c];
bool erase = true;
if(fa.t_floor) {
int t = (ticks - fa.t_floor);
if(t <= 1500) {
if(t <= maxtime) {
erase = false;
if(fa.walltype == waNone)
warpfloor(c, V, darkena(fcol, fd, 0xFF), PPR_FLOOR, isWarped(c));
@ -4294,7 +4295,7 @@ void drawcell(cell *c, transmatrix V, int spinv, bool mirrored) {
if(fa.t_mon) {
dynamicval<int> d(multi::cpid, fa.pid);
int t = (ticks - fa.t_mon);
if(t <= 1500) {
if(t <= maxtime) {
erase = false;
c->stuntime = 0;
transmatrix V2 = V;

View File

@ -1124,10 +1124,13 @@ enum PPR {
PPR_BELOWBOTTOMm,
PPR_BELOWBOTTOM,
PPR_BELOWBOTTOMp,
PPR_BELOWBOTTOM_FALLANIM,
PPR_LAKEBOTTOM, PPR_HELLSPIKE,
PPR_INLAKEWALLm, PPR_INLAKEWALL, PPR_INLAKEWALLp,
PPR_INLAKEWALL_FALLANIM,
PPR_SUBLAKELEV, PPR_LAKELEV, PPR_BOATLEV, PPR_BOATLEV2, PPR_BOATLEV3,
PPR_LAKEWALLm, PPR_LAKEWALL, PPR_LAKEWALLp,
PPR_LAKEWALL_FALLANIM,
PPR_FLOOR_TOWER,
PPR_FLOOR,
PPR_FLOOR_DRAGON,