Commit graph

188 commits

Author SHA1 Message Date
Mitchell Richters
a67c126129 - Blood: Extend 99508e6f15 to find picnum of previous frame in all previous frame's tile indices if the current frame's tile index doesn't match.
* Allows more interpolation magic.
* Revealed an issue with `interpolatedanglef()` that was undetected. Removed in place of a binangle version returned as floating point build.
2021-07-29 19:23:00 +10:00
Mitchell Richters
99508e6f15 - Blood: Perform interpolation between frames for each tile coordinate when there is more than one frame and the picnum between frames match. 2021-07-29 17:39:22 +10:00
NoOneBlood
a40d036623 Fix max players range check for kModernPlayerControl
Add power up control for kModernPlayerControl
2021-07-27 08:05:31 +10:00
nukeykt
adb9547ba9 Blood: fix impact sprite OOB issue 2021-07-26 19:19:41 +10:00
nukeykt
ced8a83331 Blood: fix potential view sprite overflows 2021-07-26 16:06:56 +10:00
nukeykt
557cd7e734 Blood: fix view sprites overflow in ROR code 2021-07-26 16:00:13 +10:00
nukeykt
39547e2df5 Blood: fix OOB issue in aiPatrolSetMarker 2021-07-26 15:55:13 +10:00
Christoph Oelckers
1a5a2aba2b - Blood: fixed path validation for cutscene files. 2021-07-25 17:27:52 +02:00
Christoph Oelckers
fa586d6d7c - Blood: fixed parser for 'mario' cheat to treat a leading space for the level number as 0. 2021-07-25 11:53:20 +02:00
Christoph Oelckers
b23db149e3 - use snprintf in condError.
While sprintf is generally problematic, it is particularly dangerous here where it is impossible to estimate the length of the messages.
2021-07-25 11:50:23 +02:00
Mitchell Richters
9fad44bab2 - Blood: Replace use of non-standard strupr() from 754554a493 with an FString object. 2021-07-25 19:44:07 +10:00
Mitchell Richters
3b82a08123 Revert "- Fix non-Windows and non-MSVC builds due to missing header for strupr()."
This reverts commit 2217dcb632.
2021-07-25 19:38:06 +10:00
Mitchell Richters
2217dcb632 - Fix non-Windows and non-MSVC builds due to missing header for strupr(). 2021-07-25 19:27:31 +10:00
Christoph Oelckers
7702b3bb92 - rewrote the sound handling in the patrolling code for Raze's sound backend. 2021-07-25 10:42:15 +02:00
Christoph Oelckers
eae355110f - use enums instead of #defines. 2021-07-25 10:30:14 +02:00
Christoph Oelckers
cc3e6b74f3 - handle newly activated 'unused' fields properly for serialization. 2021-07-25 10:29:50 +02:00
Christoph Oelckers
b588abbca6 - deleted two unused functions that got back in again by accident. 2021-07-25 08:50:46 +02:00
Mitchell Richters
ffe62da3c7 - Blood: Add some nullptr checks to the aiPatrol*() inline bools. 2021-07-25 15:37:50 +10:00
Mitchell Richters
7329cb8f1f - Blood: Comment out bonk code from 754554a493 to get things building for now. 2021-07-25 13:12:29 +10:00
NoOneBlood
754554a493 Increase kMaxSuperXSprites from 128 to 512.
Fix mirror (ROR) intialization so it won't crash if more than 1024 sectors used.
Fix random item generator so items that inherits TX ID won't send command at respawn.
Fix for things (400 - 433) that affected by modern physics so it won't return to vanilla physics after getting damage.
Fix kTeleportTarget so teleported sprites won't stuck in floors or ceilings.
Corpses won't gib as gargoyles anymore (gModernMap).

kModernCondition:
 - remove bool comparison (condCmpb).
 - remove no extra comparison (condCmpne).
 - remove "else if" search at level start.
 - add global (game) conditions type.
 - add more conditions.
 - make error report a bit more informative.

Add more options and damage effects for kModernSpriteDamager.
Add more options for kModernMissileGen and allow to spawn projectile on TX ID sprites location.
Add more options and vertical wind processing for kModernWindGen.
Add more options and effects for kModernEffectGen.
Allow kMarkerDudeSpawn to spawn enemies on TX ID sprites location (gModernMap).
Allow kModernCustomDudeSpawn to spawn dude on TX ID sprites location.
Add Screen and Aim trigger flags for sprites that can be triggered with Sight (gModernMap).

Patrolling enemies:
 - add turn AI state.
 - add "return back" option for path markers.
 - add "turning while waiting" option for markers.
 - make enemies to hear some sounds assuming that player generates and hears it too.
 - add kModernStealthRegion type to affect current spot progress velocity.
 - replace AI's CanMove and aiChooseDirection to a better versions.
 - make flying enemies to not spin around the marker.
 - treat Phantasm as flying enemy!
 - allow to continue patrol when falling in water.

Fix compile warnings
Various minor fixes / cleanup.
2021-07-25 13:11:55 +10:00
Mitchell Richters
a55b8f716d - Blood: Repair some missing nullptr checks causing a crash upon reloading after dying.
* Reported by Spill.
2021-07-24 21:39:29 +10:00
Mitchell Richters
675356be1a - Ensure g_nextskill is used everywhere so that setting skill for next level works properly. 2021-07-20 18:51:34 +10:00
Mitchell Richters
33845c4a23 - Add skill CCMD to return player's current skill, while also being able to set skill for next game.
* Fixes #332.
2021-07-20 18:50:58 +10:00
Mitchell Richters
77630dcbc7 - Rename DeferedStartGame() to DeferredStartGame(). 2021-07-20 18:43:17 +10:00
Mitchell Richters
0f5243c39e - Blood: Lock input after setting angle/horizon targets in nnexts.cpp code, then unlock in ProcessInput() where resetForcedSyncInput() is called. 2021-07-18 19:26:24 +10:00
Mitchell Richters
58ed7f8745 - Blood: Restore original horizon algorithm in trPlayerCtrlSetLookAngle() and adjust to Raze's backend input code. 2021-07-18 18:52:21 +10:00
Mitchell Richters
b4af9e87c1 - Blood: Make delirium rotscrnang smoother with use of more precision. 2021-07-18 18:13:48 +10:00
Mitchell Richters
c62e5db2bc - Blood: Fix angle issues with NHIS. 2021-07-18 17:35:11 +10:00
Mitchell Richters
9432f9ec90 - Blood: Add nullptr check for actor2 in ProcessTouchObjects().
* Fixes crash during testing of NHIS.
2021-07-18 16:56:49 +10:00
Mitchell Richters
f022f197ab - Blood: Repair weapon switching issue by adding missing guard from 6980e8b355 that got lost during e375c799ce.
* Fixes #366.
2021-07-17 09:14:08 +10:00
Mitchell Richters
76554f5f4d - Repair incorrect method call to IniFile class from 6576adb80b.
* Fixes #473.
2021-07-16 23:01:07 +10:00
Christoph Oelckers
6576adb80b - Blood: validate .ini files before using them.
They must at least have one "Episode?" section to be accepted.
2021-07-13 12:34:35 +02:00
Christoph Oelckers
7a99b6376e - forgot to save this... 2021-07-13 12:31:14 +02:00
Christoph Oelckers
b06ad5c77f - Blood: fixed order of initialization for voxels.
Just like Shadow Warrior it needs to load its voxel table before .def files.
2021-07-13 12:11:17 +02:00
Mitchell Richters
5af06923d8 - Blood: Revise 6018213c71 and use the proper volume flag VF_HIDEFROMSP to hide multiplayer episodes from the menu. 2021-07-11 22:30:59 +10:00
Christoph Oelckers
4dd293d551 - zero-terminate the buffer for reading Blood's INI files. 2021-06-26 12:04:21 +02:00
Christoph Oelckers
0f7d3d0cbb - streamlined and fixed game startup with '-map' option.
* Blood: Initialize global pointers in app_init so that they are not NULL.
* consider Mapinfo data when checking for a given level name.
* removed redundant level name output.
2021-06-26 10:11:50 +02:00
Christoph Oelckers
63bc36e3c4 - renamed some constants.
Manually copied from NBlood because the underlying code has changed too much already.
2021-06-24 14:14:16 +02:00
Mitchell Richters
6018213c71 - Blood: Don't parse BloodBathOnly levels in the INI loader.
* Fixes #442.
2021-06-24 18:21:06 +10:00
Christoph Oelckers
207298aeb4 - fixed compilation (again.) 2021-06-02 21:00:39 +02:00
NoOneBlood
73683b3ebe Remove viewSetSystemMessage() when setting dude flags via command
# Conflicts:
#	source/blood/src/nnexts.cpp
2021-06-02 20:52:49 +02:00
Christoph Oelckers
86082d4c10 - fixed last commit 2021-06-02 20:52:48 +02:00
NoOneBlood
f433c6ee11 Use dude physics as base for debris physics
Remove dude flags commands
Update kModernSlopeChanger
Add stealth dude flag
Update for sector pause/continue motion

# Conflicts:
#	source/blood/src/db.h
#	source/blood/src/nnexts.cpp
#	source/blood/src/nnexts.h

# Conflicts:
#	source/blood/src/nnexts.cpp
2021-06-02 20:52:48 +02:00
Christoph Oelckers
7fa690082e - fixed cherry picked commit.
# Conflicts:
#	source/core/gamecontrol.h
2021-06-02 20:52:47 +02:00
NoOneBlood
3a59243ea0 - Fixed getPlayeById() function in multiplayer.
- Fixed debris physics flags was not properly reset on level restart.
- Added new modern type "kModernSlopeChanger" that can manipulate sector and sprite slopes.
- Allow to drop items and keys for players in multiplayer (gModernMap only).
- Added event commands to manipulate dude flags.
- Patrol enemies (xsprite.dudeFlag4, gModernMap only):
  - Added path markers following.
  - Added stealth mechanics.
  - Added spot target progress bar.
  - Added alarm dude flag.
  - Added blind dude flag.
  - Added deaf dude flag.
  - Added conditions for kModernCondition related to patrol enemies.
- kModernDamager can work like generator and damage anyone in sectors or in map.
- kSectorDamage is not does the damage if in Off state (gModernMap only).
- Additional options kModernSeqSpawner.
- Effects that created with kModernEffectSpawner now inherits offset of the sprite.
- Added kCmdSectorMotionPause and kCmdSectorMotionContinue event commands that allows to pause or continue sector motion (gModernMap only, WIP).
- Various minor fixes.

# Conflicts:
#	source/blood/src/ai.cpp
#	source/blood/src/common_game.h
#	source/blood/src/eventq.cpp
#	source/blood/src/nnexts.cpp
#	source/blood/src/nnexts.h
#	source/blood/src/triggers.cpp
#	source/blood/src/triggers.h
#	source/blood/src/view.cpp

# Conflicts:
#	source/games/blood/src/ai.cpp
#	source/games/blood/src/nnexts.h

# Conflicts:
#	source/games/blood/src/actor.cpp
#	source/games/blood/src/ai.cpp
2021-06-02 20:51:47 +02:00
Christoph Oelckers
c4fa99c891 - ProcessTouchObjects 2021-06-02 20:44:55 +02:00
Christoph Oelckers
f7668fc074 - first pass over ProcessTouchObject 2021-06-02 20:44:54 +02:00
Christoph Oelckers
a7572bca0a - actImpactMissile. 2021-06-02 20:43:14 +02:00
Christoph Oelckers
454816299e - reorganized loading of textures.
Due to dependencies on initializing some data in app_init it was not possible to cleanly set up the fonts.
This adds a game-side function for loading the entire palettes before starting with the texture data and another one for loading game-side texture data.
This now allows fully setting up the palettes before starting with the textures and to fully set up the textures before reading the .def files.

All this is needed because to properly initialize, the fonts need to be able to access the fully initialized texture state, including replacements and hires substitutions from the .def files.
2021-06-01 11:05:26 +02:00
Christoph Oelckers
8b507ed606 - enabled the ENDOOM-like text screens when quitting Duke and SW.
Turned out that all they needed was the font.
2021-05-31 23:16:52 +02:00