Skip to content

Instantly share code, notes, and snippets.

@andythenorth
Created March 4, 2018 14:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andythenorth/714d522c9c135c66cc3e96f81a81cba3 to your computer and use it in GitHub Desktop.
Save andythenorth/714d522c9c135c66cc3e96f81a81cba3 to your computer and use it in GitHub Desktop.
NRT cache invalidation on change of type
diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp
index 3b30c4fc4..2fea6ce25 100644
--- a/src/roadveh_cmd.cpp
+++ b/src/roadveh_cmd.cpp
@@ -1310,6 +1310,7 @@ again:
if (GetRoadType(old_tile, v->rtid.basetype) != GetRoadType(tile, v->rtid.basetype)) {
v->First()->CargoChanged();
+ RoadVehUpdateCache(v);
}
}
if (new_dir != v->direction) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment