MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / OnTrigAddToCurface

Method OnTrigAddToCurface

editor/TriggerDialog.cpp:401–413  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

399}
400
401void CTriggerDialog::OnTrigAddToCurface() {
402 ASSERT(!(Curroomp->faces[Curface].flags & FF_HAS_TRIGGER));
403
404 char name[TRIG_NAME_LEN + 1] = "";
405
406 if (!InputString(name, sizeof(name), "Trigger Name", "Enter a name for this trigger"))
407 return;
408
409 int activator = (Curroomp->faces[Curface].portal_num != -1) ? AF_PLAYER : AF_PLAYER_WEAPON;
410
411 Current_trigger = AddTrigger(name, ROOMNUM(Curroomp), Curface, activator, NULL);
412 UpdateDialog();
413}
414
415void SetCurroomFromTrigger() {
416 if (ROOMNUM(Curroomp) != Triggers[Current_trigger].roomnum) {

Callers

nothing calls this directly

Calls 2

InputStringFunction · 0.85
AddTriggerFunction · 0.85

Tested by

no test coverage detected