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

Method OnObjectPlaceSoundSourceAtViewer

editor/MainFrm.cpp:3490–3507  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3488 Viewer_object->orient.fvec.y + 0.0005, Viewer_object->orient.fvec.z + 0.0005);
3489}
3490
3491void CMainFrame::OnObjectPlaceSoundSourceAtViewer() {
3492 int objnum;
3493
3494 objnum = ObjCreate(OBJ_SOUNDSOURCE, 0, Viewer_object->roomnum, &Viewer_object->pos, &Viewer_object->orient);
3495
3496 if (objnum == -1) {
3497 Int3();
3498 return;
3499 }
3500
3501 object *objp = &Objects[objnum];
3502 objp->ctype.soundsource_info.sound_index = -1;
3503 objp->ctype.soundsource_info.volume = 1.0;
3504
3505 EditorStatus("SoundSource created as object %d\n", objnum);
3506
3507 World_changed = 1;
3508}
3509
3510#include "OrphanRemoveDlg.h"

Callers

nothing calls this directly

Calls 2

ObjCreateFunction · 0.85
EditorStatusFunction · 0.85

Tested by

no test coverage detected