Commit graph

11866 commits

Author SHA1 Message Date
Christoph Oelckers
d40e53eb53 - more Exhumed pitch change fixes. 2020-08-31 21:48:17 +02:00
Christoph Oelckers
6b1fa22aed - fixed view centering in Exhumed.
Switched to GDX's code because the one present here looked quite weird.
This still does not feature interpolation.
Fixes #296
2020-08-31 21:41:39 +02:00
Christoph Oelckers
8905c5ee26 - fixed Exhumed inventory menu strings.
Fixes #295
2020-08-31 20:59:29 +02:00
Christoph Oelckers
3204a3e5fc - negated the meaning of SB_AIMMODE.
This is because 'classic' aim mode will reset the view if the mouseaim key is not pressed.
The problem with this is that an empty input packet will trigger a view reset. If the meaning is inverted the default aim mode is free mouse view which doesn't try to alter any view state and is therefore preferable for an empty packet.

Fixes #292
2020-08-31 20:51:22 +02:00
Christoph Oelckers
ac5abd8aac - removed ready2send variable.
It's a leftover from the old netcode.
2020-08-31 20:25:08 +02:00
Christoph Oelckers
678b8223a9 - fixed some errors in the keybind definitions.
Fixes #291
2020-08-31 20:19:41 +02:00
Christoph Oelckers
fcdf2d7bd7 - "Smooth mouse movement" referenced the wrong CVAR.
Fixes #290
2020-08-31 20:05:17 +02:00
Christoph Oelckers
827c406437 - don't play activation sound when not having a Holoduke powerup. 2020-08-31 20:04:20 +02:00
Christoph Oelckers
f0ca87dc82 - fixed mixed up Holoduke messages.
Fixes #289
2020-08-31 20:01:55 +02:00
Christoph Oelckers
923833ccec - animated menus without frame rate cap
The frame rate cap is only deactivated if there's actual animations running so that leaving the game in the menu won't make the engine run at high frame rates.
Fixes #288.
2020-08-31 19:56:13 +02:00
Christoph Oelckers
54d65bfcfc - fixed some warnings 2020-08-31 19:28:05 +02:00
Christoph Oelckers
e5d963c515 - refactored third person view to only access the clock in its worker function
Timer values in interface code are undefined, these should not access anything that changes at real time.
Also use smoothratio to do the calculation in frame time, not tic time.
2020-08-31 19:27:22 +02:00
Christoph Oelckers
a8bb6ba515 - base the turbo turn timer on the actual level tic rate
This has a threshold that could lead to different behavior, depending on whether synchronized or unsynchronized input is used, it also used an undefined state of gameclock for its calculations.

By basing this on the levelclock consistency is ensured.
2020-08-31 19:23:05 +02:00
Christoph Oelckers
71c3441b1e - transitioned cloudclock.
This timer runs at 60 Hz in the render code, so it needs to take smoothratio into account.
2020-08-31 19:22:21 +02:00
Christoph Oelckers
9a208185d6 - levelclock increment after tick.
This ensures that the first tick always gets a value of 0.
2020-08-31 19:21:02 +02:00
Christoph Oelckers
bf4f538c61 - a few more places where gameclock could be substituted.
Nothing here needs higher precision.
2020-08-31 19:20:04 +02:00
Christoph Oelckers
2bf368d49b - redid the timer for the automap zoom
Add more precision and uncouple from the game timer
2020-08-31 19:18:53 +02:00
Christoph Oelckers
45a22eb3cd - do proper interpolation of the snorkel in RR. 2020-08-31 19:06:53 +02:00
Christoph Oelckers
03aad6559b - added a global leveltimer variable to Duke.
This timer only gets incremented by the main game ticker when the playsim is running.

This timer gets used for all playsim-related timing and animations so that these are decoupled from imprecisions in the global timer.
2020-08-31 00:33:41 +02:00
Christoph Oelckers
34104a74d8 reduce dependency of code on global gameclock variable
passing it as parameter to operateweapon*
2020-08-31 00:17:40 +02:00
Christoph Oelckers
007c6e122d - gameclock abstraction
This may need more work to have a reliable timer
2020-08-31 00:16:43 +02:00
Christoph Oelckers
7684f9e3e6 - fixed duplicate symbol error on macOS 2020-08-31 00:15:48 +02:00
Christoph Oelckers
2f05a93547 Merge branch 'Packet' into back_to_basics2
# Conflicts:
#	source/core/gamestruct.h
#	source/games/duke/src/gameloop.cpp
#	source/games/duke/src/player_d.cpp
2020-08-31 00:09:56 +02:00
Christoph Oelckers
b8258da997 - cleaning out some trash from compat.h.
The header from hell...
2020-08-30 23:34:40 +02:00
Christoph Oelckers
00d35bc42c - fixed the number pulsing on Duke's and RR's HUD. 2020-08-30 22:52:50 +02:00
Christoph Oelckers
98557947da - gameclock must also be set before calling gi->Render.
This runs at the display's frame rate so the timer value from the Ticker call is not precise enough to do all the work.
2020-08-30 22:52:20 +02:00
Christoph Oelckers
ba8dc788fe - hotfixing some Exhumed map transition issues.
This avoids crashing on LEV20, but the whole thing is simply too poorly implemented to actually work - this needs to be redone so that the map transition does not occur in the middle of the game ticker.
2020-08-30 21:45:21 +02:00
Mitchell Richters
5daaa1fc06 - fix issues with cl_syncinput 0. 2020-08-31 05:24:29 +10:00
Christoph Oelckers
511cb51e7f - these 2 variables no longer exist. 2020-08-30 21:20:05 +02:00
Christoph Oelckers
26f6bac060 - Exhumed: save the status variables to savegames again.
Since this status bar depends on explicit updates, this data needs to be restored after loading, and just saving it out is the easiest way to ensure that.
Fixes #274
Fixes #276
2020-08-30 21:16:37 +02:00
Christoph Oelckers
a9bf1ab4bc - Exhumed: Renamed changelevel CCMD to Levelwarp for consistency.
Fixes #278
2020-08-30 21:07:00 +02:00
Christoph Oelckers
5136e7dc2d - SW: Moved the key display on the fullscreen HUD above the ammo display.
Space is a bit too tight when activating the clip display otherwise, especially on 4:3 screens.
2020-08-30 21:01:29 +02:00
Christoph Oelckers
30c15c11f2 - added the missing slash for the ammo display for Shadow Warrior's BigFont.
The also added percent and backslash were just waste products of its creation.
2020-08-30 20:50:54 +02:00
Christoph Oelckers
7af36ab6f9 - added a menu option for cl_showmagamt. 2020-08-30 20:36:49 +02:00
Mitchell Richters
d0e390c554 - Blood: Don't treat akimbo shotguns as a reloading weapon. It doesn't go through the reload sequence like when the player doesn't have the power-up. 2020-08-30 20:24:39 +02:00
Mitchell Richters
c0374cf890 - SW: Move static function DoReloadStatus() into the class as private function 2020-08-30 20:24:38 +02:00
Mitchell Richters
26ffc82cc0 - SW: Remove duplicated code from dd832aaea3f688b375c74643606f299c76d92f3b. 2020-08-30 20:24:38 +02:00
Mitchell Richters
c555540e24 - Blood: Implement cl_showmagamt for the game's shotgun.
* Tile set for `kSBarNumberAmmo` does not include a slash. Hack put in place to get me a slash from a specific tile of a different font. It "works" and I don't think it looks too bad.
2020-08-30 20:24:38 +02:00
Mitchell Richters
1617938d4f - Duke: When using cl_showmagamt 1, increase pistol maximum by 4 so that when you have full ammunition, you have a full clip.
* On the fence about this. Lower makes the game harder, and higher could mean the difference between life and death. I do think that if we're showing amounts in the magazine, full ammo should constitute a full magazine. I think the max of 200 is an oversight from the original devs as all other games have proper defaults that reflect the magazine or cylinder capacity.
2020-08-30 20:24:38 +02:00
Mitchell Richters
10962e2193 - SW: Implement cl_showmagamt for the game's shotgun and uzi.
* SW does not have any special characters in its BigFont, so currently there's no divider between ammunition amounts. This is to be discussed on the PR.
2020-08-30 20:24:37 +02:00
Mitchell Richters
eb3a21e677 - Duke: Implement cl_showmagamt for the RR's pistol and shotgun. 2020-08-30 20:24:37 +02:00
Mitchell Richters
161647ed5b - Duke: Implement cl_showmagamt for the game's pistol. 2020-08-30 20:24:37 +02:00
Mitchell Richters
6f653da0fc - DBaseStatusBar: Create function DBaseStatusBar::CalcMagazineAmount() for use with calculating magazine values when drawing the HUD. 2020-08-30 20:24:37 +02:00
Mitchell Richters
aeb807bea1 - gamecvars.cpp: Create CVAR cl_showmagamt. 2020-08-30 20:24:37 +02:00
Mitchell Richters
e32cd81cc7 - Unify stat fps for all games. 2020-08-30 20:24:36 +02:00
Christoph Oelckers
59a964bb83 - same for SW 2020-08-30 20:24:36 +02:00
Christoph Oelckers
747dac6c41 - Exhumed: Mark unused function arguments in standard C++ fashion. 2020-08-30 20:24:36 +02:00
Christoph Oelckers
84e54e4fdb - deleted several unused local variables
None of the initializers here is modifying gamestate, this looks like overcautious preservation for demo compatibility.
2020-08-30 20:24:23 +02:00
Christoph Oelckers
3a7b23f655 remove unused stuff 2020-08-30 20:23:48 +02:00
Christoph Oelckers
765f211e05 - things are mostly working again.
Rendering produces an image again, input gets properly processed, but unsynchronised mouse input isn't properly applied yet.
2020-08-30 19:59:46 +02:00