mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-02-04 13:19:20 +00:00
fixed shmup with wall_height < 0 to correctly swap the 'X' coordinate
This commit is contained in:
parent
436f782541
commit
14fd283dd2
@ -878,6 +878,8 @@ void movePlayer(monster *m, int delta) {
|
||||
|
||||
godir[cpid] = 0;
|
||||
|
||||
if(embedded_plane && vid.wall_height < 0) mdx = -mdx;
|
||||
|
||||
if(WDIM == 2 && GDIM == 3 && (mdx || mdy)) {
|
||||
double mdd = hypot(mdx, mdy);
|
||||
godir[cpid] = -atan2(mdx, -mdy);
|
||||
@ -919,7 +921,7 @@ void movePlayer(monster *m, int delta) {
|
||||
bool blown = m->blowoff > curtime;
|
||||
|
||||
#if CAP_MOUSEGRAB
|
||||
if(WDIM == 2 && GDIM == 3 && !lctrlclick && cpid == 0) {
|
||||
if(embedded_plane && !lctrlclick && cpid == 0) {
|
||||
if(!stdracing) playerturn[cpid] -= mouseaim_x;
|
||||
playerturny[cpid] -= mouseaim_y;
|
||||
mouseaim_x = 0;
|
||||
@ -927,6 +929,8 @@ void movePlayer(monster *m, int delta) {
|
||||
}
|
||||
#endif
|
||||
|
||||
if(embedded_plane && vid.wall_height < 0) playerturn[cpid] = -playerturn[cpid];
|
||||
|
||||
if(playerturn[cpid] && canmove && !blown && WDIM == 2) {
|
||||
m->swordangle -= playerturn[cpid];
|
||||
rotate_object(nat.T, m->ori, spin(playerturn[cpid]));
|
||||
|
Loading…
Reference in New Issue
Block a user