mirror of
https://github.com/Jous99/F4MP.git
synced 2026-01-13 03:30:52 +01:00
18 lines
429 B
C++
18 lines
429 B
C++
|
|
|
||
|
|
#include <Camera/TESCamera.h>
|
||
|
|
#include <NetImmerse/NiNode.h>
|
||
|
|
#include <TiltedOnlinePCH.h>
|
||
|
|
|
||
|
|
NiCamera* TESCamera::GetNiCamera()
|
||
|
|
{
|
||
|
|
POINTER_SKYRIMSE(NiRTTI, NiCameraRTTI, 410506);
|
||
|
|
// usually the first child should be the camera
|
||
|
|
for (auto* child : cameraNode->children)
|
||
|
|
{
|
||
|
|
if (child && child->GetRTTI() == NiCameraRTTI.Get())
|
||
|
|
return reinterpret_cast<NiCamera*>(child);
|
||
|
|
}
|
||
|
|
|
||
|
|
return nullptr;
|
||
|
|
}
|