hangup vs u.uinwater again (trunk only)
Redo the fix that prevents hangup from putting hero on top of water if it occurs during magic mapping or object/gold/trap detection. Instead of copying u.uinwater into another field in struct u so that it can be reset during restore, copy it into a new field in struct iflags and reset it during save so that no fixup upon restore is needed.
This commit is contained in:
@@ -306,6 +306,11 @@ struct instance_flags {
|
||||
#define MAX_ALTKEYHANDLER 25
|
||||
char altkeyhandler[MAX_ALTKEYHANDLER];
|
||||
#endif
|
||||
/* copies of values in struct u, used during detection when the
|
||||
originals are temporarily cleared; kept here rather than
|
||||
locally so that they can be restored during a hangup save */
|
||||
Bitfield(save_uinwater,1);
|
||||
Bitfield(save_uburied,1);
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
@@ -227,14 +227,6 @@ struct Align {
|
||||
|
||||
extern const struct Align aligns[]; /* table of available alignments */
|
||||
|
||||
/* hangup handling; sometimes u.uinwater is overridden, and we need to
|
||||
be able to reset it in the event of restoring from a hangup save;
|
||||
save/override/restore takes place during normal execution, so this
|
||||
isn't dependent upon current port's signal handling capability */
|
||||
struct huphack {
|
||||
Bitfield(hup_uinwater,1);
|
||||
Bitfield(hup_uburied,1);
|
||||
};
|
||||
|
||||
/*** Information about the player ***/
|
||||
struct you {
|
||||
@@ -368,7 +360,6 @@ struct you {
|
||||
xchar skill_record[P_SKILL_LIMIT]; /* skill advancements */
|
||||
struct skills weapon_skills[P_NUM_SKILLS];
|
||||
boolean twoweap; /* KMH -- Using two-weapon combat */
|
||||
struct huphack save; /* hup_{uinwater,uburied} */
|
||||
|
||||
}; /* end of `struct you' */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user