Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Source/Client/ConstantTicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ private static void TickNonSimulation()
}
}

private const float TicksPerMinute = 60 * 60;
private const float TicksPerIngameDay = 2500 * 24;
private const float TicksPerMinute = GenTicks.TicksPerRealSecond * 60;
private const float TicksPerIngameDay = GenDate.TicksPerDay;

private static void TickAutosave()
{
Expand Down Expand Up @@ -92,7 +92,7 @@ private static void TickShipCountdown()
{
if (ShipCountdown.timeLeft > 0f)
{
ShipCountdown.timeLeft -= 1 / 60f;
ShipCountdown.timeLeft -= 1f / GenTicks.TicksPerRealSecond;

if (ShipCountdown.timeLeft <= 0f)
ShipCountdown.CountdownEnded();
Expand Down
2 changes: 1 addition & 1 deletion Source/Client/Patches/Determinism.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> inst
// We use 1/60 since 1 second at speed 1 the deltaTime
// should (in perfect situation) be 60 ticks.
ci.opcode = OpCodes.Ldc_R4;
ci.operand = 1f / 60f;
ci.operand = 1f / GenTicks.TicksPerRealSecond;

patchCount++;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Client/Syncing/Game/SyncDelegates.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ static void SetBabyName(ChoiceLetter_BabyBirth letter)
static void GiveTimeToNameStillborn(Thing __result)
{
if (Multiplayer.Client != null && __result is Pawn pawn && pawn.health.hediffSet.HasHediff(HediffDefOf.Stillborn))
pawn.babyNamingDeadline = Find.TickManager.TicksGame + 60000;
pawn.babyNamingDeadline = Find.TickManager.TicksGame + GenDate.TicksPerDay;
}

static void PickRandomTraitAndPassions(ChoiceLetter_GrowthMoment letter)
Expand Down
3 changes: 2 additions & 1 deletion Source/Common/FreezeManager.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Linq;
using Verse;

namespace Multiplayer.Common
{
Expand All @@ -23,7 +24,7 @@ public FreezeManager(MultiplayerServer server)
Server = server;
}

private const int MaxFreezeWaitTime = 60 * 10; // 10 seconds
private const int MaxFreezeWaitTime = GenTicks.TicksPerRealSecond * 10; // 10 seconds

public void Tick()
{
Expand Down
Loading