1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 08:27:39 +00:00

3d:: refactored the hide_player function

This commit is contained in:
Zeno Rogue
2019-03-09 15:31:02 +01:00
parent 9f9670fcdb
commit 55c31ec645
3 changed files with 15 additions and 9 deletions

View File

@@ -3463,13 +3463,15 @@ bool drawMonster(const transmatrix& V, cell *c, const transmatrix*& Vboat, trans
switch(m->type) {
case moPlayer:
playerfound = true;
if(playermoved && DIM == 3 && vid.yshift == 0 && vid.sspeed > -5) continue;
cpid = m->pid;
if(DIM == 3) view = view * spin(-M_PI/2);
drawPlayerEffects(view, c, true);
if(m->inBoat) m->footphase = 0;
if(mapeditor::drawplayer) drawMonsterType(moPlayer, c, view, 0xFFFFFFC0, m->footphase);
if(!hide_player()) {
if(DIM == 3) view = view * spin(-M_PI/2);
drawPlayerEffects(view, c, true);
if(m->inBoat) m->footphase = 0;
if(mapeditor::drawplayer) drawMonsterType(moPlayer, c, view, 0xFFFFFFC0, m->footphase);
}
if(keyresult[cpid]) {
hyperpoint h = keytarget(cpid);
queuechr(h, vid.fsize, '+', iinf[keyresult[cpid]].color);