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

Method EditCursor

engine/Poseidon/Game/Editor.cpp:152–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152EditCursor::EditCursor(RString ip)
153 : _camDistance(DefCamDistance), _camHeight(DefCamHeight), _heading(0), _dive(DefDive), _bank(0), _visible(true),
154 _cameraOnEdit(true), Vehicle(Shapes.New("data3d\\kursor.p3d", false, true), VehicleTypes.New("EditCursor"), -1)
155{
156 _animCameraMoved = Glob.time - 60;
157 _animCameraUpdated = Glob.time;
158
159 Matrix3Val rotY = Matrix3(MRotationY, _heading);
160 Matrix3Val rotX = Matrix3(MRotationX, _dive);
161 Matrix3Val rot = rotY * rotX;
162 SetOrientation(rot);
163
164 m_wFlags = MODE_NORMAL;
165 m_bOldMouseL = false;
166 m_bOldMouseR = false;
167 m_bMagnetize = false;
168 _showNode = false;
169
170 m_Selection.m_pOwner = this;
171
172 m_ptStart = VZero;
173 m_ptCurrent = VZero;
174
175#ifdef _WIN32
176 WSADATA data;
177 WSAStartup(0x0101, &data);
178#endif
179
180 _socketSend = INVALID_SOCKET;
181
182 _ip = ip;
183 _connected = ip.GetLength() > 0 ? TryToConnect(ip, _socketSend) : false;
184}
185
186EditCursor::~EditCursor()
187{

Callers

nothing calls this directly

Calls 3

TryToConnectFunction · 0.85
NewMethod · 0.45
GetLengthMethod · 0.45

Tested by

no test coverage detected