MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / updateCamera

Method updateCamera

plugins/dm.gameconnection/GameConnection.cpp:495–513  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493}
494
495void GameConnection::updateCamera()
496{
497 try {
498 auto& camera = GlobalCameraManager().getActiveView();
499
500 Vector3 orig = camera.getCameraOrigin();
501 Vector3 angles = camera.getCameraAngles();
502
503 _cameraOutData[0] = orig;
504 _cameraOutData[1] = angles;
505 //note: the update is not necessarily sent right now
506 _cameraOutPending = true;
507 }
508 catch (const std::runtime_error&) {
509 // no camera
510 }
511
512 think();
513}
514
515bool GameConnection::sendPendingCameraUpdate()
516{

Callers

nothing calls this directly

Calls 1

getActiveViewMethod · 0.80

Tested by

no test coverage detected