MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / OnPlaceObject

Method OnPlaceObject

src/tree_gui.cpp:215–222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213 }
214
215 void OnPlaceObject([[maybe_unused]] Point pt, TileIndex tile) override
216 {
217 if (_game_mode != GM_EDITOR && this->mode == PM_NORMAL) {
218 VpStartPlaceSizing(tile, VPM_X_AND_Y, DDSP_PLANT_TREES);
219 } else {
220 VpStartDragging(DDSP_PLANT_TREES);
221 }
222 }
223
224 void OnPlaceDrag(ViewportPlaceMethod select_method, [[maybe_unused]] ViewportDragDropSelectionProcess select_proc, [[maybe_unused]] Point pt) override
225 {

Callers

nothing calls this directly

Calls 2

VpStartPlaceSizingFunction · 0.85
VpStartDraggingFunction · 0.85

Tested by

no test coverage detected