Curation round 25 (code only): the ultra horsemen and the Beast's background, the Scourge and Polty, the player's last gaps with the frame gate removed, game core, debug and daily, local co-op and player-controlled enemies, TMTRAINER, local versus, the vanilla Lua API, the special-daily fix, shared constants folded (60 duplicates, 10 offline gaps)
This commit is contained in:
1 parent
534339a496
commit
5c89798773
280 files changed
+14904
-5309
No files matched your search
@@ -305,7 +305,6 @@ constexpr float WORM_STEP_SPEED_SQUARED = 1;
|
||||
constexpr float WORM_TEAR_RANGE = 5;
|
||||
constexpr float WORM_STILL_SPEED_SQUARED = 1;
|
||||
|
||||
constexpr float HALF_TURN = 180;
|
||||
constexpr float SPRITE_UP = 90;
|
||||
|
||||
static CombatEffect variant_get(const Entity_Effect& effect)
|
||||
@@ -328,8 +327,8 @@ bool is_combat_effect(int variant)
|
||||
static float angle_wrap(float angle)
|
||||
{
|
||||
if (std::fabs(angle) > FULL_TURN_DEGREES) angle = std::fmod(angle, FULL_TURN_DEGREES);
|
||||
if (angle > HALF_TURN) return angle - FULL_TURN_DEGREES;
|
||||
if (angle < -HALF_TURN) return angle + FULL_TURN_DEGREES;
|
||||
if (angle > HALF_TURN_DEGREES) return angle - FULL_TURN_DEGREES;
|
||||
if (angle < -HALF_TURN_DEGREES) return angle + FULL_TURN_DEGREES;
|
||||
return angle;
|
||||
}
|
||||
|
||||
@@ -369,7 +368,7 @@ void game_particles_spawn(const ParticleSpawn& spawn)
|
||||
for (int i = 0; i < spawn.count; i++)
|
||||
{
|
||||
uint32_t seed = Random();
|
||||
float angle = random_unit() * RANDOM_HALF_TURN;
|
||||
float angle = random_unit() * PI_ROUGH;
|
||||
angle += angle;
|
||||
Vector velocity = vector_make(std::cos(angle) * spawn.speed, std::sin(angle) * HALF * spawn.speed);
|
||||
auto* particle = static_cast<Entity_Effect*>(
|
||||
@@ -479,7 +478,7 @@ static void dust_cloud_init(Entity_Effect& effect)
|
||||
int frame = clouds->length == 0 ? 0 : (int)(Random() % (uint32_t)clouds->length);
|
||||
effect.sprite.SetFrame(clouds->name, frame);
|
||||
effect.sprite.isFlipX = !(Random() & 1);
|
||||
effect.sprite.rotation = random_unit() * FULL_TURN_DEGREES - HALF_TURN;
|
||||
effect.sprite.rotation = random_unit() * FULL_TURN_DEGREES - HALF_TURN_DEGREES;
|
||||
effect.sprite.scale = vector_make(DUST_SCALE, DUST_SCALE);
|
||||
effect.renderZOffset = POOF_RENDER_Z;
|
||||
if (effect.subtype == DUST_DARK) effect.sprite.color = {{1, 1, 1, 1}, {}, {DUST_DARKEN, DUST_DARKEN, DUST_DARKEN}};
|
||||
|
||||
Reference in new issue
Block a user