MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / ProcessCheats

Method ProcessCheats

engine/Poseidon/UI/Map/UIMapExt.cpp:1647–1668  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1645}
1646
1647void CStaticMapArcade::ProcessCheats()
1648{
1649#if _ENABLE_CHEATS
1650 auto& input = InputSubsystem::Instance();
1651 if (input.GetActionToDo(UAFire))
1652 {
1653 QOFStream out;
1654
1655 float mouseX = 0.5 + input.GetCursorX() * 0.5;
1656 float mouseY = 0.5 + input.GetCursorY() * 0.5;
1657 Vector3 pos = ScreenToWorld(DrawCoord(mouseX, mouseY));
1658
1659 char buf[1024];
1660 snprintf(buf, sizeof(buf), "[%.3f,%.3f,%.3f]\r\n", pos.X(), pos.Z(), pos.Y());
1661 out.write(buf, strlen(buf));
1662
1663 out.export_clip("clipboard.txt");
1664 }
1665#endif
1666
1667 CStaticMapArcadeViewer::ProcessCheats();
1668}
1669
1670static int CharRPos(const char* t, char c)
1671{

Callers

nothing calls this directly

Calls 8

GetActionToDoMethod · 0.80
export_clipMethod · 0.80
GetCursorXMethod · 0.45
GetCursorYMethod · 0.45
XMethod · 0.45
ZMethod · 0.45
YMethod · 0.45
writeMethod · 0.45

Tested by

no test coverage detected