| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
.cc, moving its contents into the new stepdown.cc and strings.cc.
(The latter also got many donations from libutil.h.)
Down with stuff! Up the new flesh!
|
| |
|
| |
|
|
|
|
|
| |
It doesn't make a difference currently, but if ghost_init ever decides
to set the attitude, this would be more correct.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Also #5511, #6200, #8408, #8779, and #8790.
|
|
|
|
|
| |
Mostly by joining short lines in places where that would let us remove
braces.
|
|
|
|
|
|
|
|
|
| |
A good deal of functions move to the two new files, mon-poly and
mon-message. Of the others, some go to where they are used, some to
mon-util, and a few are made member methods of monster.
This probably breaks Xcode compilation, and I'm not able to test
the changes I made to MSVC that will (hopefully) keep it working.
|
|
|
|
| |
Making GHOST_LIMIT a size_t would be more intrusive than this cast.
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Previously, only one .bones file (containing potentially
multiple associated ghosts) could be stored per-floor.
This adds support for storing multiple ghost files
per-floor, solving issues where ghosts might be 'lost'
otherwise.
|
|
|
|
| |
Currently unused, but there are plans.
|
| |
|
| |
|
|
|
|
|
| |
Remove some redundant checks, add support for 'r+b',
generally clean things up.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is full of race conditions and is leaving behind zero-byte files
after apparent failures to rename the .tmp files left by
safe_file_writer.
Some of that could be fixed by having safe_file_writer fdopen the
descriptor returned by mkstemp, but even then there's a race between
opening and locking (and mkostemp, which could solve that, is specific
to glibc).
Also, we don't seed the libc RNG, which probably reduces the efficiency
of mkstemp and makes the races more likely to trigger.
This reverts commit a46b10507c9a1b72007ee48b71116a2005a1fe48. Bones
generated to bones/ between that commit and this one will be ignored by
subsequent games. If the feature is reenabled, we need some mechanism
to clean out old zero-byte files without crashing.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, ghost files (.bones) were limited to one per level.
This meant that if players died on a level that already had an
associated .bones file (if e.g. the 1/3 'generate ghost' chance
wasn't met), then their ghost would vanish entirely.
This commit allows more than one .bones file to be stored for a
given level, each holding one or more ghosts that will be generated
together, as before. This may lead to an increase in ghost
generation, depending on server dynamics; if this is problematic,
the generation chance can be tweaked.
|
|
|
|
| |
This fixes all the instances caught by unbrace.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Only rarely, and only upon entering a level for the first time. Randomly
pick between providing a fairly long-duration stealth boost or making a
loud noise.
|
| |
|
| |
|
|
|
|
|
| |
For players this is displayed in a case of a crash/error/unexpected end.
For watchers the dialog is displayed regardless of how the game ended.
|
| |
|
|
|
|
| |
Also, improve a comment (SamB).
|
|
|
|
| |
Hopefully this makes things at least a *little* better for Sky.
|
| |
|
|
|
|
|
| |
Overloading made it impossible to redefine them, assign colours, made it
hard to do stuff on C++ side, and stank of elderberries.
|
|
|
|
|
|
| |
Butchery is always allowed except in a few forms (bat, wisp, fungus).
Removes a lot of unnecessary/unused code for swapping weapons and removing
equipment when butchering.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
While the problem this commit attempts to fix is real, I'm afraid it causes
more breakage:
* it removes debug messages from map generation
* especially, infinite loops become extremely hard to debug
* loses output that overflows
* has issues with force_more
* portal vault announcements are lost
For example, a level with both a Lab and an Ice Cave shows just:
"There is an entrance to an ice cave on this level. Hurry and find it before the portal melts!"
even though there's no overflow. The rest (the main "wave of frost" message
and anything about the Lab) are gone.
I'm afraid some other approach is needed. Perhaps forcing a screen draw?
This reverts commit 8471a022e76bae39918ba6eaa1fbbab5c7ceb64f.
|
|
|
|
| |
Kills the reproducibility.
|
|
|
|
|
|
|
|
| |
Getting a more prompt during level load results in a screen only partially
updated and looking really bugged. It's especially bad since it happened
during loading tutorial levels which is the very first thing many new player
see. It also happened when entering a level with an announce portal. If there
are more cases, I didn't test them.
|
| |
|
|
|
|
|
|
|
|
|
| |
Also simplify quite a few cases.
It turns out in >90% cases of non-literals the argument had .c_str(),
which meant it was pointlessly malloc()ed and converted from and to
std::string. I believe a sprintf is faster, so even the argument of
miniscule speed-up doesn't apply.
|
|
|
|
|
|
|
|
|
|
| |
As the comment said, every single use of this function was a save-corrupting
bug.
Too bad, there's one case left: on Unix, HUP will fclose(stdin), which can
immediately fail due to fclose() using malloc (free() to be exact), and then
it still relies on undefined behaviour which sometimes works only because
ncurses does weird things behind our back.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
map or set.count() can test the presence of a given key and return 0 or 1
outright.
|