Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
RWTH VR Toolkit
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Plugins
RWTH VR Toolkit
Commits
965a3f01
Commit
965a3f01
authored
11 months ago
by
David Gilbert
Browse files
Options
Downloads
Patches
Plain Diff
refactor(replication, pawn): Removes leftover code from DCRA attachment process.
parent
dc683d38
No related branches found
No related tags found
1 merge request
!93
feature(replication, pawn): Adds (initial) different way to attach DCRA to...
Pipeline
#432551
failed
11 months ago
Stage: analyze
Stage: generate
Stage: build
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
+5
-45
5 additions, 45 deletions
Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
Source/RWTHVRToolkit/Public/Pawn/RWTHVRPawn.h
+1
-5
1 addition, 5 deletions
Source/RWTHVRToolkit/Public/Pawn/RWTHVRPawn.h
with
6 additions
and
50 deletions
Source/RWTHVRToolkit/Private/Pawn/RWTHVRPawn.cpp
+
5
−
45
View file @
965a3f01
...
...
@@ -65,14 +65,12 @@ void ARWTHVRPawn::NotifyControllerChanged()
{
Super
::
NotifyControllerChanged
();
UE_LOG
(
Toolkit
,
Display
,
TEXT
(
"ARWTHVRPawn: Player Controller has changed, trying to change DCRA attachment if possible..."
));
// Try and use PlayerType for this:
if
(
HasAuthority
())
{
UE_LOG
(
Toolkit
,
Display
,
TEXT
(
"ARWTHVRPawn: Player Controller has changed, trying to change DCRA attachment if possible..."
));
if
(
const
ARWTHVRPlayerState
*
State
=
GetPlayerState
<
ARWTHVRPlayerState
>
())
{
const
EPlayerType
Type
=
State
->
GetPlayerType
();
...
...
@@ -86,37 +84,6 @@ void ARWTHVRPawn::NotifyControllerChanged()
}
}
}
/*
// Only do this for all local controlled pawns
if (IsLocallyControlled())
{
UE_LOG(Toolkit, Display,
TEXT("ARWTHVRPawn: Player Controller has changed for local pawn, trying to change DCRA attachment if "
"possible..."));
// Only do this for the primary node or when we're running in standalone
if (URWTHVRUtilities::IsRoomMountedMode() &&
(URWTHVRUtilities::IsPrimaryNode() || GetNetMode() == NM_Standalone))
{
UE_LOG(Toolkit, Display,
TEXT("ARWTHVRPawn: We're the primary node, we want the DCRA attached to our pawn."));
// If we are also the authority (standalone or listen server), directly attach it to us.
// If we are not (client), ask the server to do it.
if (HasAuthority())
{
UE_LOG(Toolkit, Display, TEXT("ARWTHVRPawn: We have authority, do the attachment."));
AttachDCRAtoPawn();
}
else
{
UE_LOG(Toolkit, Display, TEXT("ARWTHVRPawn: We don't have authority, ask the sercer to attach."));
ServerAttachDCRAtoPawnRpc();
}
}
}
*/
}
void
ARWTHVRPawn
::
SetupPlayerInputComponent
(
UInputComponent
*
PlayerInputComponent
)
...
...
@@ -132,7 +99,8 @@ void ARWTHVRPawn::SetupPlayerInputComponent(UInputComponent* PlayerInputComponen
return
;
}
UE_LOGFMT
(
Toolkit
,
Display
,
"SetupPlayerInputComponent: Player Controller is valid, setting up input for {Pawn}"
,
GetName
());
UE_LOGFMT
(
Toolkit
,
Display
,
"SetupPlayerInputComponent: Player Controller is valid, setting up input for {Pawn}"
,
GetName
());
// Set the control rotation of the PC to zero again. There is a small period of 2 frames where, when the pawn gets
...
...
@@ -283,7 +251,6 @@ void ARWTHVRPawn::MulticastAddDCSyncComponent_Implementation()
#endif
}
// Todo rewrite this in some other way or attach it differently, this is horrible
// Executed on the server only: Finds and attaches the CaveSetup Actor, which contains the DCRA to the Pawn.
// It is only executed on the server because attachments are synced to all clients, but not from client to server.
void
ARWTHVRPawn
::
AttachDCRAtoPawn
()
...
...
@@ -335,13 +302,6 @@ void ARWTHVRPawn::SetupMotionControllerSources()
RightHand
->
SetTrackingMotionSource
(
MotionControllerSourceRight
);
}
// Requests the server to perform the attachment, as only the server can sync this to all the other clients.
void
ARWTHVRPawn
::
ServerAttachDCRAtoPawnRpc_Implementation
()
{
// We're on the server here - attach the actor to the pawn.
AttachDCRAtoPawn
();
}
void
ARWTHVRPawn
::
SetCameraOffset
()
const
{
// this also incorporates the BaseEyeHeight, if set as static offset,
...
...
This diff is collapsed.
Click to expand it.
Source/RWTHVRToolkit/Public/Pawn/RWTHVRPawn.h
+
1
−
5
View file @
965a3f01
...
...
@@ -103,10 +103,6 @@ protected:
/* Replicated functionality */
/* Ask the server to attach the DCRA to the correct pawn */
UFUNCTION
(
Reliable
,
Server
)
void
ServerAttachDCRAtoPawnRpc
();
/* Add a sync component to all instances of this pawn */
UFUNCTION
(
Reliable
,
NetMulticast
)
void
MulticastAddDCSyncComponent
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment