Commit b1b5de4 switched from enabling select physics flags to setting
those flags and clearing all others. Unfortunately, flag PF_USES_THRUST
was omitted from the enabled list, so it was disabled on reset. It is
required to let player ships move.
Reported-by: Sottises <https://github.com/dxx-rebirth/dxx-rebirth/issues/347>
Fixes: b1b5de4297 ("Additional safeguard for bug #306")
lukeman3000 asked how to control the volume of the in-game movies.
Prior to this commit, there was no in-game solution to this. This
change scales movie audio by the SoundFx slider.
Thanks to lukeman3000 for inspiring this change. Thanks to Ryusei117
for explaining what videos needed to be affected, and for testing an
earlier iteration of the change.
Requested-by: lukeman3000 <https://forum.dxx-rebirth.com/showthread.php?tid=986>
Editor groups write `struct segment` to a file in raw form, but had no
code to enforce that this raw form remained stable over time. Various
changes to `struct segment` have repeatedly changed its internal
structure. Each change created an incompatible dialect of the editor
group file, and all the dialects share the same version number.
According to
```
git log -p -L'/struct segment {/,/};/:common/main/segment.h' HEAD --not 0.58.1-d1x 0.58.1-d2x --
```
`struct segment` changed layout in:
* d1c6b89f17 ("Move dsx::segment -> dcx::segment") [D1 only]
* 596ecbb38d ("Rename segment::value to segment::station_idx") [D1 only]
* 6f10a67c09 ("Move segment::sides to end")
* c53b734abb ("Compute slide segments early") [D2 only]
* 40e90fea22 ("Move Light_subtracted[] to Segments[].light_subtracted")
* a65d774c83 ("Improve packing of struct segment")
* c70c6c98b3 ("Remove obsolete segment::degenerated flag")
Mark editor groups as broken to avoid making the mess worse. If anyone
cares about group support, it needs to be rewritten not to depend on the
internal layout of `struct segment`.
Descent 2, but not Descent 1, had a useless test in render_side:
type == QUAD ? 0 :
type == TRI_13 ? 1 :
0
This is useless since, if type is not QUAD, the second expression will
apply. If type is QUAD, then the type is not TRI_13, so the second
expression would choose the same result as the first. The extra
comparison does not save any work, so it is useless. Remove it.
Commit 1335af4b51 restructured briefing number parsing, but
unintentionally changed the parser not to drop the newline after a
number. The briefing parsing code is very sensitive to minor changes,
so this broke parsing some briefing screens, including Vertigo briefing
screens after the first. After the change, clicking through the Vertigo
briefing aborts on failure to load a PCX file.
Fix this by consuming the newline before returning. This matches the
previous semantics.
Reported-by: Havner <https://github.com/dxx-rebirth/dxx-rebirth/issues/343>
Fixes: 1335af4b51 ("Simplify get_message_num")
Like many things in the main game loop, lavafall handling was
historically done on a per-frame basis, then its effects were scaled to
FrameTime to normalize the results. Ignoring rounding errors, this
produced roughly equivalent damage for high framerate users (who
experienced many but small damage hits) and low framerate users (who
experienced few but large damage hits). However, the randomized
movement was not scaled to FrameTime, which caused differing results for
high framerate users versus low framerate users. Commit b36c6f20c7
tried to fix this by forcing scrape_player_on_wall to run at a capped
maximum effective frame rate, then scaling the damage in
check_volatile_wall accordingly, so that high framerate users would
experience fewer damage hits, but the ones they received were larger,
thus maintaining approximately the same damage as before.
Prior to b36c6f20c7, damage was always scaled to FrameTime. In
b36c6f20c7 and later, damage scaled to max(FrameTime,
DESIGNATED_GAME_FRAMETIME), causing users with a high frame rate (and
thus low FrameTime) to take more damage on each pass. This damage
increase was balanced by an added hack in scrape_player_on_wall to limit
the frequency of the scrape so that high framerate users would skip some
scrapes, giving them a virtual frame rate appropriate to
DESIGNATED_GAME_FRAMETIME. However, the damage is only balanced if the
new governor is used consistently. It is not used consistently, so it
caused a regression for passable lava surfaces. Scraping on a solid
lava surface goes through scrape_player_on_wall and respects the
governor. Touching a passable lava surface (only available in Descent
2) bypasses scrape_player_on_wall and jumps directly to
check_volatile_wall, thereby bypassing the governor. This allows high
framerate users touching a passable lava surface to take many hits (as
they always did), but not receive the full benefit of downward scaling
the damage (as they once did) due to the new max() expression. Thus,
they are damaged frequently, but still take damage consistent with being
damaged infrequently.
Fix this by moving the hack from scrape_player_on_wall to
check_volatile_wall, so that both solid lava surfaces and passable lava
surfaces respect the governor. The governor is still an ugly hack that
should not be global, but this is a spot fix for the immediate problem.
Fixes: b36c6f20c7 ("Made scrape_player_on_wall() based on a timer. Due to the player being pushed away from the lava/water surface in every frame in a random vector (wrong, too), player movement per frame was not enough to counter this on FPS rates > ~120 which made damage scaling per frame nonsensical in these situations. Instead, execute scrape results in intevals based on DESIGNATED_GAME_FRAMETIME (or per frame if FrameTime>DESIGNATED_GAME_FRAMETIME) which fixes the issues and generally works much better for the purpose of this function.")
Commit f4b21088a0 ("Track vulcan ammo explicitly") fixed an original
retail bug that prevented the thief from stealing energy weapons,
because the thief could only steal weapons for which the player had ammo
and energy weapons never have ammo. This went unremarked for several
years, until a recent report of the new semantics as a game-breaking
regression because the thief is now "ridiculously potent".
Address this report, as well as an intermittently raised issue from
various users over time, by adding two new knobs to both the single
player "Gameplay" menu and the multiplayer setup screen: "Remove Thief
at level start" and "Prevent Thief Stealing Energy Weapons".
"Remove Thief" deletes the thief object during level load. It has no
impact on save games, and changing it after entering a level has no
effect on any thief already in the level.
"Prevent Thief Stealing" is checked at the moment of theft and, when
enabled, prevents stealing primary weapons other than Vulcan/Gauss.
This can be changed at will in single player and is immediately
effective. In multiplayer, this option can only be changed by the game
host in the pre-game setup.
For both knobs, there is one pair of checkboxes to control this as a
player preference, which applies in single player games. There is a
second pair of checkboxes in the multiplayer setup, which applies only
to multiplayer games. Therefore, in multiplayer, the host chooses thief
settings and all clients use the host's choice. The host may configure
the thief differently in multiplayer from how the host plays in single
player.
For users who wanted to remove the thief, no specific tally has been
kept for who requested it or when. Now that the code is being updated,
this is thrown in as an easy addition.
Reported-by: MegaDescent <http://forum.dxx-rebirth.com/showthread.php?tid=980> (for the thief stealing energy weapons as a game-breaking regression)
When reporting use of SDL_mixer, report its loaded version. When
running in verbose mode, report both the compile-time and load-time
versions of PhysFS, libSDL, and SDL_mixer.
Some Linux libraries print their own messages to stdout/stderr,
particularly in case of severe errors. Decorate messages generated by
Rebirth to distinguish them from library generated messages.
For specific blacklisted renderers, add a message informing the user
that the blacklist matched and changed settings.
Only one caller exists, and that caller alway passes a non-nullptr
value. Switch to a reference and remove the unused special case to
handle a nullptr input.
Most uses pass an orientation matrix. All sites are deterministic about
whether a matrix is passed. Make the matrix mandatory for sites that
passed it, and split out a separate version of g3_start_instance_matrix
for the 2 sites which do not provide orientation.
Function bm_load does not exist in current tip, 0.58.1-d2x, 0.51-d2x,
nor various early snapshots of D2X (not D2X-Rebirth, just D2X).
Attempting to enable STATION_ENABLED fails without this function. Since
it seems to have been absent for at least 10 years (0.51-d2x tagged Feb
2007), and possibly more than 16 years (D2X snapshots from 2001), it
seems reasonable to assume no one has used this code in any open source
release. Remove it.
This backports into Descent 1 the special-case that loads a Vulcan
cannon when it is dropped. It also fixes a longstanding bug that a
robot that drops more than one of the powerup would fill only one of
them.