Build 9214
GIT-
Fix potential crashes in menu if no ALSA MIDI device is found
SVN handles and Git names are merged into one person.
Fix potential crashes in menu if no ALSA MIDI device is found
Revert "sw/src/game.cpp: Use initsingleplayers instead of initmultiplayers"
This reverts commit 4274a6160ce2f64676b79364cf83f185814811f6, i.e., SVN r8667.
Fix a possible jitter upon changing the player's action
(e.g., beginning to jump, or landing on ground); Reproduced with the input being tied to framerate while SO interpolation is toggled on. This involves the following modifications: - PF2_INPUT_CAN_TURN and PF2_INPUT_CAN_AIM are now additionally set from various DoPlayerBegin* functions, allowing the player to continue turning/aiming as usual (right before the next call to domovethings), even in specific instances of player action changes. - If PF2_INPUT_CAN_TURN/PF2_INPUT_CAN_AIM was set before and after calling pp->DoPlayerAction from domovethings altogether, ensure that the player's oq16ang/oq16horiz is updated by making an appropriate call to DoPlayerTurn/DoPlayerHorizon. This is done in case a call to DoPlayerTurn/DoPlayerHorizon is missed. This change is not applied for a dead player, though.
This should hopefully be a better way of fixing the lack of
interpolation of player turning/aiming/movement, while being carried by a sector object, without SO interpolation. This is a continuation of 73a0aa394e906a65633d61f3c749c9b9b7e66aaa and bf31bc2987a3eccd31d343622327bd4ee0f9c5a1, aiming to fix a jitter in case the player is continuously getting pushed by a wall (e.g., on the boat in level 5). Basically, this moves the relevant assignments from track.cpp:MovePlayer and MovePoints to player.cpp:DoPlayerMove. Unless a call to one of these functions has been missed, pushwall and clipmove can be called from player.cpp in the following instances, which should be covered: - Via DoPlayerMove, which is the function getting the fix now. - Via DoPlayerSlide, which is called in the beginning of DoPlayerMove. - Via DoPlayerCurrent when called from DoPlayerCrawl/DoPlayerWade, followed by DoPlayerMove. - Via DoPlayerCurrent when called from DoPlayerDive, followed by DoPlayerMove if the player doesn't stop diving.
Typo fix in mmulti.cpp:netinit warning message related to IPV6
sw/src/copysect.cpp: Temporarily disable interpolation of sector object
if any of its sectors is impacted by CopySectorWalls. Fixes a possible flicker with the drill at the end of level 2.
While not exactly a favorite of mine, this fixes the floorz updates
of the secret rotating pillar in level 1 with SO interpolation. The drill in level 2 is also covered. So far, SetVatorActive seems to be the only place where interpolation of ceiling/floorz may be set, outside of the SO interpolation code.
Call FunctionKeys from getinput only if the latter is called
from faketimerhandler. This should fix the timing of playing an RTS file's sound and sending the corresponding message.
Fix aiming in coop view
sw/src/network.cpp: Fix waitforeverybody in Master/Slave
modes. This uses SVN r1135 and r1143 as a reference.
sw/src/network.cpp: Fix sending of messages in Master/Slave.
Thanks Dynamo for spotting the bug.
Migrate the player's RevolveAng field to Q16.16 format.
This fixes truncations of q16ang in MovePlayer. One known fixed issue is a minor micro-shaking effect, reproduced while standing on a non-moving SO (e.g., the bus in level 1). The latter is also related to the use of camq16ang. Based in idea on patch from mjr4077au.
Use pragma pack in sw/src/network.h instead of the locally defined
PACKED macro. This is more consistent with the current Duke3D codebase, and further fixes build with older versions of MinGW GCC, in which attribute packed is broken without specifying -mno-ms-bitfields.
Fix usage of possibly wrong address in sw/src/player.cpp:DoPlayerHorizon
Interpolation fixes for SW:
draw.cpp: Fix the lack of interpolation while walking on a sector object, like the bus roof or the floor of the train in Seppuku Station. track.cpp: Make sure the player's location and angle aren't mistakenly interpolated while standing on a moving sector object as a consequence.
Revert SVN commit 8677; It wasn't sufficient in case
one of the players toggled mouse aiming in the middle of a game, and it worked even worse in Master/Slave mode. Additionally, tying input to frame rate made the problem disappear.
We can revert the change of siang to q16 now
Revert commented out horiz->q16horiz renames in DSPRINTF strings
Fix typo in DoPlayerTeleportToSprite, following the migration to q16 angles
Fix multiplayer desync after the change to q16 angle and horiz.
Note that this includes non-portable unaligned accesses, but this already applies to surrounding code. Just add comments for now.
Revert the changes from JFSW commit 7d0deafe81b0ffa30d77cfe242e454f8b4487a1f
related to the definitions of RANDOM_NEG in bunny.cpp, ripper.cpp and ripper2.cpp. Do so in a way that isn't re-introducing compiler warnings. This partially fixes compatibility with demos made for SW 1.2. Additionally, replace the 3 separate definitions of RANDOM_NEG with a common one within game.h.
Fix a few memory access errors related to demo support
Add a workaround for possible rounding errors in calculations of
sintable and radarang. sintable[512] was different in a 32-bit build.
Revert the change of call to FAF_DrawRooms into a conditional one,
as done in r8766, since this breaks status bar output in tiled overhead map with Polymost. Do add comment about this for now.
Expand Nuke.YKT's patch from SVN r7414 to cover all 32-bit platforms.
Fixes non-deterministic white rectangles rendering bug in PCExhumed.
sw/src/draw.cpp: Don't draw rooms if textured overhead map is drawn
later. This also turns out to fix a Polymost-specific bug revealed in SVN r8711. Further remove a call to PicInView which does nothing.
Modify MenuLevel and RunLevel by using CON_Quit,
toggling MultiPlayQuitFlag on instead of QuitFlag in multiplayer games if a player tries to close the window. Further update MNU_QuitCustom to use CON_Quit. - In RunLevel, this fixes quit of game for all players. - In MenuLevel, this leads to transmit of PACKET_TYPE_MENU_LEVEL_QUIT. However, the work isn't complete, since the game isn't shut down on the peers' sides, leading to possibly undesired side-effects. Currently known issue: - If the master closes the window, the scores won't be shown for the master. Reason is that waitforeverybody will terminate the app.
sw/src/game.cpp:StatScreen crash bug fix: For a given player p,
use p->TeamColor instead of User[p->PlayerSprite]->spal, since it's possible the player left before the map was loaded.
Fix a bug in getpackets, making SW's Master-Slave code usable,
including 3+ players sessions.
sw/src/game.cpp: Fix crash following an abort of InitGame while
processing multiplayer params or waiting for players. It's been decided that Control won't call TerminateGame in this case, one implication being that voidsw.cfg is not updated.
startgtk (Duke3D, SW, Build Editor): Use nullptr instead
of NULL for ending arguments list in gtk function calls. Fixes "missing sentinel in function call" warning with a specific GCC version.
mmulti.cpp: Fix __USE_GNU redefinition warning
sw/src/network.cpp:getpackets: Fix trimming of message in
packet of type PACKET_TYPE_MESSAGE. This reverts a tiny portion of JFShadowWarrior commit 6b01a4703d55ae3e131d8c11903ff2dcd78c15d8.
build/src/sdlayer.cpp: Fix crash following
video mode change in USE_OPENGL=0 build.
Fix USE_OPENGL=0 build
kenbuild/src/game.cpp: Import mirror fix for SW from SVN r8588.
build/src/mmulti.cpp: Fix Windows build
Fix the wrong aspect ratios of map grids for Ken-Build and SW,
as well as the wrong aspect ratio in 3D for Ken-Build.
Fix OPL music playback with snd_numchannels == 1
Fix read of uninitialized EMIDI_IncludeTrack value in _MIDI_ResetTracks