Shared tomatoes, P1 sandbox spawns, and weapons left out
- Tomato splats are kept in the match, so everyone sees everyone's (others' arrive in replays, which play no effects), each splatting with juice and a sound once. - The sandbox's first player (solo or hosting) spawns on the arena's P1 mark. - A thrown flail ball or grapple stays out when switching weapons, and another weapon fires while a grapple hangs on. Mines, flail balls and grapples go once their slot no longer holds the weapon that put them out (mines fizzling). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e88fed1f4c
commit
e55596b276
10 files changed
+84
-79
No files matched your search
@@ -14,12 +14,6 @@ constexpr float FLASH_LIFE = 0.05f;
|
||||
constexpr float FLASH_WIDTH = 6;
|
||||
constexpr float RING_LIFE = 0.3f;
|
||||
constexpr int RING_WIDTH = 2;
|
||||
constexpr float SPLAT_CORE = 6;
|
||||
constexpr float SPLAT_FADE = 0.6f;
|
||||
constexpr float SPLAT_LIFE = 2;
|
||||
constexpr float SPLAT_REACH = 10;
|
||||
constexpr float SPLAT_SIZE_MAX = 3.5f;
|
||||
constexpr float SPLAT_SIZE_MIN = 1.5f;
|
||||
constexpr float AFTERIMAGE_LIFE = 0.12f;
|
||||
constexpr float NUMBER_GAP = 8;
|
||||
constexpr float POPUP_FADE = 0.4f;
|
||||
@@ -133,19 +127,6 @@ void Effects::ring_spawn(Vec2 position, float radius, Color color)
|
||||
effect_add(rings, Ring{color, position, RING_LIFE, radius});
|
||||
}
|
||||
|
||||
// A big blob where it landed, with smaller ones flung round it.
|
||||
void Effects::splat_spawn(Vec2 position, Color color)
|
||||
{
|
||||
Splat splat = {.color = color, .position = position, .life = SPLAT_LIFE};
|
||||
splat.sizes[0] = SPLAT_CORE;
|
||||
for (int i = 1; i < SPLAT_BLOBS; i++)
|
||||
{
|
||||
splat.blobs[i] = vec2_polar(random_get(0, 2 * PI), random_get(SPLAT_CORE, SPLAT_REACH));
|
||||
splat.sizes[i] = random_get(SPLAT_SIZE_MIN, SPLAT_SIZE_MAX);
|
||||
}
|
||||
effect_add(splats, splat);
|
||||
}
|
||||
|
||||
void Effects::dps_record(int amount)
|
||||
{
|
||||
hits.push_back({ticks * TICK, amount});
|
||||
@@ -187,10 +168,6 @@ void Effects::update()
|
||||
ring.life -= TICK;
|
||||
std::erase_if(rings, [](Ring& ring) { return ring.life <= 0; });
|
||||
|
||||
for (Splat& splat : splats)
|
||||
splat.life -= TICK;
|
||||
std::erase_if(splats, [](Splat& splat) { return splat.life <= 0; });
|
||||
|
||||
for (Afterimage& afterimage : afterimages)
|
||||
afterimage.life -= TICK;
|
||||
std::erase_if(afterimages, [](Afterimage& afterimage) { return afterimage.life <= 0; });
|
||||
@@ -232,14 +209,6 @@ void Effects::draw(Game& game)
|
||||
renderer.line_draw(flash.position - across, flash.position + across, width * FLASH_CROSS, flash.color);
|
||||
}
|
||||
|
||||
// Each splat holds, then fades out over its last moments.
|
||||
for (Splat& splat : splats)
|
||||
{
|
||||
Color color = color_fade(splat.color, std::min(1.0f, splat.life / SPLAT_FADE));
|
||||
for (int i = 0; i < SPLAT_BLOBS; i++)
|
||||
renderer.circle_draw(splat.position + splat.blobs[i], splat.sizes[i], color);
|
||||
}
|
||||
|
||||
// Each ring eases out to its full radius as it fades.
|
||||
for (Ring& ring : rings)
|
||||
{
|
||||
@@ -290,6 +259,5 @@ void Effects::clear()
|
||||
particles.clear();
|
||||
popups.clear();
|
||||
rings.clear();
|
||||
splats.clear();
|
||||
shake = 0;
|
||||
}
|
||||
Reference in new issue
Block a user