Curation round 10: combat, pathfinding, death and game over, items and stats, room state, Continue, Lua callbacks
Seven agents took over tear and contact collision, NPC death with blood and gibs, champions, PathFinder, the Gaper's kin, the player's death with the game over screen, item pedestals with collectible pickup, AddCollectible and EvaluateItems, room state save and restore, GameState::read, pressure plates, fireplaces, entity lights, ambient sounds, and one Lua callback enum with gated runners. Integration reconstructed Room::Update's loot preview and Entity_NPC::UpdatePickupGhosts and replaced a leftover Sacred Orb stub that stopped every pedestal roll. Under gdb: Gapers die with blood and gibs, a cleared room opens its doors, the treasure room's item is taken (banner, costume, stats: a Magic Mushroom gives damage 3.5 -> 6.12 and a heart), death leads to the game over diary, and a saved run is read back on the next boot with Continue offered. 3028 functions taken over. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
48933cd312
commit
d8385e6c64
64 files changed
+8665
-3059
No files matched your search
+22
-3
@@ -4,9 +4,24 @@
|
||||
#include "anm2.h"
|
||||
#include <vector>
|
||||
|
||||
// Lua's TearFlags bits that the entity code reads.
|
||||
// Lua's TearFlags bits that the entity code reads (bit 100, a hit through cooldowns, has no Lua name).
|
||||
enum TearFlagBit : int
|
||||
{
|
||||
TEAR_SPECTRAL = 0,
|
||||
TEAR_PIERCING = 1,
|
||||
TEAR_PERSISTENT = 9,
|
||||
TEAR_BOUNCE = 19,
|
||||
TEAR_STICKY = 37,
|
||||
TEAR_BOOGER_FLAG = 48,
|
||||
TEAR_BELIAL_FLAG = 52,
|
||||
TEAR_ORBIT_ADVANCED = 69,
|
||||
TEAR_ROCK_FLAG = 70,
|
||||
TEAR_SPORE_FLAG = 77,
|
||||
TEAR_TELEPORT = 81,
|
||||
TEAR_THROUGH_COOLDOWN = 100,
|
||||
TEAR_NO_GRID_DAMAGE = 105,
|
||||
TEAR_FETUS_FLAG = 114,
|
||||
TEAR_CHAIN = 123,
|
||||
TEAR_GROW = 7,
|
||||
TEAR_EXPLOSIVE = 12,
|
||||
TEAR_WAIT = 17,
|
||||
@@ -87,6 +102,8 @@ enum TearDeath : uint32_t
|
||||
TEAR_DEATH_GRID = 1 << 0,
|
||||
TEAR_DEATH_WALL = 1 << 1,
|
||||
TEAR_DEATH_FLOOR = 1 << 2,
|
||||
TEAR_DEATH_ENTITY = 1 << 3,
|
||||
TEAR_DEATH_EXPLOSION = 1 << 5,
|
||||
TEAR_DEATH_FORCED = 1 << 6
|
||||
};
|
||||
|
||||
@@ -95,8 +112,8 @@ enum TearDeath : uint32_t
|
||||
// 0060cd00, 0085dd60, 0085dd70, 0085dd90) are the public fields.
|
||||
// A player's tear (Lua's EntityTear): its height and fall, scale and damage, the tear flags that change how it flies
|
||||
// and hits, the entity it sticks to, and the tears and lasers it links to.
|
||||
// Only a plain tear is reconstructed yet: Update and Interpolate stop at any tear flag or special variant, and
|
||||
// HandleCollision past its early checks.
|
||||
// Only a plain tear is reconstructed yet: Update, Interpolate and HandleCollision stop at most tear flags and special
|
||||
// variants.
|
||||
struct Entity_Tear : Entity
|
||||
{
|
||||
ANM2 deadEyeANM2;
|
||||
@@ -174,6 +191,8 @@ struct Entity_Tear : Entity
|
||||
void apply_link_spring_forces();
|
||||
bool try_make_bridges(const Vector& position);
|
||||
void reroll_hit_entity(int unused);
|
||||
static void ApplyTearFlagEffects(Entity* entity, const Vector& position, const TearFlags& flags, Entity* source,
|
||||
float damage);
|
||||
|
||||
private:
|
||||
float animation_update();
|
||||
|
||||
Reference in new issue
Block a user