Template replacement usage of scope guard logging.

This commit is contained in:
Jonathan G Rennison
2016-02-17 21:29:49 +00:00
parent 5dba89c783
commit 1e9ab8e64e

View File

@@ -1121,6 +1121,8 @@ void CallVehicleTicks()
for (TemplateReplacementMap::iterator it = _vehicles_to_templatereplace.Begin(); it != _vehicles_to_templatereplace.End(); it++) {
Train *t = it->first;
SCOPE_INFO_FMT([t], "CallVehicleTicks: template replace: %s", DumpVehicleInfo(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;