From 30d0099cf8c74fd6e073f00935767ef3024a1901 Mon Sep 17 00:00:00 2001 From: InspirationByte Date: Tue, 25 Jan 2022 20:56:37 +0300 Subject: [PATCH] - fix loadsectorsPC error message when CD image is present --- src_rebuild/Game/C/civ_ai.c | 3 +-- src_rebuild/Game/C/system.c | 4 ++++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src_rebuild/Game/C/civ_ai.c b/src_rebuild/Game/C/civ_ai.c index a833c7f3..abddb5a9 100644 --- a/src_rebuild/Game/C/civ_ai.c +++ b/src_rebuild/Game/C/civ_ai.c @@ -3674,8 +3674,7 @@ int CivControl(CAR_DATA* cp) if (cp->ai.c.thrustState != 3) steer = CivSteerAngle(cp); - // reduce acceleration when steering is applied - thrust = CivAccel(cp) - MAX(ABS(steer), 4) * 3; + thrust = CivAccel(cp) - MAX(ABS(steer), 4) * 3; // [A] reduce acceleration when steering is applied if (thrust < 0 && cp->hd.wheel_speed < 5) thrust = 0; diff --git a/src_rebuild/Game/C/system.c b/src_rebuild/Game/C/system.c index 514218e6..90d1ea91 100644 --- a/src_rebuild/Game/C/system.c +++ b/src_rebuild/Game/C/system.c @@ -535,6 +535,10 @@ void sector_ready(u_char intr, u_char* result) int loadsectorsPC(char* addr, int sector, int nsectors) { char namebuffer[64]; + + if (g_CurrentLevelFileName[0] == 0) + return 0; + strcpy(namebuffer, g_CurrentLevelFileName); FS_FixPathSlashes(namebuffer);