MCPcopy Create free account
hub / github.com/OpenDriver2/REDRIVER2 / Debug_AddLineOfs

Function Debug_AddLineOfs

src_rebuild/utils/DebugOverlay.cpp:253–279  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253void Debug_AddLineOfs(VECTOR& pointA, VECTOR& pointB, VECTOR& ofs, CVECTOR& color)
254{
255 if (gDebug_numLines + 1 > 512)
256 return;
257
258 int dx = camera_position.vx - ofs.vx;
259 int dz = camera_position.vz - ofs.vz;
260
261 if (dx * dx + dz * dz > (15000 * 15000))
262 return;
263
264 LineDef_t& ld = gDebug_Lines[gDebug_numLines++];
265 ld.posA = pointA;
266 ld.posB = pointB;
267 ld.color = color;
268
269 ld.posA.vx += ofs.vx;
270 ld.posA.vy += ofs.vy;
271 ld.posA.vz += ofs.vz;
272
273 ld.posB.vx += ofs.vx;
274 ld.posB.vy += ofs.vy;
275 ld.posB.vz += ofs.vz;
276
277 ld.posA.vy *= -1;
278 ld.posB.vy *= -1;
279}
280
281int g_FreeCameraControls = 0;
282int g_FreeCameraEnabled = 0;

Callers 11

LeadPadResponseFunction · 0.85
UpdateRoadPositionFunction · 0.85
CarBuildingCollisionFunction · 0.85
SetupTannerSkeletonFunction · 0.85
newShowTannerFunction · 0.85
CivControlFunction · 0.85
CellEmptyFunction · 0.85
lineClearFunction · 0.85
FindPointOfCollisionFunction · 0.85
CopControl1Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected