mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-06-07 13:22:11 +00:00
fixed the facing of player characters
This commit is contained in:
+1
-1
@@ -104,7 +104,7 @@ EX void animateAttack(const movei& m, int layer) {
|
||||
}
|
||||
|
||||
EX void animateCorrectAttack(const movei& m, int layer, eMonster who) {
|
||||
if(among(who, moPlayer, moMimic, moIllusion, moShadow) && (getcs().charid/2) == pshSpaceship) {
|
||||
if(looks_like_player(who) && (getcs().charid/2) == pshSpaceship) {
|
||||
animate_item_throw(m.s, m.t, itNone, moBullet);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -409,4 +409,8 @@ EX bool isDie(eWall w) {
|
||||
return among(w, waRichDie, waHappyDie);
|
||||
}
|
||||
|
||||
EX bool looks_like_player(eMonster m) {
|
||||
return among(m, moPlayer, moMimic, moIllusion, moShadow);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+9
-1
@@ -370,7 +370,15 @@ EX bool drawMonsterType(eMonster m, cell *where, const shiftmatrix& V1, color_t
|
||||
char xch = minf[m].glyph;
|
||||
|
||||
shiftmatrix V = V1;
|
||||
if(WDIM == 3 && (classflag(m) & CF_FACE_UP) && where && !mhybrid) V = V1 * cspin90(0, 2);
|
||||
if(WDIM == 3) {
|
||||
bool faceup;
|
||||
if(looks_like_player(m))
|
||||
faceup = playershapes[getcs().charid >> 1].is_humanoid;
|
||||
else
|
||||
faceup = classflag(m) & CF_FACE_UP;
|
||||
if(faceup)
|
||||
V = V1 * cspin90(0, 2);
|
||||
}
|
||||
|
||||
#if CAP_SHAPES
|
||||
if(among(m, moTortoise, moWorldTurtle) && where && where->stuntime >= 3)
|
||||
|
||||
Reference in New Issue
Block a user