Commit graph

548 commits

Author SHA1 Message Date
Christoph Oelckers
240b24d771 - exported all females. 2023-04-02 17:34:37 +02:00
Christoph Oelckers
52ea497b50 - fixed lotsofstuff VM export. 2023-04-02 13:19:35 +02:00
Christoph Oelckers
30d066cee9 - added script exports for Duke's bosses.
This allows removing a few hack checks.
2023-04-02 13:13:45 +02:00
Christoph Oelckers
7f240a0a7a - converted all remaining classes used by PicForName.
This means all functions using this can now pass class pointers directly to the native code.
2023-04-02 13:13:45 +02:00
Christoph Oelckers
c9888ae6cb - exported several RR enemies/animals needed for the UFO spawner. 2023-04-02 13:13:06 +02:00
Christoph Oelckers
9b96f8312a - pig cop converted 2023-04-02 13:13:06 +02:00
Christoph Oelckers
bc50f596e8 - exported two more classes used by PicForName. 2023-04-02 13:10:34 +02:00
Christoph Oelckers
7b4d5eb26d - scriptified SHRINKEREXPLOSION and WATERBUBBLE. 2023-04-02 13:10:26 +02:00
Christoph Oelckers
673ea69d35 - scriptified a few more skeleton items needed by PicforName. 2023-04-02 13:00:13 +02:00
Christoph Oelckers
ccc048136f - exported TOILETWATER, BURNING and EXPLOSION2.
All types needed for cleaning up PicForName
2023-04-02 13:00:13 +02:00
Christoph Oelckers
e0bd038391 - scriptified the native parts of TRANSPORTERSTAR and TRANSPORTERBEAM 2023-04-02 13:00:13 +02:00
Mitchell Richters
03eb105df1 - Duke: Move RRRA vehicle tilting out of the input code and into the playsim. 2023-04-02 18:24:05 +10:00
Christoph Oelckers
bae18b3023 - removed debug output 2023-04-02 09:14:15 +02:00
Mitchell Richters
42d791e7c2 - Exhumed: Fix clip calculation setup.
* Since game maintains its own clip capacities, we need to use them instead of the generic handler for the games that do not.
* Clean up the game-side code in `CheckClip()` to use `min()`.
* Repair issue with pistol clip calculation that was using modulo when it shouldn't. A full weapon with 300 will divide into 6 with no remainder, therefore nothing in the clip.
* Fixes #906.
2023-03-27 22:05:35 +11:00
Christoph Oelckers
77bcea409b - Duke: fixed potential logic deadlocks with the green slimer.
It depended on the devoured actor not disappearing from the map prematurely to work as intended, so a new check had to be added to get out of the deadlock.
2023-03-25 14:33:10 +01:00
Mitchell Richters
79f7ca976b - Exhumed: Refactor the pitch tilting/panning code.
* Made it work on the player's view pitch and not their actual pitch.
* Drastically simplifies implementation and allows its use even with mouse aiming.
2023-03-25 16:52:13 +11:00
Mitchell Richters
e5f3f5f149 - Make setForcedSyncInput() require a player index.
* This should only ever apply to the console player.
2023-03-23 17:09:02 +11:00
Mitchell Richters
81650036e6 - Duke/RR: Remove vehForward/Reverse variables from player struct.
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* The original game misused network bits here, however I don't see why the player's angle can't just be tested for signedness. Again, something I didn't see way back when...
2023-03-19 20:55:39 +11:00
Mitchell Richters
37e9cfed45 - Duke/RR: Remove vehBraking variable from player struct.
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* We must continue the misuse of network bits like the original game did to make sure the RRRA vehicles are network aware.
2023-03-19 20:54:43 +11:00
Mitchell Richters
31f8de3854 - Duke/RR: Remove vehTurn variables from player struct.
* Back in 2020, I was trying to tidy stuff up and had no idea about network awareness, etc.
* The original game misused network bits here, however I don't see why the player's angle can't just be tested for signedness. Something I didn't see way back when...
2023-03-19 20:54:19 +11:00
Mitchell Richters
df5e8b1d04 - Duke: Fix missing greenslime base sprite when randomly changing animation. 2023-03-19 11:30:01 +11:00
Mitchell Richters
4355a44721 - Duke: Rework input blocking setup.
* Takes the duplicated conditions out of the input handler and makes the ticker responsible by forcing synchronised input.
2023-03-18 19:29:29 +11:00
Mitchell Richters
d6b68dec5e - Duke: Remove player_struct::resurrected flag I added in 2021 and fix issue properly.
* The check for `player_struct::dead_flag` in `FinalizeInput()` was overzealous and is not checked in the original code in this instance.
2023-03-17 12:29:37 +11:00
Mitchell Richters
cb1e4e7a34 - Exhumed: Ensure Player::items[] is signed.
* Change originates from b71c725e3e.
* Matches PCExhumed and GDX.
* Logic in game requires this variable to be signed.
* Fixes #415.
* Fixes #888.
2023-03-16 13:05:22 +11:00
Mitchell Richters
30f9ec5fd8 - Blood: Fix shotgun ammo display when player fires a shell, switches weapons, then switches back.
* Such a circumstance reloads the weapon off screen.
* While the "right" fix would be to stop that, some fanatics will probably be relying on such a mechanism.
* As such, just fudge the printout on the screen instead 🙃.
* Fixes #877.
2023-03-15 21:30:44 +11:00
Mitchell Richters
a4bca328bc - SW: Remove Player::siang since we have the same data in 2023-03-15 19:57:45 +11:00
Christoph Oelckers
6c77d1c39e - Duke: fixed setup of purely scripted enemies,
Some band-aid is still needed for the time being.
2023-02-09 17:34:59 +01:00
Christoph Oelckers
ede52f2dde - Duke: make the geisha statues shootable again.
This got lost in the awful spaghetti code somehow.
2023-02-05 13:37:04 +01:00
Christoph Oelckers
4328016963 - move the remaining parts of spawninitdefault to DukeActor::Initialize.
This ensures proper execution of all code - spawninitdefault was designed to be the fallback for actors without a special case in spawninit.
2023-01-28 16:33:35 +01:00
Christoph Oelckers
38b278b12d - fixed enemy setup.
All enemies now run a native init function to reduce script-induced problems.

this required adding a NOGRAVITY flag so that the recon can use the same code as well which was the only enemy relying on custom code.
2023-01-28 16:33:15 +01:00
Christoph Oelckers
0db441accb - scriptified the native parts of the powder keg.
This was the last remaining actor with its own native ticking part.
2023-01-28 16:31:46 +01:00
Christoph Oelckers
9f01c87ccb - scriptified the native part of FireflyFlyingEffect. 2023-01-28 16:31:45 +01:00
Christoph Oelckers
9783b8c402 - scriptified World Tour's flamethrowerflame.
The first of 3 mixed native/CON items which are the last things remaining in the main thinker loops.
2023-01-28 16:31:45 +01:00
Christoph Oelckers
13c9e9916b - Duke: fixed the cactus.
Statnums were wrong here.
2023-01-21 15:48:55 +01:00
Christoph Oelckers
2c5062255c - fixed bad sound check in the sound controller. 2023-01-15 09:51:21 +01:00
Christoph Oelckers
6c3d03cd48 - fixed incorrect sector in a few sprites of World Tour E5L1. 2023-01-14 13:18:53 +01:00
Christoph Oelckers
5e7f90562c - added adaptive layout for RR's summary screen as well.
To better handle the spacing for accented characters the text scale was slightly reduced.
2023-01-14 10:37:07 +01:00
Christoph Oelckers
d067b23917 - make layout of Duke's summary screen adapt to text and screen size. 2023-01-14 10:00:37 +01:00
Christoph Oelckers
b991af2dbc - fixed incomplete statnum setup. 2023-01-09 23:39:20 +01:00
Christoph Oelckers
532f994ccb - RR: stop the bowling pins' tumbling animation when they come to a rest.
Fixes an original RR bug.
2023-01-08 18:46:42 +01:00
Christoph Oelckers
deaec2d91d - disabled property-type definition of spritetype members.
As it turned out this is simply too dangerous - these should be left to be loaded from the map data or set manually.
All remaining setups using this feature have either been moved to Initialize or other meta properties that are not affected by map loading.
2023-01-08 16:45:09 +01:00
Christoph Oelckers
b48dad46f3 - do not use properties to set the sprite fields, part 4.
Bowling stuff also needed fixing.
2023-01-08 15:46:53 +01:00
Christoph Oelckers
223481fd23 - do not use properties to set the sprite fields, part 3.
mainly RR's chickenplant items.
2023-01-08 15:46:24 +01:00
Christoph Oelckers
8b664c840d - do not use properties to set the sprite fields, part 2.
This covers the remaining simple cases.
2023-01-08 15:46:24 +01:00
Christoph Oelckers
3a00480efd - do not use properties to set the sprite fields, part 1.
As soon as default init for CON gets in this won't work right anymore - these must come last, not first.
This commit contains all the trivial cases with no inheritance concerns.
2023-01-08 15:46:23 +01:00
Christoph Oelckers
278cfe9216 - RR: use a meta property for the gambling machine's sound.
This is mainly for the hypothetical map that tries to use this thing from within CON.
2023-01-08 15:45:22 +01:00
Mitchell Richters
b432e94a72 - Duke: Back up the shell's position in DukeShell::initshell(). 2023-01-08 23:54:17 +11:00
Christoph Oelckers
b980789ddf - skip switch animation checks for custom switch actors. 2022-12-29 14:01:39 +01:00
Christoph Oelckers
2386ea9930 - implemented the 3 special switches
That's the developer commentary icon in World Tour, the deactivation switch for the chicken processing plant in RR and one shootable alarm bell in RRRA.
2022-12-29 13:32:30 +01:00
Christoph Oelckers
0d9fe83cba - implemented the switch parser and set up the external definitions. 2022-12-29 13:32:29 +01:00
Christoph Oelckers
a9ea2cd5c0 - moved GetReservedScreenSpace function into the scripted status bar where it belongs.
Since this is supposed to return the height of the status bar, keeping it native is a bit pointless as it cannot be modified that way.
2022-12-18 14:47:38 +01:00
Christoph Oelckers
32ad16f84d - SW's first texture flag, yay!
Removes two floorpicnum accesses
2022-12-18 14:04:33 +01:00
Christoph Oelckers
622710ede4 - migrated all uses of floorpicnum.
This necessitated a few more surface type definitions.
2022-12-18 14:02:56 +01:00
Christoph Oelckers
4a306a21dc - split several texture flags off into a surface type value.
Using the same field in the TexExtInfo struct as Blood's surfType.
This frees up a lot of flags for later use.
2022-12-18 13:56:54 +01:00
Christoph Oelckers
0ffeb2378a - generalize Duke's purple lava check. 2022-12-18 13:43:26 +01:00
Christoph Oelckers
5147826eeb - consolidated precaching code and rewrote the core to work on texture IDs. 2022-12-18 13:37:54 +01:00
Christoph Oelckers
9a1a90a730 - Duke: fixed mortars not toggling their hittable state depending on player distance.
This is needed to make them shootable from a distance. Somehow these two lines of code had gotten lost during scriptification.
2022-12-18 09:14:11 +01:00
Christoph Oelckers
f893f12ed7 - fix a few misnamed class types. 2022-12-13 20:03:36 +01:00
Christoph Oelckers
71425a94af - fixed pipe bombs sticking to ceilings.
This was a typical case of doing too many things in one function - the bogus code was for one of RR's special projectiles piggybacking on the same function and doing it wrong.
2022-12-13 18:21:33 +01:00
Christoph Oelckers
14141766c1 - fixed a few cases of incorrect uses of 'mapSpawned'. 2022-12-13 14:06:11 +01:00
Christoph Oelckers
4f14f795b8 - fixed the Blood pool's Initialize function.
In the unlikely case of this being map placed it might have gotten the wrong color.
2022-12-13 11:30:22 +01:00
Christoph Oelckers
37067753fc - use mapspawned flag in all already scriptified code.
This is more to clarify intent than to fix things, none of the changes here should change behavior.
2022-12-13 11:29:37 +01:00
Christoph Oelckers
13e6718153 - added mapSpawned member to DDukeActor
Duke uses the owner a lot to check if an actor was spawned at map start or in-game, but that depends a lot on stale pointers being maintained, which our garbage collected system does not allow. So this field now serves as a more reliable stand-in for these cases.
No actual changes yet.
2022-12-13 10:36:45 +01:00
Mitchell Richters
5d3710d677 - Duke: Always use tsprite pos/angle when used in conjunction with viewvec or viewang.
* This solves the issue of jittery picnum changes when circle-strafing actors at high speeds.
2022-12-11 19:45:38 +01:00
Christoph Oelckers
281b102fac - gave all textures that were accessed with their "#0xxxx" name a descriptive names.
Only the fallback fonts were intentionally excluded because these are supposed to get the ART file content.
2022-12-11 19:45:18 +01:00
Christoph Oelckers
a63ee8079a - implemented customizable breakable walls and ported all hard coded variants to use this. 2022-12-11 19:43:57 +01:00
Christoph Oelckers
9e3318a2fb - moved spawnclasses and breakwall definitions from .def to RMAPINFO.
.def is not the right place for this - it needs to run very early in the process, before scripted actors are loaded, so doing this stuff there means that half the initialization has to be postponed and error reporting is sub-par.
These are now part of RMAPINFO which gets parsed as one of the very last things - it is also where GZDoom is doing some of these things.

The better error reporting also allowed fixing some errors in these definitions.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
c1a09196f0 - implemented breakable walls with external definitions.
The scripted case does not work yet due to bad loading order of files.
2022-12-11 19:43:57 +01:00
Christoph Oelckers
4078c6d6bd - converted several of RR's static init sprite types to the class system. 2022-12-11 19:43:55 +01:00
Christoph Oelckers
6fb263d61b - converted the two last non-CON-based active items - RRRA's empty bike and boat. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
9641d3f712 - scriptified two of RRRA's special effects. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
6de147b77f - moved the CON execute call to DDukeActor::Tick and removed a large portion of the special handling for scriptified actors. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
1cfba8e989 - cleaned up the main thinker loops, using a flag to denote actors that are not on STAT_ACTOR but need to run CON code.
This should not be automatic as it may cause problems with mods not expecting this.
2022-12-11 19:43:54 +01:00
Christoph Oelckers
74368381a9 - did a bit of actor class consolidation by using explicit sprite assignments through 'spawnclasses'. 2022-12-11 19:43:54 +01:00
Christoph Oelckers
bdc474d04f - scriptified all remaining Duke actors with specific init code and no CON part. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
c9628db264 - scriptified the toilet. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
cbb3b0ebfb - preparations for the next script exports. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
d83e203b8d - renamed a few RR sprites plus one associated global variable. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
e5ac32e329 - scriptified the remaining RR destructibles. 2022-12-11 19:43:53 +01:00
Christoph Oelckers
15bee4ca6a - scriptified the remaining Duke destructibles, except the toilets. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
e6c466fcba - scriptified several of Duke's destructible items. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
066c4c88b2 - scriptified the two final special stat items from RRRA. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
7cbc713b4e - scriptified stat121 special effect. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
dc06a93a4f - scriptified RR's UFO teleporter. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
5a155730b4 - scriptified RR's bowling stuff. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
9ad8f67ce9 - added isEffector inline and exported NATURALLIGHTNING which got a bit in the way. 2022-12-11 19:43:52 +01:00
Christoph Oelckers
be6ead173a - scriptified several smaller actors 2022-12-11 19:43:51 +01:00
Christoph Oelckers
0dc526899b - scriptified FrameEffect 2022-12-11 19:43:51 +01:00
Christoph Oelckers
44d4e7a20a - scriptified the mortar projectiles.
This was split off heavyhbomb for clarity and to avoid interference with the pickup code.
2022-12-11 19:43:51 +01:00
Christoph Oelckers
0bc9023e17 - scriptified the pipe bomb and RR's dynamite, which is mostly the same thing.
The mortars were split off because they made the code too convoluted.
2022-12-11 19:43:51 +01:00
Christoph Oelckers
ff6a9b89ac - scriptified the green slimer. 2022-12-11 19:43:51 +01:00
Christoph Oelckers
bc34746227 - scriptified transport vehicles. 2022-12-11 19:43:50 +01:00
Christoph Oelckers
f1d6e0e6bb - scriptified Duke's shooting gallery targets. 2022-12-11 19:43:50 +01:00
Christoph Oelckers
4397e65443 - cleaned up the generic destructible code and used it for several more things. 2022-12-11 19:43:50 +01:00
Christoph Oelckers
f89ccec829 - scriptified Duke's reactor. 2022-12-11 19:43:50 +01:00
Christoph Oelckers
f6fe639233 - avoid propagating owner flags where easily doable.
This particular case is done a lot better by setting a special flag.
2022-12-11 19:43:50 +01:00
Christoph Oelckers
59659bc284 - scriptified the last two RR projectiles.
These are particularly messy - they have different looks depending on the shooter...
2022-12-11 19:43:49 +01:00
Christoph Oelckers
403141807f - scriptified all simple and explosive RR projectiles. 2022-12-11 19:43:49 +01:00
Christoph Oelckers
82515e1d76 - scriptified the World Tour's flamethrower#s fireball.
Also using a better method to mark the trailing balls than checking the owner.
2022-12-11 19:43:49 +01:00
Christoph Oelckers
26d9511087 - scriptified the octabrain projectile. 2022-12-11 19:43:49 +01:00