This repository has been archived by the owner on Apr 27, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VehicleHandler #12 - Fixing few ConsoleOutput bugs, Removing Comand m…
…anager test function, Removing last Mapping tests
- Loading branch information
Showing
16 changed files
with
112 additions
and
192 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 0 additions & 20 deletions
20
EvoMp/EvoMp.Module.TestModule/Server/TestNotInitializedClass.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 26 additions & 25 deletions
51
EvoMp/EvoMp.Module.VehicleHandler/Server/Entity/Mapping.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
using AutoMapper; | ||
using GrandTheftMultiplayer.Shared.Math; | ||
|
||
namespace EvoMp.Module.VehicleHandler.Server.Entity | ||
{ | ||
public class Mapping : Profile | ||
public class Mapping | ||
{ | ||
public Mapping() | ||
{ | ||
#region Vehicle Position & Rotation | ||
// VehicleMap to VehicleDto | ||
CreateMap<VehicleMap, VehicleDto>() | ||
.ForMember(dest => dest.Position, | ||
mapExpession => mapExpession.MapFrom(source => new Vector3(source.X, source.Y, source.Z))) | ||
.ForMember(destination => destination.Rotation, | ||
mapExpression => mapExpression.MapFrom(source => new Vector3(source.Xr, source.Yr, source.Zr))); | ||
|
||
// VehicleDto to VehicleMap | ||
CreateMap<VehicleDto, VehicleMap>() | ||
.ForMember(destination => destination.X, | ||
mapExpression => mapExpression.MapFrom(source => source.Position.X)) | ||
.ForMember(destination => destination.Y, | ||
mapExpression => mapExpression.MapFrom(source => source.Position.Y)) | ||
.ForMember(destination => destination.Z, | ||
mapExpression => mapExpression.MapFrom(source => source.Position.Z)) | ||
.ForMember(destination => destination.Xr, | ||
mapExpression => mapExpression.MapFrom(source => source.Rotation.X)) | ||
.ForMember(destination => destination.Yr, | ||
mapExpression => mapExpression.MapFrom(source => source.Rotation.Y)) | ||
.ForMember(destination => destination.Zr, | ||
mapExpression => mapExpression.MapFrom(source => source.Rotation.Z)); | ||
#endregion //Vehicle Position & Rotation | ||
//TODO: Remove if new solution works | ||
/* #region Vehicle Position & Rotation | ||
// VehicleMap to VehicleDto | ||
CreateMap<VehicleMap, VehicleDto>() | ||
.ForMember(dest => dest.Position, | ||
mapExpession => mapExpession.MapFrom(source => new Vector3(source.X, source.Y, source.Z))) | ||
.ForMember(destination => destination.Rotation, | ||
mapExpression => mapExpression.MapFrom(source => new Vector3(source.Xr, source.Yr, source.Zr))); | ||
// VehicleDto to VehicleMap | ||
CreateMap<VehicleDto, VehicleMap>() | ||
.ForMember(destination => destination.X, | ||
mapExpression => mapExpression.MapFrom(source => source.Position.X)) | ||
.ForMember(destination => destination.Y, | ||
mapExpression => mapExpression.MapFrom(source => source.Position.Y)) | ||
.ForMember(destination => destination.Z, | ||
mapExpression => mapExpression.MapFrom(source => source.Position.Z)) | ||
.ForMember(destination => destination.Xr, | ||
mapExpression => mapExpression.MapFrom(source => source.Rotation.X)) | ||
.ForMember(destination => destination.Yr, | ||
mapExpression => mapExpression.MapFrom(source => source.Rotation.Y)) | ||
.ForMember(destination => destination.Zr, | ||
mapExpression => mapExpression.MapFrom(source => source.Rotation.Z)); | ||
#endregion //Vehicle Position & Rotation | ||
*/ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.