Fix#576
Reported initially by @copperwater for polymorphed monsters:
"observe how the [polymorphed-monster] hovers placidly above the water for
several turns like Wile E. Coyote before it gets a move, realizes it's
above water, and drowns. Ditto for lava."
A comment in the GitHub issue thread by @Tomsod pointed out that a
revived corpse could do the same.
This should set things up for other terrain fallout if discovered or
implemented in the future.
- consume an additional bit in enum mon_terrain_effects (hack.h)
- include the additional bit in TERRAIN_FALLOUT_MASK (monst.h)
- add detection to maybe_set_terrain_effects (mon.c)
- add action to terrain_effects (mon.c)
Implemented by stealing some upper unused mstate bits to avoid
invalidating existing save and bones.
If a line in the menu has fewer columns than the others, the last one
is deemed to extend to the right margin, and does not count toward the
maximum width of that column.
Also, revert the change to NetHack.font_menu.
../sys/unix/unixmain.c: In function ‘process_options’:
../sys/unix/unixmain.c:458:9: warning: use of uninitialized value ‘origarg’ [CWE-457] [-Wanalyzer-use-of-uninitialized-value]
458 | config_error_add("Unknown option: %.60s", origarg);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Set the menu font to proportional
* Do not consider the last column of a line when calculating maximum
column widths
* Use U+200A HAIR SPACE for finer column padding
* Track errors in column padding and adjust subsequent columns so that
these errors do not accumulate across a row
../src/pline.c: In function 'execplinehandler':
../src/pline.c:678:15: error: implicit declaration of function '_spawnv' [-Wimplicit-function-declaration]
678 | ret = _spawnv(_P_NOWAIT, sysopt.msghandler, args);
| ^~~~~~~
../src/pline.c:678:23: error: '_P_NOWAIT' undeclared (first use in this function); did you mean 'MM_NOWAIT'?
678 | ret = _spawnv(_P_NOWAIT, sysopt.msghandler, args);
| ^~~~~~~~~
| MM_NOWAIT
../src/pline.c:678:23: note: each undeclared identifier is reported only once for each function it appears in
make: *** [GNUmakefile:1376: o/nethack/pline.o] Error 1
The widget is created with a label but not a pixmap, and then a pixmap
is set up for display. If the label is already realized and managed, it
will not resize when the pixmap is set up. This causes problems when
the inventory window is updated: unlike other menus, the parent Form
widget is already realized. The fix is to create the item widget in an
unmanaged state (XtCreateWidget), set up the pixmap (X11_wrap_widget
and X11_set_attrs), and then manage it (XtManageChild).
Unix command line handling treated an unknown command line parameter
as a maximum number of allowed concurrent players. This emitted
a complaint about expected MAXPLAYERS, and as it can be now set
in sysconf, remove this - most likely unused - functionality.
early_init() was already being called at pcmain.c line 70,
so the recently added call at line 132 was problematic
because it cleared program_state values that had been
intentionally set since the call at line 70.