Skip to content

Commit

Permalink
Update source to 4.8 compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
marynate committed Aug 1, 2015
1 parent b6929b4 commit fa9a662
Show file tree
Hide file tree
Showing 15 changed files with 173 additions and 235 deletions.
9 changes: 5 additions & 4 deletions FluidSurface/FluidSurface.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
"PluginFileVersion" : 3,

"FriendlyName" : "Fluid Surface Actor",
"Version" : 8,
"VersionName" : "0.1.0",
"Version" : 9,
"VersionName" : "0.1.2",
"CreatedBy" : "Ehamloptiran",
"CreatedByURL" : "[email protected]",
"EngineVersion" : 1579795,
"EngineVersion" : "4.8.0",
"Description" : "Simulated fluid surface actor",
"Category" : "Programming Rendering.Plugins",
"Category" : "Rendering",
"EnabledByDefault" : true,

"Modules" :
[
Expand Down
2 changes: 1 addition & 1 deletion FluidSurface/Source/FluidSurface/Private/FluidSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "FluidSurfacePrivatePCH.h"

class FFluidSurface : public IFluidSurface
class FFluidSurface : public IModuleInterface
{
/** IModuleInterface implementation */
virtual void StartupModule( ) override;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

#include "FluidSurfacePrivatePCH.h"

AFluidSurfaceActor::AFluidSurfaceActor( const class FPostConstructInitializeProperties& PCIP )
: Super( PCIP )
AFluidSurfaceActor::AFluidSurfaceActor(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
FluidSurfaceComponent = PCIP.CreateDefaultSubobject<UFluidSurfaceComponent>( this, TEXT( "FluidSurfaceComponent0" ) );
FluidSurfaceComponent = CreateDefaultSubobject<UFluidSurfaceComponent>(TEXT("FluidSurfaceComponent0"));
RootComponent = FluidSurfaceComponent;
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ inline bool UsingLowDetail( )
return ( Ret == 0 );
}

UFluidSurfaceComponent::UFluidSurfaceComponent( const FPostConstructInitializeProperties& PCIP )
: Super( PCIP )
UFluidSurfaceComponent::UFluidSurfaceComponent(const FObjectInitializer& ObjectInitializer)
: Super(ObjectInitializer)
{
PrimaryComponentTick.bCanEverTick = true;
bTickInEditor = true;
Expand Down Expand Up @@ -143,7 +143,7 @@ void UFluidSurfaceComponent::Init( )
p.Z = FLUIDBOXHEIGHT;
FluidBoundingBox += p;

PLingBuffer.Init( MAX_FLUID_PLINGS );
PLingBuffer.SetNumUninitialized(MAX_FLUID_PLINGS);
NumPLing = 0;

if( RenderData )
Expand Down Expand Up @@ -241,7 +241,7 @@ void UFluidSurfaceComponent::TickComponent( float DeltaTime, enum ELevelTick Tic
#endif

/* If this water hasn't been rendered for a while, stop updating */
if( GetWorld( )->TimeSeconds - LastRenderTime > 1 )
if (LastRenderTime > 0 && GetWorld()->TimeSeconds - LastRenderTime > 1)
return;

Time += DeltaTime;
Expand All @@ -257,7 +257,7 @@ void UFluidSurfaceComponent::TickComponent( float DeltaTime, enum ELevelTick Tic
CollisionShape.SetBox( FluidBoundingBox.GetExtent( ) );

/* Find overlapping actors */
GetWorld( )->OverlapMulti( OverlappingActors, GetComponentLocation( ), GetComponentQuat( ), ECC_WorldDynamic, CollisionShape, FCollisionQueryParams( false ) );
GetWorld()->OverlapMultiByChannel(OverlappingActors, GetComponentLocation(), GetComponentQuat(), ECC_WorldDynamic, CollisionShape, FCollisionQueryParams(false));

// @todo: handle better

Expand Down Expand Up @@ -354,7 +354,7 @@ void UFluidSurfaceComponent::UpdateBody( )
if( BodySetup == NULL )
{
/* Create physics body */
BodySetup = ConstructObject<UBodySetup>( UBodySetup::StaticClass( ), this );
BodySetup = NewObject<UBodySetup>(this, UBodySetup::StaticClass());
}

BodySetup->AggGeom.EmptyElements( );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#include "CoreUObject.h"
#include "Engine.h"

#include "IFluidSurface.h"
#include "FluidSurfaceEngine.h"
#include "FluidSurfaceActor.h"
#include "FluidSurfaceComponent.h"
Expand Down
Loading

0 comments on commit fa9a662

Please sign in to comment.