Skip to content

Commit

Permalink
Fixes for Mac & SkyDome
Browse files Browse the repository at this point in the history
- Removed all code that is not being used (was producing an error when
compiled on Mac)
-Fixed the Moon rotation bug
-Fixed the Time Scale, was being multiplied by 60 at scale = 1
TimeScale 1 will produce: 1sec real time == 1sec game time
  • Loading branch information
dotcamdev committed Sep 3, 2015
1 parent a981de1 commit b8e51f9
Show file tree
Hide file tree
Showing 11 changed files with 679 additions and 679 deletions.
Binary file modified Binaries/Win64/UE4Editor-OceanProject.dll
Binary file not shown.
Binary file modified Content/Experimental/Sky/BP_Sky.uasset
Binary file not shown.
Binary file modified Content/Maps/OceanExampleMap_01.umap
Binary file not shown.
Binary file modified Plugins/OceanPlugin/Binaries/Win64/UE4Editor-OceanPlugin.dll
Binary file not shown.
Binary file modified Plugins/OceanPlugin/Binaries/Win64/UE4Editor-OceanPlugin.pdb
Binary file not shown.
76 changes: 38 additions & 38 deletions Plugins/OceanPlugin/Source/OceanPlugin/Classes/Sky/SkyManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* Created by: DotCam
* Project name: OceanProject
* Unreal Engine version: 4.8.3
* Unreal Engine version: 4.9
* Created on: 2015/07/29
*
* Last Edited on: 2015/08/09
* Last Edited on: 2015/09/03
* Last Edited by: DotCam
*
* -------------------------------------------------
Expand All @@ -23,40 +23,40 @@
#include "OceanPluginPrivatePCH.h"
#include "Sky/TimeDate.h"
#include "Sky/TimeManager.h"
#include "SkyManager.generated.h"



UCLASS(Blueprintable, BlueprintType)
class ASkyManager : public AActor
{
GENERATED_UCLASS_BODY()

protected:

/**
* Name: Tick
* Description: Function called every frame on this Actor.
*
* @param: float DeltaTime - Game time elapsed since last call to Tick.
*/
//virtual void Tick(float DeltaTime) override;

public:

//virtual void OnConstruction(const FTransform& Transform) override;

UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Calendar")
ATimeManager* TimeManager;

//UPROPERTY(BlueprintReadOnly, Category = "Calendar")
//FTimeDate CurrentTime;



private:



};
//#include "SkyManager.generated.h"

//
//
// UCLASS(Blueprintable, BlueprintType)
// class ASkyManager : public AActor
// {
// GENERATED_UCLASS_BODY()
//
// protected:
//
// /**
// * Name: Tick
// * Description: Function called every frame on this Actor.
// *
// * @param: float DeltaTime - Game time elapsed since last call to Tick.
// */
// //virtual void Tick(float DeltaTime) override;
//
// public:
//
// //virtual void OnConstruction(const FTransform& Transform) override;
//
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Calendar")
// ATimeManager* TimeManager;
//
// //UPROPERTY(BlueprintReadOnly, Category = "Calendar")
// //FTimeDate CurrentTime;
//
//
//
// private:
//
//
//
// };

178 changes: 89 additions & 89 deletions Plugins/OceanPlugin/Source/OceanPlugin/Classes/Sky/TimeDate.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
*
* Created by: DotCam
* Project name: OceanProject
* Unreal Engine version: 4.8.3
* Unreal Engine version: 4.9
* Created on: 2015/07/29
*
* Last Edited on: 2015/08/24
* Last Edited on: 2015/09/03
* Last Edited by: DotCam
*
* -------------------------------------------------
Expand All @@ -27,53 +27,53 @@
#include "TimeDate.generated.h"


USTRUCT(BlueprintType)
struct FLocation
{
GENERATED_USTRUCT_BODY()

/**
* @Name: FLocation
* @Description: Constructs a new FLocation instance.
*/
FLocation() { FLocation(0.0f, 0.0f); }

/**
* @Name: FLocation
* @Description: Constructs a new FLocation instance.
*
* @param: float - Latitude value (-90 to +90)
* @param: float - Longitude value (-180 to +180)
*/
FLocation(float latitude, float longitude) { Latitude = latitude; Longitude = longitude > 180.0f ? longitude - 360.0f : longitude; }

// The latitude coordinate for the local location (valid value range -90 to +90 degrees).
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Location")
float Latitude;

// The longitude coordinate for the local location (valid value range -180 to +180 degrees).
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Location")
float Longitude;

// Direction for calculating the Longitude value (East [false] = 0 to 180, West [true] = 180 to 360)
//UPROPERTY(BlueprintReadOnly, Category = "Location")
//bool IsLongitudeWest = Longitude < 0;

// Direction for calculating the Latitude value (North [false] = 0 to +90, South [true] = 0 to -90)
//UPROPERTY(BlueprintReadOnly, Category = "Location")
//bool IsLatitudeSouth = Latitude < 0;

bool operator==(const FLocation& other) const
{
return (Latitude == other.Latitude) && (Longitude == other.Longitude);
}

bool operator!=(const FLocation& other) const
{
return (Latitude != other.Latitude) || (Longitude != other.Longitude);
}

};
// USTRUCT(BlueprintType)
// struct FLocation
// {
// GENERATED_USTRUCT_BODY()
//
// /**
// * @Name: FLocation
// * @Description: Constructs a new FLocation instance.
// */
// FLocation() { FLocation(0.0f, 0.0f); }
//
// /**
// * @Name: FLocation
// * @Description: Constructs a new FLocation instance.
// *
// * @param: float - Latitude value (-90 to +90)
// * @param: float - Longitude value (-180 to +180)
// */
// FLocation(float latitude, float longitude) { Latitude = latitude; Longitude = longitude > 180.0f ? longitude - 360.0f : longitude; }
//
// // The latitude coordinate for the local location (valid value range -90 to +90 degrees).
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Location")
// float Latitude;
//
// // The longitude coordinate for the local location (valid value range -180 to +180 degrees).
// UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Location")
// float Longitude;
//
// // Direction for calculating the Longitude value (East [false] = 0 to 180, West [true] = 180 to 360)
// //UPROPERTY(BlueprintReadOnly, Category = "Location")
// //bool IsLongitudeWest = Longitude < 0;
//
// // Direction for calculating the Latitude value (North [false] = 0 to +90, South [true] = 0 to -90)
// //UPROPERTY(BlueprintReadOnly, Category = "Location")
// //bool IsLatitudeSouth = Latitude < 0;
//
// bool operator==(const FLocation& other) const
// {
// return (Latitude == other.Latitude) && (Longitude == other.Longitude);
// }
//
// bool operator!=(const FLocation& other) const
// {
// return (Latitude != other.Latitude) || (Longitude != other.Longitude);
// }
//
// };



Expand Down Expand Up @@ -122,46 +122,46 @@ struct FTimeDate

// The following functions are only used in code.


bool IsEqual(const FTimeDate& other) const
{
return (Year == other.Year) && (Month == other.Month) && (Day == other.Day) &&
(Hour == other.Hour) && (Minute == other.Minute) && (Second == other.Second);
}

bool operator==(const FTimeDate& other) const
{
return IsEqual(other);
}

bool operator!=(const FTimeDate& other) const
{
return !IsEqual(other);
}

bool operator>(const FTimeDate& other) const
{
return (Year > other.Year) || (Month > other.Month) || (Day > other.Day) ||
(Hour > other.Hour) || (Minute > other.Minute) || (Second > other.Second);
}

bool operator>=(const FTimeDate& other) const
{
return IsEqual(other) || (Year > other.Year) || (Month > other.Month) || (Day > other.Day) ||
(Hour > other.Hour) || (Minute > other.Minute) || (Second > other.Second);
}

bool operator<(const FTimeDate& other) const
{
return (Year < other.Year) || (Month < other.Month) || (Day < other.Day) ||
(Hour < other.Hour) || (Minute < other.Minute) || (Second < other.Second);
}

bool operator<=(const FTimeDate& other) const
{
return IsEqual(other) || (Year < other.Year) || (Month < other.Month) || (Day < other.Day) ||
(Hour < other.Hour) || (Minute < other.Minute) || (Second < other.Second);
}
//
// bool IsEqual(const FTimeDate& other) const
// {
// return (Year == other.Year) && (Month == other.Month) && (Day == other.Day) &&
// (Hour == other.Hour) && (Minute == other.Minute) && (Second == other.Second);
// }
//
// bool operator==(const FTimeDate& other) const
// {
// return IsEqual(other);
// }
//
// bool operator!=(const FTimeDate& other) const
// {
// return !IsEqual(other);
// }
//
// bool operator>(const FTimeDate& other) const
// {
// return (Year > other.Year) || (Month > other.Month) || (Day > other.Day) ||
// (Hour > other.Hour) || (Minute > other.Minute) || (Second > other.Second);
// }
//
// bool operator>=(const FTimeDate& other) const
// {
// return IsEqual(other) || (Year > other.Year) || (Month > other.Month) || (Day > other.Day) ||
// (Hour > other.Hour) || (Minute > other.Minute) || (Second > other.Second);
// }
//
// bool operator<(const FTimeDate& other) const
// {
// return (Year < other.Year) || (Month < other.Month) || (Day < other.Day) ||
// (Hour < other.Hour) || (Minute < other.Minute) || (Second < other.Second);
// }
//
// bool operator<=(const FTimeDate& other) const
// {
// return IsEqual(other) || (Year < other.Year) || (Month < other.Month) || (Day < other.Day) ||
// (Hour < other.Hour) || (Minute < other.Minute) || (Second < other.Second);
// }
};


Loading

0 comments on commit b8e51f9

Please sign in to comment.