mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-06-27 23:53:18 +00:00
fixed issues with falling animations; fall for a longer time in non-hyperbolic
This commit is contained in:
parent
005abefa09
commit
d8a279b15d
15
graph.cpp
15
graph.cpp
|
@ -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)
|
ptd.u.poly.V = xyzscale( V, xyscale*zscale, zscale)
|
||||||
* inverse(V) * ptd.u.poly.V;
|
* inverse(V) * ptd.u.poly.V;
|
||||||
|
|
||||||
if(!repriority) ;
|
if(!repriority) ;
|
||||||
else if(nlev < -geom3::lake_bottom-1e-3) {
|
else if(nlev < -geom3::lake_bottom-1e-3) {
|
||||||
ptd.prio = PPR_BELOWBOTTOM;
|
ptd.prio = PPR_BELOWBOTTOM_FALLANIM;
|
||||||
if(c->wall != waChasm)
|
if(c->wall != waChasm)
|
||||||
ptd.col = 0; // disappear!
|
ptd.col = 0; // disappear!
|
||||||
}
|
}
|
||||||
else if(nlev < -geom3::lake_top-1e-3)
|
else if(nlev < -geom3::lake_top-1e-3)
|
||||||
ptd.prio = PPR_INLAKEWALL;
|
ptd.prio = PPR_INLAKEWALL_FALLANIM;
|
||||||
else if(nlev < 0)
|
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) {
|
if(chasmg) {
|
||||||
int q = size(ptds);
|
int q = size(ptds);
|
||||||
|
int maxtime = euclid || sphere ? 20000 : 1500;
|
||||||
if(fallanims.count(c)) {
|
if(fallanims.count(c)) {
|
||||||
fallanim& fa = fallanims[c];
|
fallanim& fa = fallanims[c];
|
||||||
bool erase = true;
|
bool erase = true;
|
||||||
if(fa.t_floor) {
|
if(fa.t_floor) {
|
||||||
int t = (ticks - fa.t_floor);
|
int t = (ticks - fa.t_floor);
|
||||||
if(t <= 1500) {
|
if(t <= maxtime) {
|
||||||
erase = false;
|
erase = false;
|
||||||
if(fa.walltype == waNone)
|
if(fa.walltype == waNone)
|
||||||
warpfloor(c, V, darkena(fcol, fd, 0xFF), PPR_FLOOR, isWarped(c));
|
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) {
|
if(fa.t_mon) {
|
||||||
dynamicval<int> d(multi::cpid, fa.pid);
|
dynamicval<int> d(multi::cpid, fa.pid);
|
||||||
int t = (ticks - fa.t_mon);
|
int t = (ticks - fa.t_mon);
|
||||||
if(t <= 1500) {
|
if(t <= maxtime) {
|
||||||
erase = false;
|
erase = false;
|
||||||
c->stuntime = 0;
|
c->stuntime = 0;
|
||||||
transmatrix V2 = V;
|
transmatrix V2 = V;
|
||||||
|
|
3
hyper.h
3
hyper.h
|
@ -1124,10 +1124,13 @@ enum PPR {
|
||||||
PPR_BELOWBOTTOMm,
|
PPR_BELOWBOTTOMm,
|
||||||
PPR_BELOWBOTTOM,
|
PPR_BELOWBOTTOM,
|
||||||
PPR_BELOWBOTTOMp,
|
PPR_BELOWBOTTOMp,
|
||||||
|
PPR_BELOWBOTTOM_FALLANIM,
|
||||||
PPR_LAKEBOTTOM, PPR_HELLSPIKE,
|
PPR_LAKEBOTTOM, PPR_HELLSPIKE,
|
||||||
PPR_INLAKEWALLm, PPR_INLAKEWALL, PPR_INLAKEWALLp,
|
PPR_INLAKEWALLm, PPR_INLAKEWALL, PPR_INLAKEWALLp,
|
||||||
|
PPR_INLAKEWALL_FALLANIM,
|
||||||
PPR_SUBLAKELEV, PPR_LAKELEV, PPR_BOATLEV, PPR_BOATLEV2, PPR_BOATLEV3,
|
PPR_SUBLAKELEV, PPR_LAKELEV, PPR_BOATLEV, PPR_BOATLEV2, PPR_BOATLEV3,
|
||||||
PPR_LAKEWALLm, PPR_LAKEWALL, PPR_LAKEWALLp,
|
PPR_LAKEWALLm, PPR_LAKEWALL, PPR_LAKEWALLp,
|
||||||
|
PPR_LAKEWALL_FALLANIM,
|
||||||
PPR_FLOOR_TOWER,
|
PPR_FLOOR_TOWER,
|
||||||
PPR_FLOOR,
|
PPR_FLOOR,
|
||||||
PPR_FLOOR_DRAGON,
|
PPR_FLOOR_DRAGON,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user