MCPcopy Create free account
hub / github.com/Meridian59/Meridian59 / CmMiscVAddLineDef

Method CmMiscVAddLineDef

roomedit/source/editcli.cpp:3365–3396  ·  view source on GitHub ↗

//////////////////////////////////////////////////////////////// TEditorClient -------------

Source from the content-addressed store, hash-verified

3363// -------------
3364//
3365void TEditorClient::CmMiscVAddLineDef ()
3366{
3367 // Ignore if "insert object" mode
3368 if ( InsertingObject )
3369 return;
3370
3371 SET_HELP_CONTEXT(Add_a_LineDef_and_split_Sector);
3372
3373 // Check two object selected
3374 if ( CheckSelection (2, 2) == FALSE )
3375 goto End;
3376
3377 // UNDO
3378 StartUndoRecording("Add LineDef");
3379
3380 // Add LineDef and Split sector
3381 SplitSector (Selected->objnum, Selected->next->objnum);
3382
3383 // UNDO
3384 StopUndoRecording();
3385
3386 // SELECTION MAY BE NOT VALID
3387 // Forget selection to prevent invalid object numbers
3388 ForgetSelection (&Selected);
3389 CurObject = -1;
3390
3391 // Redraw map, info windows and status bar
3392 RefreshWindows();
3393
3394End:
3395 RESTORE_HELP_CONTEXT();
3396}
3397
3398
3399/////////////////////////////////////////////////////////////////////

Callers

nothing calls this directly

Calls 4

StartUndoRecordingFunction · 0.85
SplitSectorFunction · 0.85
StopUndoRecordingFunction · 0.85
ForgetSelectionFunction · 0.85

Tested by

no test coverage detected