Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Core/Libraries/Source/WWVegas/WW3D2/hanim.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,7 @@ class HAnimClass : public RefCountClass, public HashableClass
virtual float Get_Frame_Rate() = 0;
virtual float Get_Total_Time() = 0;

// virtual Vector3 Get_Translation(int pividx,float frame) = 0;
// virtual Quaternion Get_Orientation(int pividx,float frame) = 0;
// Jani: Changed to pass in reference of destination to avoid copying
virtual void Get_Translation(int pividx,float frame) {} // todo: remove
virtual void Get_Orientation(int pividx,float frame) {} // todo: remove
virtual void Get_Translation(Vector3& translation, int pividx,float frame) const = 0;
virtual void Get_Orientation(Quaternion& orientation, int pividx,float frame) const = 0;
virtual void Get_Transform(Matrix3D&, int pividx, float frame) const = 0;
Expand Down
2 changes: 0 additions & 2 deletions Core/Libraries/Source/WWVegas/WW3D2/hcanim.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,6 @@ class HCompressedAnimClass : public HAnimClass
float Get_Total_Time() { return (float)NumFrames / FrameRate; }
int Get_Flavor() { return Flavor; }

// Vector3 Get_Translation(int pividx,float frame);
// Quaternion Get_Orientation(int pividx,float frame);
void Get_Translation(Vector3& translation, int pividx,float frame) const;
void Get_Orientation(Quaternion& orientation, int pividx,float frame) const;
void Get_Transform(Matrix3D& transform, int pividx,float frame) const;
Expand Down
11 changes: 10 additions & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/htree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
#include "wwmemlog.h"
#include "hrawanim.h"
#include "motchan.h"
#include "ww3d.h"

/***********************************************************************************************
* HTreeClass::HTreeClass -- constructor *
Expand Down Expand Up @@ -606,8 +607,16 @@ void HTreeClass::Anim_Update(const Matrix3D & root,HAnimClass * motion,float fra

/*Customized version of the above which excludes interpolation and assumes HRawAnimClass
For use by 'Generals' -MW*/
void HTreeClass::Anim_Update(const Matrix3D & root,HRawAnimClass * motion,float frame)
void HTreeClass::Anim_Update_Without_Interpolation(const Matrix3D & root,HRawAnimClass * motion,float frame)
{
if (WW3D::Get_Sync_Frame_Time() == 0 && (int)motion->Get_Frame_Rate() == WWSyncPerSecond)
{
// TheSuperHackers @tweak Keep the animation frame step in sync with the ww3d frame step if they can align.
// @todo This needs improving if the WWSyncPerSecond is changed or the animation frame rates can be larger.
static_assert(WWSyncPerSecond == 30, "This is currently catered to a 30 fps sync");
return;
}

PivotClass *pivot,*endpivot,*lastAnimPivot;

Pivot[0].Transform = root;
Expand Down
2 changes: 1 addition & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/htree.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class HTreeClass : public W3DMPO
void Anim_Update( const Matrix3D & root,
HAnimClass * motion,
float frame);
void Anim_Update(const Matrix3D & root,HRawAnimClass * motion,float frame);
void Anim_Update_Without_Interpolation(const Matrix3D & root,HRawAnimClass * motion,float frame);

void Blend_Update( const Matrix3D & root,
HAnimClass * motion0,
Expand Down
8 changes: 2 additions & 6 deletions Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1146,13 +1146,9 @@ void RingRenderObjClass::animate()
InnerScaleChannel.Get_Key_Count () > 0 ||
OuterScaleChannel.Get_Key_Count () > 0)
{
//
// Convert from milliseconds to seconds and normalize the time
//
if (AnimDuration > 0) {
float frametime = WW3D::Get_Frame_Time();
frametime = (frametime * 0.001F) / AnimDuration;
anim_time += frametime;
float frametime = WW3D::Get_Logic_Frame_Time_Seconds();
anim_time += frametime / AnimDuration;
} else {
anim_time = 1.0F;
}
Expand Down
10 changes: 2 additions & 8 deletions Core/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ SegLineRendererClass::SegLineRendererClass(void) :
NoiseAmplitude(0.0f),
MergeAbortFactor(1.5f),
TextureTileFactor(1.0f),
LastUsedSyncTime(WW3D::Get_Sync_Time()),
CurrentUVOffset(0.0f,0.0f),
UVOffsetDeltaPerMS(0.0f, 0.0f),
Bits(DEFAULT_BITS),
Expand All @@ -98,7 +97,6 @@ SegLineRendererClass::SegLineRendererClass(const SegLineRendererClass & that) :
NoiseAmplitude(0.0f),
MergeAbortFactor(1.5f),
TextureTileFactor(1.0f),
LastUsedSyncTime(that.LastUsedSyncTime),
CurrentUVOffset(0.0f,0.0f),
UVOffsetDeltaPerMS(0.0f, 0.0f),
Bits(DEFAULT_BITS),
Expand All @@ -120,7 +118,6 @@ SegLineRendererClass & SegLineRendererClass::operator = (const SegLineRendererCl
NoiseAmplitude = that.NoiseAmplitude;
MergeAbortFactor = that.MergeAbortFactor;
TextureTileFactor = that.TextureTileFactor;
LastUsedSyncTime = that.LastUsedSyncTime;
CurrentUVOffset = that.CurrentUVOffset;
UVOffsetDeltaPerMS = that.UVOffsetDeltaPerMS;
Bits = that.Bits;
Expand Down Expand Up @@ -201,7 +198,6 @@ void SegLineRendererClass::Set_Texture_Tile_Factor(float factor)

void SegLineRendererClass::Reset_Line(void)
{
LastUsedSyncTime = WW3D::Get_Sync_Time();
CurrentUVOffset.Set(0.0f,0.0f);
}

Expand All @@ -227,17 +223,15 @@ void SegLineRendererClass::Render
/*
** Handle texture UV offset animation (done once for entire line).
*/
unsigned int delta = WW3D::Get_Sync_Time() - LastUsedSyncTime;
float del = (float)delta;
Vector2 uv_offset = CurrentUVOffset + UVOffsetDeltaPerMS * del;
// TheSuperHackers @tweak The render update is now decoupled from the logic step.
Vector2 uv_offset = CurrentUVOffset + UVOffsetDeltaPerMS * WW3D::Get_Logic_Frame_Time_Milliseconds();

// ensure offsets are in [0, 1] range:
uv_offset.X = uv_offset.X - floorf(uv_offset.X);
uv_offset.Y = uv_offset.Y - floorf(uv_offset.Y);

// Update state
CurrentUVOffset = uv_offset;
LastUsedSyncTime = WW3D::Get_Sync_Time();

// Used later
TextureMapMode map_mode = Get_Texture_Mapping_Mode();
Expand Down
8 changes: 2 additions & 6 deletions Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1104,13 +1104,9 @@ void SphereRenderObjClass::animate (void)
ScaleChannel.Get_Key_Count () > 0 ||
VectorChannel.Get_Key_Count () > 0)
{
//
// Convert from milliseconds to seconds and normalize the time
//
if (AnimDuration > 0) {
float frametime = WW3D::Get_Frame_Time();
frametime = (frametime * 0.001F) / AnimDuration;
anim_time += frametime;
float frametime = WW3D::Get_Logic_Frame_Time_Seconds();
anim_time += frametime / AnimDuration;
} else {
anim_time = 1.0F;
}
Expand Down
6 changes: 6 additions & 0 deletions Core/Libraries/Source/WWVegas/WWLib/WWCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
#define ARRAY_SIZE(x) int(sizeof(x)/sizeof(x[0]))
#endif

enum
{
// TheSuperHackers @info The original WWSync was 33 ms, ~30 fps, integer.
// Changing this will require tweaking all Drawable code that concerns the ww3d time step, including locomotion physics.
WWSyncPerSecond = 30
};

#if defined(_MSC_VER) && _MSC_VER < 1300
typedef unsigned MemValueType;
Expand Down
11 changes: 7 additions & 4 deletions Core/Libraries/Source/WWVegas/WWLib/WWDefines.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@

#pragma once

// The WW3D Sync time. This was originally 33 ms, ~30 fps, integer.
// Changing or removing this will require tweaking all Drawable code that concerns logic time step, including locomotion physics.
#ifndef MSEC_PER_WWSYNC_FRAME
#define MSEC_PER_WWSYNC_FRAME (33)
// Enable translation and rotation interpolation for raw animation (HRawAnimClass) updates.
// This was intentionally disabled in the retail version, but likely not fully thought through.
// Interpolation is certainly desired for animations that move and rotate meshes, but may not be
// desired for animations that teleport meshes from one location to another, such as blinking lights.
// @todo Implement a new flag per animation file to opt-out of interpolation.
#ifndef WW3D_ENABLE_RAW_ANIM_INTERPOLATION
#define WW3D_ENABLE_RAW_ANIM_INTERPOLATION (1)
#endif
2 changes: 1 addition & 1 deletion Core/Tools/W3DView/GraphicView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,9 +453,9 @@

// Update the W3D frame times according to our elapsed tick count
if (ticks_to_use == 0) {
WW3D::Sync (WW3D::Get_Sync_Time() + (ticks_elapsed * m_animationSpeed));

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6-debug+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6-profile+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6-profile+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6-releaselog+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 456 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6-debug+t+e

'float' : forcing value to bool 'true' or 'false' (performance warning)
} else {
WW3D::Sync (WW3D::Get_Sync_Time() + ticks_to_use);

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6-debug+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6-profile+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build Generals / vc6+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6-profile+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6-releaselog+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)

Check warning on line 458 in Core/Tools/W3DView/GraphicView.cpp

View workflow job for this annotation

GitHub Actions / Build GeneralsMD / vc6-debug+t+e

'unsigned int' : forcing value to bool 'true' or 'false' (performance warning)
}

// Do we need to update the current animation?
Expand Down Expand Up @@ -546,7 +546,7 @@
//
// Let the audio class think
//
WWAudioClass::Get_Instance ()->On_Frame_Update (WW3D::Get_Frame_Time());
WWAudioClass::Get_Instance ()->On_Frame_Update (WW3D::Get_Logic_Frame_Time_Milliseconds());

//
// Update the count of particles and polys in the status bar
Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Include/Common/GameCommon.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
enum
{
BaseFps = 30, // The historic base frame rate for this game. This value must never change.
LOGICFRAMES_PER_SECOND = 30,
LOGICFRAMES_PER_SECOND = WWSyncPerSecond,
MSEC_PER_SECOND = 1000
};
const Real LOGICFRAMES_PER_MSEC_REAL = (((Real)LOGICFRAMES_PER_SECOND) / ((Real)MSEC_PER_SECOND));
Expand Down
5 changes: 2 additions & 3 deletions Generals/Code/GameEngine/Include/GameClient/Drawable.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class TintEnvelope : public MemoryPoolObject, public Snapshot
TintEnvelope(void);
void update(void); ///< does all the work
void play(const RGBColor *peak,
UnsignedInt atackFrames = DEF_ATTACK_FRAMES,
UnsignedInt attackFrames = DEF_ATTACK_FRAMES,
UnsignedInt decayFrames = DEF_DECAY_FRAMES,
UnsignedInt sustainAtPeak = DEF_SUSTAIN_FRAMES ); // ask MLorenzen
void sustain(void) { m_envState = ENVELOPE_STATE_SUSTAIN; }
Expand Down Expand Up @@ -231,7 +231,6 @@ enum DrawableStatus CPP_11(: DrawableStatusBits)
DRAWABLE_STATUS_NONE = 0x00000000, ///< no status
DRAWABLE_STATUS_DRAWS_IN_MIRROR = 0x00000001, ///< drawable can reflect
DRAWABLE_STATUS_SHADOWS = 0x00000002, ///< use setShadowsEnabled() access method
DRAWABLE_STATUS_TINT_COLOR_LOCKED = 0x00000004, ///< drawable tint color is "locked" and won't fade to normal
DRAWABLE_STATUS_NO_STATE_PARTICLES = 0x00000008, ///< do *not* auto-create particle systems based on model condition
DRAWABLE_STATUS_NO_SAVE = 0x00000010, ///< do *not* save this drawable (UI fluff only). ignored (error, actually) if attached to an object

Expand Down Expand Up @@ -372,7 +371,7 @@ class Drawable : public Thing,

Bool getDrawsInMirror() const { return BitIsSet(m_status, DRAWABLE_STATUS_DRAWS_IN_MIRROR) || isKindOf(KINDOF_CAN_CAST_REFLECTIONS); }

void colorFlash( const RGBColor *color, UnsignedInt decayFrames = DEF_DECAY_FRAMES, UnsignedInt attackFrames = 0, UnsignedInt sustainAtPeak = FALSE ); ///< flash a drawable in the color specified for a short time
void colorFlash( const RGBColor *color, UnsignedInt decayFrames = DEF_DECAY_FRAMES, UnsignedInt attackFrames = 0, UnsignedInt sustainAtPeak = 0 ); ///< flash a drawable in the color specified for a short time
void colorTint( const RGBColor *color ); ///< tint this drawable the color specified
void setTintEnvelope( const RGBColor *color, Real attack, Real decay ); ///< how to transition color
void flashAsSelected( const RGBColor *color = NULL ); ///< drawable takes care of the details if you spec no color
Expand Down
2 changes: 2 additions & 0 deletions Generals/Code/GameEngine/Include/GameLogic/GameLogic.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ class GameLogic : public SubsystemInterface, public Snapshot
Real getHeight( void ); ///< Returns the height of the world

Bool isInGameLogicUpdate( void ) const { return m_isInUpdate; }
Bool hasUpdated() const { return m_hasUpdated; } ///< Returns true if the logic frame has advanced in the current client/render update
UnsignedInt getFrame( void ); ///< Returns the current simulation frame number
UnsignedInt getCRC( Int mode = CRC_CACHED, AsciiString deepCRCFileName = AsciiString::TheEmptyString ); ///< Returns the CRC

Expand Down Expand Up @@ -301,6 +302,7 @@ class GameLogic : public SubsystemInterface, public Snapshot
Bool m_loadingScene;

Bool m_isInUpdate;
Bool m_hasUpdated;

Int m_rankPointsToAddAtGameStart;

Expand Down
2 changes: 1 addition & 1 deletion Generals/Code/GameEngine/Source/Common/GameEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ GameEngine::GameEngine( void )
// initialize to non garbage values
m_maxFPS = BaseFps;
m_logicTimeScaleFPS = LOGICFRAMES_PER_SECOND;
m_updateTime = 0.0f;
m_updateTime = 1.0f / BaseFps; // initialized to something to avoid division by zero on first use
m_logicTimeAccumulator = 0.0f;
m_quitting = FALSE;
m_isActive = FALSE;
Expand Down
19 changes: 4 additions & 15 deletions Generals/Code/GameEngine/Source/GameClient/Drawable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -922,9 +922,6 @@ void Drawable::colorFlash( const RGBColor* color, UnsignedInt decayFrames, Unsig
white.setFromInt(0xffffffff);
m_colorTintEnvelope->play( &white );
}

// make sure the tint color is unlocked so we "fade back down" to normal
clearDrawableStatus( DRAWABLE_STATUS_TINT_COLOR_LOCKED );
}

// ------------------------------------------------------------------------------------------------
Expand All @@ -935,11 +932,7 @@ void Drawable::colorTint( const RGBColor* color )
if( color )
{
// set the color via color flash
colorFlash( color, 0, 0, TRUE );

// lock the tint color so the flash never "fades back down"
setDrawableStatus( DRAWABLE_STATUS_TINT_COLOR_LOCKED );

colorFlash( color, 0, 0, ~0u );
}
else
{
Expand All @@ -948,10 +941,6 @@ void Drawable::colorTint( const RGBColor* color )

// remove the tint applied to the object
m_colorTintEnvelope->rest();

// set the tint as unlocked so we can flash and stuff again
clearDrawableStatus( DRAWABLE_STATUS_TINT_COLOR_LOCKED );

}

}
Expand Down Expand Up @@ -1264,7 +1253,7 @@ void Drawable::applyPhysicsXform(Matrix3D* mtx)
{
// TheSuperHackers @tweak Update the physics transform on every WW Sync only.
// All calculations are originally catered to a 30 fps logic step.
if (WW3D::Get_Frame_Time() != 0)
if (WW3D::Get_Sync_Frame_Time() != 0)
{
calcPhysicsXform(*m_physicsXform);
}
Expand Down Expand Up @@ -4756,11 +4745,11 @@ TintEnvelope::TintEnvelope(void)
const Real FADE_RATE_EPSILON = (0.001f);

//-------------------------------------------------------------------------------------------------
void TintEnvelope::play(const RGBColor *peak, UnsignedInt atackFrames, UnsignedInt decayFrames, UnsignedInt sustainAtPeak )
void TintEnvelope::play(const RGBColor *peak, UnsignedInt attackFrames, UnsignedInt decayFrames, UnsignedInt sustainAtPeak )
{
setPeakColor( peak );

setAttackFrames( atackFrames );
setAttackFrames( attackFrames );
setDecayFrames( decayFrames );

m_envState = ENVELOPE_STATE_ATTACK;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ UpdateSleepTime EMPUpdate::update( void )
{
RGBColor end = data->m_endColor;
saturateRGB( end, 5 );
dr->colorFlash( &end, 9999, m_tintEnvFadeFrames, TRUE );
dr->colorFlash( &end, 0, m_tintEnvFadeFrames, ~0u );
doDisableAttack();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ GameLogic::GameLogic( void )
//

m_frame = 0;
m_hasUpdated = FALSE;
m_frameObjectsChangedTriggerAreas = 0;
m_width = 0;
m_height = 0;
Expand Down Expand Up @@ -256,6 +257,7 @@ GameLogic::GameLogic( void )
void GameLogic::setDefaults( Bool saveGame )
{
m_frame = 0;
m_hasUpdated = FALSE;
m_width = DEFAULT_WORLD_WIDTH;
m_height = DEFAULT_WORLD_HEIGHT;
m_objList = NULL;
Expand Down Expand Up @@ -1020,6 +1022,7 @@ void GameLogic::startNewGame( Bool saveGame )

// reset the frame counter
m_frame = 0;
m_hasUpdated = FALSE;

#ifdef DEBUG_CRC
// TheSuperHackers @info helmutbuhler 04/09/2025
Expand Down Expand Up @@ -3327,13 +3330,16 @@ void GameLogic::update( void )
if (!m_startNewGame)
{
m_frame++;
m_hasUpdated = TRUE;
}
}

// ------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------
void GameLogic::preUpdate()
{
m_hasUpdated = FALSE;

if (m_pauseFrame == m_frame && m_pauseFrame != 0)
{
m_pauseFrame = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,6 @@ class HeightMapRenderObjClass : public RenderObjClass, public DX8_CleanupHook

void renderTerrainPass(CameraClass *pCamera); ///< renders additional terrain pass.
W3DShroud *getShroud() {return m_shroud;}
void renderExtraBlendTiles(void); ///< render 3-way blend tiles that have blend of 3 textures.
void updateShorelineTiles(Int minX, Int minY, Int maxX, Int maxY, WorldHeightMap *pMap); ///<figure out which tiles on this map cross water plane
void updateViewImpassableAreas(Bool partial = FALSE, Int minX = 0, Int maxX = 0, Int minY = 0, Int maxY = 0);
void clearAllScorches(void);
Expand Down Expand Up @@ -320,6 +319,9 @@ class HeightMapRenderObjClass : public RenderObjClass, public DX8_CleanupHook
AABoxClass & getTileBoundingBox(AABoxClass *aabox, Int x, Int y); ///<Vertex buffer bounding box
void initDestAlphaLUT(void); ///<initialize water depth LUT stored in m_destAlphaTexture
void renderShoreLines(CameraClass *pCamera); ///<re-render parts of terrain that need custom blending into water edge
void renderExtraBlendTiles(void); ///< render 3-way blend tiles that have blend of 3 textures.

static Bool useCloud();
};

extern HeightMapRenderObjClass *TheTerrainRenderObject;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ class W3DShaderManager
W3DShaderManager(void); ///<constructor
static void init( void ); ///<determine optimal shaders for current device.
static void shutdown(void); ///<release resources used by shaders
static void updateCloud(); ///<update the cloud position once every render frame.

static ChipsetType getChipset(void); ///<return current device chipset.
static Int getShaderPasses(ShaderTypes shader); ///<rendering passes required for shader
static Int setShader(ShaderTypes shader, Int pass); ///<enable specific shader pass.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,9 +310,11 @@ void W3DTankDraw::onRenderObjRecreated(void)
//-------------------------------------------------------------------------------------------------
void W3DTankDraw::doDrawModule(const Matrix3D* transformMtx)
{
W3DModelDraw::doDrawModule(transformMtx);

// TheSuperHackers @tweak Update the draw on every WW Sync only.
// All calculations are originally catered to a 30 fps logic step.
if (WW3D::Get_Frame_Time() == 0)
if (WW3D::Get_Sync_Frame_Time() == 0)
return;

const Real DEBRIS_THRESHOLD = 0.00001f;
Expand Down Expand Up @@ -405,8 +407,6 @@ void W3DTankDraw::doDrawModule(const Matrix3D* transformMtx)
}
}
}

W3DModelDraw::doDrawModule(transformMtx);
}

// ------------------------------------------------------------------------------------------------
Expand Down
Loading
Loading