first person rendering bugfix
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f25e64fd1c
commit
c085e34dbb
@ -1492,6 +1492,7 @@ Fix first person tree animation not nullchecking
|
||||
Fix yoga not applying on item drop window creation
|
||||
Fix client not destroying item on remove from inventory
|
||||
Tests for above bugs
|
||||
Fix rendering 3rd person model-attached entities drawing when in first person
|
||||
|
||||
|
||||
|
||||
|
||||
@ -279,6 +279,11 @@ public class MainContentPipeline implements RenderPipeline {
|
||||
entity == Globals.playerEntity &&
|
||||
!Globals.controlHandler.cameraIsThirdPerson()
|
||||
) ||
|
||||
(
|
||||
!Globals.controlHandler.cameraIsThirdPerson() &&
|
||||
AttachUtils.getParent(entity) != null &&
|
||||
AttachUtils.getParent(entity) == Globals.playerEntity
|
||||
) ||
|
||||
|
||||
//don't draw items if they're attached to viewmodel
|
||||
(
|
||||
|
||||
@ -10,6 +10,7 @@ import electrosphere.entity.Entity;
|
||||
import electrosphere.entity.EntityDataStrings;
|
||||
import electrosphere.entity.EntityTags;
|
||||
import electrosphere.entity.EntityUtils;
|
||||
import electrosphere.entity.state.attach.AttachUtils;
|
||||
import electrosphere.renderer.OpenGLState;
|
||||
import electrosphere.renderer.RenderPipelineState;
|
||||
import electrosphere.renderer.RenderingEngine;
|
||||
@ -114,9 +115,22 @@ public class NormalsForOutlinePipeline implements RenderPipeline {
|
||||
entity == Globals.firstPersonEntity ||
|
||||
|
||||
//don't draw third person view if camera is first person
|
||||
(
|
||||
entity == Globals.playerEntity &&
|
||||
!Globals.controlHandler.cameraIsThirdPerson()
|
||||
) ||
|
||||
(
|
||||
!Globals.controlHandler.cameraIsThirdPerson() &&
|
||||
entity == Globals.playerEntity
|
||||
AttachUtils.getParent(entity) != null &&
|
||||
AttachUtils.getParent(entity) == Globals.playerEntity
|
||||
) ||
|
||||
|
||||
//don't draw items if they're attached to viewmodel
|
||||
(
|
||||
Globals.firstPersonEntity != null &&
|
||||
!Globals.controlHandler.cameraIsThirdPerson() &&
|
||||
AttachUtils.hasParent(entity) &&
|
||||
AttachUtils.getParent(entity) == Globals.firstPersonEntity
|
||||
)
|
||||
;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user