@@ -237,7 +237,7 @@ protected void UpdateInput()
237237 UpdateLookInput ( ) ;
238238 UpdateWASDInput ( ) ;
239239 PlayerCharacterEntity . SetExtraMovement ( isSprinting ? ExtraMovementState . IsSprinting : ExtraMovementState . None ) ;
240- PlayerCharacterEntity . AimPosition = PlayerCharacterEntity . GetDefaultAttackAimPosition ( ref isLeftHandAttacking ) ;
240+ PlayerCharacterEntity . AimPosition = PlayerCharacterEntity . GetAttackAimPosition ( ref isLeftHandAttacking ) ;
241241 }
242242
243243 protected void UpdateWASDInput ( )
@@ -413,7 +413,7 @@ protected void ReloadAmmo()
413413 PlayerCharacterEntity . Reload ( true ) ;
414414 }
415415
416- public override void UseHotkey ( HotkeyType type , string relateId , Vector3 ? aimPosition )
416+ public override void UseHotkey ( HotkeyType type , string relateId , AimPosition aimPosition )
417417 {
418418 ClearQueueUsingSkill ( ) ;
419419 switch ( type )
@@ -427,7 +427,7 @@ public override void UseHotkey(HotkeyType type, string relateId, Vector3? aimPos
427427 }
428428 }
429429
430- protected void UseSkill ( string id , Vector3 ? aimPosition )
430+ protected void UseSkill ( string id , AimPosition aimPosition )
431431 {
432432 BaseSkill skill ;
433433 short skillLevel ;
@@ -437,14 +437,13 @@ protected void UseSkill(string id, Vector3? aimPosition)
437437 return ;
438438
439439 bool isAttackSkill = skill . IsAttack ( ) ;
440- AimPosition skillAimPosition = AimPosition . Create ( aimPosition ) ;
441- if ( PlayerCharacterEntity . UseSkill ( skill . DataId , isLeftHandAttacking , skillAimPosition ) && isAttackSkill )
440+ if ( PlayerCharacterEntity . UseSkill ( skill . DataId , isLeftHandAttacking , aimPosition ) && isAttackSkill )
442441 {
443442 isLeftHandAttacking = ! isLeftHandAttacking ;
444443 }
445444 }
446445
447- protected void UseItem ( string id , Vector3 ? aimPosition )
446+ protected void UseItem ( string id , AimPosition aimPosition )
448447 {
449448 int itemIndex ;
450449 BaseItem item ;
@@ -495,8 +494,7 @@ protected void UseItem(string id, Vector3? aimPosition)
495494 else if ( item . IsSkill ( ) )
496495 {
497496 bool isAttackSkill = ( item as ISkillItem ) . UsingSkill . IsAttack ( ) ;
498- AimPosition skillAimPosition = AimPosition . Create ( aimPosition ) ;
499- if ( PlayerCharacterEntity . UseSkillItem ( ( short ) itemIndex , isLeftHandAttacking , skillAimPosition ) && isAttackSkill )
497+ if ( PlayerCharacterEntity . UseSkillItem ( ( short ) itemIndex , isLeftHandAttacking , aimPosition ) && isAttackSkill )
500498 {
501499 isLeftHandAttacking = ! isLeftHandAttacking ;
502500 }
@@ -537,7 +535,7 @@ public Vector3 GetMoveDirection(float horizontalInput, float verticalInput)
537535 return moveDirection ;
538536 }
539537
540- public override Vector3 ? UpdateBuildAimControls ( Vector2 aimAxes , BuildingEntity prefab )
538+ public override AimPosition UpdateBuildAimControls ( Vector2 aimAxes , BuildingEntity prefab )
541539 {
542540 // Instantiate constructing building
543541 if ( ConstructingBuildingEntity == null )
@@ -576,7 +574,7 @@ public Vector3 GetMoveDirection(float horizontalInput, float verticalInput)
576574 FindAndSetBuildingAreaByAxes ( aimAxes ) ;
577575 else
578576 FindAndSetBuildingAreaByMousePosition ( ) ;
579- return ConstructingBuildingEntity . Position ;
577+ return AimPosition . CreatePosition ( ConstructingBuildingEntity . Position ) ;
580578 }
581579
582580 public override void FinishBuildAimControls ( bool isCancel )
0 commit comments