Curation round 28 (code only): float pow, log and exp widened to double like the game, inlined HasTrinket preview handling, explicit RNG argument order, update_effects rebuilt in the original's order, weapon vtable slots, null-frame reads, and a parity audit finishing every boss, every enemy, the level and most rooms, grid entities and weapons; misnamed pill and null-item ids corrected (55 duplicates)
This commit is contained in:
1 parent
e66baf4063
commit
719e5ef04d
157 files changed
+1399
-717
No files matched your search
+5
-7
@@ -47,7 +47,8 @@ constexpr float SLIDE_CREEP_SCALE = 0.75f;
|
||||
constexpr float SLIDE_CREEP_SCALE_SPREAD = 0.25f;
|
||||
|
||||
constexpr float WALL_SPLAT_REACH = 200;
|
||||
constexpr float WALL_SPLAT_MARGIN = -24;
|
||||
constexpr float WALL_SPLAT_SPREAD = 40;
|
||||
constexpr float WALL_SPLAT_INWARD = -0.6f;
|
||||
constexpr float WALL_SPLAT_SIZE = 1;
|
||||
constexpr float WALL_SPLAT_SIZE_SPREAD = 2;
|
||||
constexpr float WALL_SPLAT_TURN = 90;
|
||||
@@ -151,7 +152,7 @@ static void slide_wall_hit(Entity_NPC& npc)
|
||||
npc.targetPosition = room.GetRandomPosition(0);
|
||||
npc.PlaySound(SOUND_MEAT_JUMPS, 1, 2, false, 1);
|
||||
|
||||
float margin = random_unit() * WALL_SPLAT_MARGIN;
|
||||
float margin = random_unit() * WALL_SPLAT_SPREAD * WALL_SPLAT_INWARD;
|
||||
Vector behind = vector_add(npc.pos, vector_scale(npc.gridCollisionNormal, WALL_SPLAT_REACH));
|
||||
Vector spot = room.GetClampedPositionImpl(behind, margin, margin, margin, margin);
|
||||
GridEntity* wall = room_grid_entity_at(spot);
|
||||
@@ -182,9 +183,7 @@ static void dingle_slide(Entity_NPC& npc)
|
||||
npc.friction *= DINGLE_SLIDE_FRICTION;
|
||||
if (npc.sprite.WasEventTriggered("Slide"))
|
||||
{
|
||||
Vector push = vector_resized(npc.velocity, npc.subtype == DINGLE_SPIDERS ? SPIDERS_SLIDE_PUSH : SLIDE_PUSH);
|
||||
if (npc.friction != 0)
|
||||
npc.velocity = vector_add(npc.velocity, vector_scale(push, npc.speedMultiplier / npc.friction));
|
||||
npc_push(npc, vector_resized(npc.velocity, npc.subtype == DINGLE_SPIDERS ? SPIDERS_SLIDE_PUSH : SLIDE_PUSH));
|
||||
if (npc.variant == DANGLE) dangle_trail(npc);
|
||||
}
|
||||
npc.sprite.isFlipX = npc.velocity.x > 0;
|
||||
@@ -257,8 +256,7 @@ static void dangle_dip_spawn(Entity_NPC& npc)
|
||||
Vector spot = vector_add(vector_add(vector_scale(scatter, spread), vector_scale(aim, DANGLE_DIP_AHEAD)), npc.pos);
|
||||
auto* dip = static_cast<Entity_NPC*>(g_game->Spawn(
|
||||
{.position = spot, .spawner = &npc, .type = ENTITY_DIP, .variant = CORNY_DIP, .seed = seed}));
|
||||
if (dip->friction != 0)
|
||||
dip->velocity = vector_add(dip->velocity, vector_scale(aim, DANGLE_DIP_KICK * dip->speedMultiplier / dip->friction));
|
||||
npc_push(*dip, vector_scale(aim, DANGLE_DIP_KICK));
|
||||
dip->ClearEntityFlags(FLAG_APPEAR);
|
||||
dip->Update();
|
||||
dip->state = NPC_STATE_MOVE;
|
||||
|
||||
Reference in new issue
Block a user