TBTR: Add sanity check assertions

This commit is contained in:
Jonathan G Rennison
2018-01-29 18:47:31 +00:00
parent 40c99956ed
commit 233b0f8e9e
3 changed files with 9 additions and 0 deletions

View File

@@ -1072,6 +1072,8 @@ void CallVehicleTicks()
for (TemplateReplacementMap::iterator it = _vehicles_to_templatereplace.Begin(); it != _vehicles_to_templatereplace.End(); it++) {
Train *t = it->first;
assert(!_vehicles_to_autoreplace.Contains(t));
/* Store the position of the effect as the vehicle pointer will become invalid later */
int x = t->x_pos;
int y = t->y_pos;