Chunnel patch 28392: Add: Basic tunnel pool. (no save)

https://www.tt-forums.net/viewtopic.php?p=1183416#p1183416
This commit is contained in:
HackaLittleBit
2017-03-04 11:43:45 +00:00
committed by Jonathan G Rennison
parent 54494a0a7c
commit ad070b91ea
6 changed files with 94 additions and 9 deletions

View File

@@ -12,8 +12,21 @@
#include "stdafx.h"
#include "tunnelbridge_map.h"
#include "core/pool_func.hpp"
#include "safeguards.h"
/** All tunnel portals tucked away in a pool. */
TunnelPool _tunnel_pool("Tunnel");
INSTANTIATE_POOL_METHODS(Tunnel)
/**
* Clean up a tunnel tile
*/
Tunnel::~Tunnel()
{
if (CleaningPool()) return;
}
/**
* Gets the other end of the tunnel. Where a vehicle would reappear when it