summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dedicated.c2
-rw-r--r--economy.c6
-rw-r--r--engine.c2
-rw-r--r--functions.h2
-rw-r--r--misc.c2
5 files changed, 7 insertions, 7 deletions
diff --git a/dedicated.c b/dedicated.c
index 0c2de4a0b..b1c63c0e9 100644
--- a/dedicated.c
+++ b/dedicated.c
@@ -302,7 +302,7 @@ static int DedicatedVideoMainLoop(void)
#endif
if (cur_ticks >= next_tick) {
- next_tick += 30;
+// next_tick += 30;
GameLoop();
_screen.dst_ptr = _dedicated_video_mem;
diff --git a/economy.c b/economy.c
index 283bf3386..fa15b33f8 100644
--- a/economy.c
+++ b/economy.c
@@ -1346,9 +1346,6 @@ int LoadUnloadVehicle(Vehicle *v)
assert(v->current_order.type == OT_LOADING);
v->cur_speed = 0;
- old_player = _current_player;
- _current_player = v->owner;
-
st = GetStation(last_visited = v->last_station_visited);
for (; v != NULL; v = v->next) {
@@ -1455,6 +1452,9 @@ int LoadUnloadVehicle(Vehicle *v)
TriggerVehicle(v, VEHICLE_TRIGGER_EMPTY);
}
+ old_player = _current_player;
+ _current_player = v->owner;
+
if (result != 0) {
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
diff --git a/engine.c b/engine.c
index af3bb6df7..4849b08b9 100644
--- a/engine.c
+++ b/engine.c
@@ -567,6 +567,8 @@ static void DoTriggerVehicle(Vehicle *veh, VehicleTrigger trigger, byte base_ran
RealSpriteGroup *rsg;
byte new_random_bits;
+ assert(_current_player >= MAX_PLAYERS);
+
_vsg_random_triggers = trigger;
_vsg_bits_to_reseed = 0;
rsg = TriggerVehicleSpriteGroup(GetVehicleSpriteGroup(veh->engine_type, veh), veh,
diff --git a/functions.h b/functions.h
index 92c03392c..8e118f034 100644
--- a/functions.h
+++ b/functions.h
@@ -92,7 +92,7 @@ void NORETURN CDECL error(const char *str, ...);
// * Warning: DO NOT enable this unless you understand what it does
// **************
-//#define RANDOM_DEBUG
+#define RANDOM_DEBUG
#ifdef RANDOM_DEBUG
#define Random() DoRandom(__LINE__, __FILE__)
diff --git a/misc.c b/misc.c
index 648233973..155c21db8 100644
--- a/misc.c
+++ b/misc.c
@@ -609,8 +609,6 @@ void IncreaseDate(void)
return;
_date_fract = 0;
- printf("%d\n", _frame_counter);
-
/* yeah, increse day counter and call various daily loops */
_date++;