Curation round 17: Theora and Vorbis cutscene videos, Ludovico, Epic and Dr. Fetus, Tractor Beam and Eye of the Occult, familiars and blue spiders, fortune teller and restock, the Bag of Crafting and four tainted characters, ten enemies, water and the ultra secret door, Isaac, ???, the Lamb and Hush

This commit is contained in:
shweet committed 2026-11-21 01:27:03 -05:00
1 parent e9de039d0f
commit 024cb12016
133 files changed
+13325 -2520

No files matched your search

+38
View File
@@ -8,6 +8,7 @@
#include "log.h"
#include "manager.h"
#include "npc_ai.h"
#include "npc_basement.h"
#include "sfx_manager.h"
#include <cmath>
@@ -57,6 +58,11 @@ constexpr int HELD_BEAM_TIMEOUT = 8;
constexpr int HELD_BEAM_MIN_TIMEOUT = 4;
constexpr int FAMILIAR_BEAM_BLINK = 10;
constexpr float LUDOVICO_RING_LIFT = -20;
constexpr float TRACTOR_BEAM_REACH = 12;
constexpr float TRACTOR_BEAM_UP = -0.5f;
constexpr float TRACTOR_BEAM_DEPTH_UP = -10;
constexpr float TRACTOR_BEAM_DEPTH = 3000;
constexpr int TRACTOR_BEAM_BLINK = 5;
constexpr float LUDOVICO_RETURN_PUSH = 0.15f;
constexpr float LUDOVICO_RETURN_DISTANCE_SQUARED = 10000;
constexpr float NO_RELEASE_CHARGE = -1000;
@@ -913,6 +919,38 @@ void Weapon_TechX::fire_rings(const Vector& aim, float shotSpeed)
else if (owner && owner->is_player()) owner->ToPlayer()->stop_costume_item_anims();
}
// The Tractor Beam part of 00782af0: a plain player holding it with a weapon that rides it keeps a beam from its
// Tractor Beam spot along its aim (or the way its head faces), drawn under it when aiming up and hidden while an
// item animation plays or an item is held, and keeps its eyes open. Otherwise the beam goes.
void tractor_beam_update(Entity_Player& player)
{
if (player.variant != PLAYER_VARIANT_PLAYER || player.isCoopGhost) return;
Weapon* weapon = player.weapons[1].get();
if (!player.HasCollectible(COLLECTIBLE_TRACTOR_BEAM) || !weapon || !weapon->SupportsTractorBeam())
{
if (Entity* beam = player.tractorBeam) beam->Remove();
return;
}
Vector aim = player.aimDirection;
bool isFreeAim = !vector_is_zero(aim) && player.HasCollectible(COLLECTIBLE_ANALOG_STICK);
aim = player.markedTarget || isFreeAim ? vector_normalized(aim) : vector_from_direction(player.headDirection);
if (!player.tractorBeam)
{
Entity* spawned = g_game->Spawn({.position = player.pos, .spawner = &player, .type = ENTITY_LASER,
.variant = LASER_TRACTOR_BEAM, .seed = Random()});
spawned->parent = &player;
spawned->Update();
player.tractorBeam = spawned;
}
auto& beam = *static_cast<Entity_Laser*>(player.tractorBeam.get());
beam.posOffset = player.GetLaserOffset(LASER_OFFSET_TRACTOR_BEAM, vector_scale(aim, TRACTOR_BEAM_REACH));
beam.set_aim_angle(angle_wrap(vector_angle(aim)));
beam.renderDepthOffset = aim.y <= TRACTOR_BEAM_UP ? TRACTOR_BEAM_DEPTH_UP : TRACTOR_BEAM_DEPTH;
beam.isVisible = player.IsExtraAnimationFinished() && !player.IsHoldingItem();
player.blinkTime = std::max(player.blinkTime, TRACTOR_BEAM_BLINK);
}
// 009f6980 Fires a Tech X ring: the owning player's, or a plain one from the owner.
Entity_Laser* Weapon::fire_tech_x_laser(const TechXShot& shot)
{