u.utraptype, TT_BEARTRAP

Add 'FIXME' fix by entrez to change TT_BEARTRAP to non-zero.

Increments EDITLEVEL, invalidating existing save and bones files.
This commit is contained in:
PatR
2022-04-27 11:04:12 -07:00
parent f6149904c3
commit d194459c7d
5 changed files with 14 additions and 13 deletions
+2
View File
@@ -1858,3 +1858,5 @@ remove obsolete roles[].femalenum and rename roles[].malenum to roles[].mnum;
likewise for races[] likewise for races[]
add git submodule support to the Makefiles by specifying git=1 or GIT=1 on the add git submodule support to the Makefiles by specifying git=1 or GIT=1 on the
make command make command
add TT_NONE==0, renumber other u.utraptype values so that TT_BEARTRAP isn't 0
+1 -1
View File
@@ -17,7 +17,7 @@
* Incrementing EDITLEVEL can be used to force invalidation of old bones * Incrementing EDITLEVEL can be used to force invalidation of old bones
* and save files. * and save files.
*/ */
#define EDITLEVEL 53 #define EDITLEVEL 54
/* /*
* Development status possibilities. * Development status possibilities.
+7 -6
View File
@@ -327,12 +327,13 @@ struct Align {
extern const struct Align aligns[]; /* table of available alignments */ extern const struct Align aligns[]; /* table of available alignments */
enum utraptypes { enum utraptypes {
TT_BEARTRAP = 0, TT_NONE = 0,
TT_PIT = 1, TT_BEARTRAP = 1,
TT_WEB = 2, TT_PIT = 2,
TT_LAVA = 3, TT_WEB = 3,
TT_INFLOOR = 4, TT_LAVA = 4,
TT_BURIEDBALL = 5 TT_INFLOOR = 5,
TT_BURIEDBALL = 6
}; };
enum utotypes { enum utotypes {
+3
View File
@@ -1510,6 +1510,9 @@ trapmove(int x, int y, /* targetted destination, <u.ux+u.dx,u.uy+u.dy> */
buried_ball_to_punishment(); buried_ball_to_punishment();
} }
break; break;
case TT_NONE:
impossible("trapmove: trapped in nothing?");
break;
default: default:
impossible("trapmove: stuck in unknown trap? (%d)", impossible("trapmove: stuck in unknown trap? (%d)",
(int) u.utraptype); (int) u.utraptype);
+1 -6
View File
@@ -902,12 +902,7 @@ set_utrap(unsigned int tim, unsigned int typ)
g.context.botl = TRUE; g.context.botl = TRUE;
u.utrap = tim; u.utrap = tim;
/* FIXME: u.utraptype = tim ? typ : TT_NONE;
* utraptype==0 is bear trap rather than 'none'; we probably ought
* to change that but can't do so until save file compatability is
* able to be broken.
*/
u.utraptype = tim ? typ : 0;
float_vs_flight(); /* maybe block Lev and/or Fly */ float_vs_flight(); /* maybe block Lev and/or Fly */
} }