Christoph Oelckers
dc8b72b2ce
Merge branch 'master' into newrenderer2
...
# Conflicts:
# source/games/duke/src/actors.cpp
# source/games/duke/src/hudweapon_d.cpp
# source/games/duke/src/hudweapon_r.cpp
# source/games/duke/src/render.cpp
2021-04-15 19:34:03 +02:00
Christoph Oelckers
96d78ab9e6
- made DukeActor::s a pointer.
...
As a reference we would never be able to export this to scripting
2021-04-15 19:21:43 +02:00
Mitchell Richters
2176435831
- Duke: Replace sprite z pos numeric values with correct enum values for each game.
2021-04-15 18:02:16 +10:00
Mitchell Richters
6cebd7fca2
Merge branch 'master' into newrenderer2
2021-04-15 18:01:26 +10:00
Mitchell Richters
aeb16e390c
- Duke: Add resurrected
flag to handle resurrection via cheating or when pissing in RR.
2021-04-15 18:00:58 +10:00
Mitchell Richters
f254eeb465
- binaryangle.h: Remove lookangle
class and replace use with binangle
.
...
* Added in fca846272e
to deal with signed adjustments but its just not needed.
* Made better use of `binangle`/`fixedhoriz` class getters and setters than before as well.
2021-04-11 15:45:53 +10:00
Mitchell Richters
ba57429ac6
- Blood, Duke & SW: Create new backend chasecam function and replace game-specific versions with it.
...
* Based off SW's implementation.
2021-02-18 21:47:37 +11:00
Mitchell Richters
2abda0e27d
- All Games: Migrate each game's clock counter to backend solution.
2021-02-18 21:47:33 +11:00
Christoph Oelckers
40593b866f
- WW2GI: fixed event numbering.
...
There is a typo in the CON files that assigns EVENT_AIMUP and EVENT_AIMDOWN the same number. The source did not replicate this which caused several events to call the wrong handler.
Fixes #252
2021-01-30 23:42:44 +01:00
Mitchell Richters
b36bea7c69
- Replace scale()
calls with Scale()
from common.
2021-01-05 07:31:34 +11:00
Mitchell Richters
868aa7f07a
- Replace mulscale()
calls with MulScale()
from common.
2021-01-05 07:31:24 +11:00
Mitchell Richters
aae175f287
- Replace divscale##()
calls with MulScale()
from common.
...
* Regex for reference: divscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:20 +11:00
Mitchell Richters
2396179dfc
- Replace mulscale##()
calls with MulScale()
from common.
...
* Regex for reference: mulscale([0-9]+)\((.+)(\)+)
2021-01-05 07:31:15 +11:00
Mitchell Richters
edba971b7f
- Duke: Remove newOwner check from cef1f8275b
& cb93560a4a
that were just cancelling out each other, and clean up 2x if (p->newOwner != nullptr)
checks into one.
2021-01-03 18:51:43 +11:00
Mitchell Richters
9833c94114
- Duke: Pass the player_struct through to FinalizeInput() in line with other functions.
2021-01-02 11:04:03 +11:00
Mitchell Richters
6d12159006
- Duke/SW: Consolidate each game's slopetilting function into backend solution.
...
* Based on SW's implementation purely for its commentary, but includes a fix from Duke's.
* Allow disabling Duke's slopetilting via `cl_slopetilting` like SW.
2021-01-02 00:30:11 +11:00
Christoph Oelckers
553bb2af19
- moved 'frags' into player_struct.
...
Again for reducing the work with the script interface.
2020-11-29 14:10:03 +01:00
Christoph Oelckers
7ad0750839
- grouped all of Duke's constant per-session state in a single struct.
...
Mainly done so later the script export can be done more easily.
This also renames a few of the affected variables for clarity.
2020-11-29 13:54:58 +01:00
Christoph Oelckers
48b16d5233
- cleanup on player CVAR use.
2020-11-29 13:22:04 +01:00
Mitchell Richters
50b4d8cc99
- buildutils: Replace sintable[]
use within Duke's player.cpp with bsin()
/bcos()
.
2020-11-22 21:18:04 +01:00
Christoph Oelckers
d8e331ef0f
- changed Duke/RR palette handling to only retrieve the currently active palette right before rendering.
...
Storing this in the player_struct is pointless and a relic from having to use real hardware palette switches.
With this now just being a translation index being passed to the backend it can be cheaply retrieved right when used and nowhere else.
Also making some changes to how RRRA's psychedelic cactus handles the projection. This fixes issues with occasionally passing a bad matrix.
2020-11-05 07:31:48 +01:00
Christoph Oelckers
0eb10f0313
- newowner and related code.
2020-11-04 20:40:25 +01:00
Christoph Oelckers
d773601d81
- player.i, part 3
2020-11-04 20:39:43 +01:00
Christoph Oelckers
17737eea85
- wrapped hitscan in a variant returning an actor.
2020-11-03 20:43:38 +01:00
Christoph Oelckers
768487584e
- aim and all calling instances.
...
This also takes care of RR's chicken arrow storing an actor reference in lotag.
2020-11-03 20:42:03 +01:00
Christoph Oelckers
8268c1b538
- shootfireball, shootflamethrowerflame, shootknee
2020-11-03 20:21:53 +01:00
Christoph Oelckers
3fdeedcae7
- player.cpp is free of array references, except one that's unavoidable for now.
2020-11-03 19:25:07 +01:00
Christoph Oelckers
79f850d126
- PlayerColorChanged, hits, hitasprite.
2020-11-03 19:21:44 +01:00
Christoph Oelckers
61013af910
- fixed three crashes found when testing WW2GI.
2020-11-03 19:21:43 +01:00
Christoph Oelckers
a514910aa4
- use an actor pointer in Get/SetGameVarID's parameters to weed out the ordering screwups.
2020-11-03 19:21:43 +01:00
Christoph Oelckers
de92287d0b
- fixed the messed up parameter order of OnEvent.
...
This should serve as a textbook example why passing around indices is a very, very bad idea!
2020-11-03 19:21:42 +01:00
Christoph Oelckers
3ea6887c43
- replaced a bit more.
2020-11-03 19:21:42 +01:00
Christoph Oelckers
33f730baf3
- replaced "sprite[p->i]" globally.
2020-11-03 19:21:42 +01:00
Christoph Oelckers
861342a278
- guts_d and guts_r.
2020-11-01 11:32:34 +01:00
Christoph Oelckers
9cdaaff42b
- migrated EGS and deletesprite to new actor interface.
...
Inline wrappers for old code exist.
The backupplayer inline was moved into player.cpp because that's the only place it gets used.
2020-10-21 19:14:41 +02:00
Christoph Oelckers
e94274a543
- holoduke_on is now a pointer as well.
2020-10-21 16:31:18 +02:00
Christoph Oelckers
7c88de0b42
- made player.actorsqu a pointer and added the needed infrastructure for that.
2020-10-21 16:31:17 +02:00
Christoph Oelckers
99e3eeb19e
- split up shoot_r as well and consolidated both blood splat functions.
2020-10-21 01:03:38 +02:00
Christoph Oelckers
3d36381752
- converted all stat iterators outside sector*.cpp.
2020-10-15 01:34:28 +02:00
Christoph Oelckers
758fab1804
- replaced several sector iterators in Duke code.
2020-10-15 01:34:27 +02:00
Mitchell Richters
c08851e4c0
- Blood/Duke/RR/SW: Drop resetinputhelpers()
.
2020-10-12 14:42:43 +11:00
Mitchell Richters
9bcdeae6cd
- InputPacket: Change q16avel
to avel
, changing type from fixed_t to float.
2020-10-08 14:47:30 +11:00
Mitchell Richters
fca846272e
- gamecontrol: Initial setup of PlayerAngle
struct and deployment within Duke.
...
* Struct made up of binangle class units.
* Create signed clone of binangle for use with look_ang and rotscrnang.
* Append currently outgoing function names with `2` at the end to avoid conflict.
2020-10-07 23:13:29 +11:00
Mitchell Richters
f39939d114
- gamecontrol: Initial setup of PlayerHorizon
struct and deployment within Duke.
...
* Started with the most complicated game first.
* Struct made up of fixedhoriz class units.
* Append currently outgoing function names with `2` at the end to avoid conflict.
2020-10-07 17:12:48 +11:00
Mitchell Richters
09a05f354c
- Re-standardise horizon around 0 and not 100.
...
* Blood had this right. It makes sense that the horizon be based around as it's easier to work with.
* Removed all associated game math to deduct default horizon of 100 when doing weapon zvel etc, meaning actual horizon can just be used.
* Re-did return to center function to work on the already converted pitch. Return speed should be 1:1 with previous code.
2020-10-07 13:28:45 +11:00
Mitchell Richters
16cee1148b
- Duke: Change a few ps[] to use the p alias available following changes in f4fff5ee30
.
2020-09-25 00:09:31 +10:00
Christoph Oelckers
f4fff5ee30
- moved sync structure into the playerstruct for easier maintenance.
2020-09-23 18:18:23 +02:00
Mitchell Richters
64113f8f9c
- Blood/Duke/SW: Smooth out player's zpos adjustment while in 3rd person view.
2020-09-23 23:12:59 +10:00
Mitchell Richters
f806cdcec6
- Blood/Duke/RR/SW: Unify the player's angle/horizon helper functions.
2020-09-21 17:12:51 +10:00
Mitchell Richters
7bf1cacc7f
- Blood/Duke/RR/SW: Unify the player's angle function.
...
* For Blood/SW, exposes `SB_LOOK_LEFT`/`SB_LOOK_RIGHT` to games, hooking up `q16look_ang` and `q16rotscrnang` within.
* For SW, use Duke & Blood's return to center function and remove `PF_TURN_180` bit.
* For RR, replace a few misused bits with some bools inside of `player_struct`.
* Since bulk of functionality is sourced from Duke (30Hz), apply proper scaling so SW speed matches (40Hz).
2020-09-21 17:12:26 +10:00