mirror of
https://github.com/DrBeef/QuestZDoom.git
synced 2025-03-04 08:31:49 +00:00
Prevent crash on death with laser sight active
This commit is contained in:
parent
dd81030375
commit
e76886f7f3
1 changed files with 5 additions and 3 deletions
|
@ -273,10 +273,12 @@ namespace s3d
|
|||
|
||||
bool OculusQuestMode::GetHandTransform(int hand, VSMatrix* mat) const
|
||||
{
|
||||
AActor* playermo = r_viewpoint.camera->player->mo;
|
||||
DVector3 pos = playermo->InterpolatedPosition(r_viewpoint.TicFrac);
|
||||
|
||||
player_t *player = r_viewpoint.camera->player;
|
||||
if (player)
|
||||
{
|
||||
AActor* playermo = player->mo;
|
||||
DVector3 pos = playermo->InterpolatedPosition(r_viewpoint.TicFrac);
|
||||
|
||||
mat->loadIdentity();
|
||||
|
||||
mat->translate(pos.X, pos.Z, pos.Y);
|
||||
|
|
Loading…
Reference in a new issue