Monsters can track hero through fixed teleport traps

Also make fixed teleport traps always trigger when entered.
This commit is contained in:
Pasi Kallinen
2024-06-15 18:44:25 +03:00
parent 4e1b6411bf
commit 89ea47f702
6 changed files with 31 additions and 1 deletions

View File

@@ -3144,6 +3144,7 @@ extern int tt_doppel(struct monst *) NONNULLARG1;
extern void initrack(void);
extern void settrack(void);
extern coord *gettrack(coordxy, coordxy);
extern boolean hastrack(coordxy, coordxy);
extern void save_track(NHFILE *) NONNULLARG1;
extern void rest_track(NHFILE *) NONNULLARG1;

View File

@@ -122,5 +122,7 @@ enum trap_immunities {
|| (ttyp) == POLY_TRAP)
/* "transportation" traps */
#define is_xport(ttyp) ((ttyp) >= TELEP_TRAP && (ttyp) <= MAGIC_PORTAL)
#define fixed_tele_trap(t) ((t)->ttyp == TELEP_TRAP \
&& isok((t)->teledest.x,(t)->teledest.x))
#endif /* TRAP_H */