Small fixes and remedy autohotkey tooling

main
Cameron Murphy Reikes 2 years ago
parent 90b11aef4e
commit 669798caef

Binary file not shown.

@ -323,7 +323,6 @@ void create_player(Player *player)
unlock_box(player, BoxMedbay);
unlock_box(player, BoxSolarPanel);
unlock_box(player, BoxScanner);
}
void create_player_entity(GameState *gs, Entity *e)
@ -1601,7 +1600,6 @@ void create_initial_world(GameState *gs)
create_station(gs, (V2){-50.0f, 0.0f}, BoxExplosive);
create_station(gs, (V2){0.0f, 100.0f}, BoxGyroscope);
#endif
}
void exit_seat(GameState *gs, Entity *seat_in, Entity *p)
@ -1888,11 +1886,12 @@ void process(GameState *gs, float dt)
if (!e->exists)
continue;
if (e->body != NULL)
// sun processing
{
cpVect p = cpvsub(cpBodyGetPosition(e->body), v2_to_cp(SUN_POS));
cpFloat sqdist = cpvlengthsq(p);
if (sqdist > (INSTANT_DEATH_DISTANCE_FROM_SUN * INSTANT_DEATH_DISTANCE_FROM_SUN))
cpVect pos_rel_sun = v2_to_cp(V2sub(entity_pos(e), SUN_POS));
cpFloat sqdist = cpvlengthsq(pos_rel_sun);
if (e->body != NULL && sqdist > (INSTANT_DEATH_DISTANCE_FROM_SUN * INSTANT_DEATH_DISTANCE_FROM_SUN))
{
bool platonic_found = false;
if (e->is_grid)
@ -1909,7 +1908,7 @@ void process(GameState *gs, float dt)
if (platonic_found)
{
cpBody *body = e->body;
cpBodySetVelocity(body, cpvmult(cpBodyGetVelocity(body), -1.0));
cpBodySetVelocity(body, cpvmult(cpBodyGetVelocity(body), -0.5));
cpVect rel_to_sun = cpvsub(cpBodyGetPosition(body), v2_to_cp(SUN_POS));
cpBodySetPosition(body, cpvadd(v2_to_cp(SUN_POS), cpvmult(cpvnormalize(rel_to_sun), INSTANT_DEATH_DISTANCE_FROM_SUN)));
}
@ -1919,15 +1918,21 @@ void process(GameState *gs, float dt)
}
continue;
}
if (!e->is_grid) // grids aren't damaged (this edge case sucks!)
{
sqdist = cpvlengthsq(cpvsub(v2_to_cp(entity_pos(e)), v2_to_cp(SUN_POS)));
if (sqdist < (SUN_RADIUS * SUN_RADIUS))
{
e->damage += 10.0f * dt;
}
}
cpVect g = cpvmult(p, -sun_gravity_at_point(entity_pos(e)) / (sqdist * cpfsqrt(sqdist)));
if (e->body != NULL)
{
cpVect g = cpvmult(pos_rel_sun, -sun_gravity_at_point(entity_pos(e)) / (sqdist * cpfsqrt(sqdist)));
cpBodyUpdateVelocity(e->body, g, 1.0f, dt);
}
}
if (e->is_explosion)
{

@ -795,9 +795,15 @@ static void ui(bool draw, float dt, float width, float height)
no_size = lerp(no_size, no_hovered ? 75.0f : 50.0f, dt * 9.0f);
if (invited && build_pressed && yes_hovered)
{
accept_invite = true;
build_pressed = false;
}
if (invited && build_pressed && no_hovered)
{
reject_invite = true;
build_pressed = false;
}
if (draw)
{

@ -1,3 +1,4 @@
git push
call build_release.bat
call update_server.bat
tar.exe -a -c -f releases\flight-nonumber.zip flight_release.exe loaded

@ -9,16 +9,11 @@ SetWorkingDir, %A_ScriptDir%
^b::
WinKill, Flight Hosting
Sleep, 20
WinActivate flight.rdbg
Sleep 20
Send, {Shift down}{F5}{Shift up}
Send, {F5}
WinActivate, flightbuild
If WinActive("flightbuild")
{
Send, {Enter}
Send, msbuild{Enter}
Send, remedybg continue-execution && sleep 0.1 && remedybg.exe stop-debugging && msbuild && remedybg.exe start-debugging {Enter}
}
return

Loading…
Cancel
Save