summaryrefslogtreecommitdiff
path: root/src/effectvehicle.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-08-20 16:51:08 +0000
committerglx <glx@openttd.org>2008-08-20 16:51:08 +0000
commit28fb23ca561846aafb502e217401b2a736520254 (patch)
treef72258e549e70e16172e65a32a295599e68c638e /src/effectvehicle.cpp
parentc45a143e276d2e732d736d7353b96eb8cf537243 (diff)
downloadopenttd-28fb23ca561846aafb502e217401b2a736520254.tar.xz
(svn r14110) -Fix: desyncs due to bubbles in toyland
Diffstat (limited to 'src/effectvehicle.cpp')
-rw-r--r--src/effectvehicle.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/effectvehicle.cpp b/src/effectvehicle.cpp
index 9ea2e6ca3..32482adf8 100644
--- a/src/effectvehicle.cpp
+++ b/src/effectvehicle.cpp
@@ -515,12 +515,6 @@ static const BubbleMovement * const _bubble_movement[] = {
static void BubbleTick(Vehicle *v)
{
- /*
- * Warning: those effects can NOT use Random(), and have to use
- * InteractiveRandom(), because somehow someone forgot to save
- * spritenum to the savegame, and so it will cause desyncs in
- * multiplayer!! (that is: in ToyLand)
- */
uint et;
v->progress++;
@@ -536,7 +530,7 @@ static void BubbleTick(Vehicle *v)
return;
}
if (v->u.effect.animation_substate != 0) {
- v->spritenum = GB(InteractiveRandom(), 0, 2) + 1;
+ v->spritenum = GB(Random(), 0, 2) + 1;
} else {
v->spritenum = 6;
}
@@ -554,7 +548,7 @@ static void BubbleTick(Vehicle *v)
}
if (b->y == 4 && b->x == 1) {
- if (v->z_pos > 180 || Chance16I(1, 96, InteractiveRandom())) {
+ if (v->z_pos > 180 || Chance16I(1, 96, Random())) {
v->spritenum = 5;
SndPlayVehicleFx(SND_2F_POP, v);
}