diff --git a/appframework/glmdisplaydb_linuxwin.inl b/appframework/glmdisplaydb_linuxwin.inl index 3e1d76a88..7c2d4dcb7 100644 --- a/appframework/glmdisplaydb_linuxwin.inl +++ b/appframework/glmdisplaydb_linuxwin.inl @@ -621,7 +621,7 @@ void GLMDisplayInfo::Dump( int which ) SDLAPP_FUNC; GLMPRINTF(("\n #%d: GLMDisplayInfo @ %08x, pixwidth=%d pixheight=%d", - which, (int)this, m_info.m_displayPixelWidth, m_info.m_displayPixelHeight )); + which, (uintptr_t)this, m_info.m_displayPixelWidth, m_info.m_displayPixelHeight )); FOR_EACH_VEC( *m_modes, i ) { diff --git a/cmake/source_posix_base.cmake b/cmake/source_posix_base.cmake index 1140ce425..66f63e790 100644 --- a/cmake/source_posix_base.cmake +++ b/cmake/source_posix_base.cmake @@ -26,7 +26,7 @@ set(LINUX_DEBUG_FLAGS " -ggdb -g3 -fno-eliminate-unused-debug-symbols ") #$Configuration "Debug" if (CMAKE_BUILD_TYPE STREQUAL "DEBUG") message(STATUS "Building in Debug mode") - add_definitions(-DBASE -DDEBUG -D_DEBUG) + add_definitions(-DBASE -DDEBUG -D_DEBUG -DDBGFLAG_ASSERT) if( OSXALL ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gdwarf-2 -g2 -Og -march=native") elseif( LINUXALL ) diff --git a/engine/gl_lightmap.cpp b/engine/gl_lightmap.cpp index 8095ef354..d2628edd8 100644 --- a/engine/gl_lightmap.cpp +++ b/engine/gl_lightmap.cpp @@ -1,4 +1,4 @@ -//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// +//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // @@ -1594,16 +1594,21 @@ unsigned int R_UpdateDlightState( dlight_t *pLights, SurfaceHandle_t surfID, con if ( !bOnlyUseLightStyles ) { // add all the dynamic lights - if( bLightmap && ( pLighting->m_nDLightFrame == r_framecount ) ) + // lwss add: hack this so we can restore 32-byte alignment + //if( bLightmap && ( pLighting->m_nDLightFrame == r_framecount ) ) + if( bLightmap && ( pLighting->m_wantsDlightThisFrame) ) { dlightMask = R_ComputeDynamicLightMask( pLights, surfID, pLighting, entityToWorld ); } + // if there was no dlight after adding, remove/disable if ( !dlightMask || !pLighting->m_fDLightBits ) { pLighting->m_fDLightBits = 0; MSurf_Flags(surfID) &= ~SURFDRAW_HASDLIGHT; } + // lwss add: turn this off after computing the lightmask + pLighting->m_wantsDlightThisFrame = false; } return dlightMask; } @@ -2081,9 +2086,9 @@ void GL_RebuildLightmaps( void ) // Input : *fa - surface pointer //----------------------------------------------------------------------------- -#ifdef UPDATE_LIGHTSTYLES_EVERY_FRAME +//#ifdef UPDATE_LIGHTSTYLES_EVERY_FRAME ConVar mat_updatelightstyleseveryframe( "mat_updatelightstyleseveryframe", "0" ); -#endif +//#endif int __cdecl LightmapPageCompareFunc( const void *pElem0, const void *pElem1 ) { @@ -2132,74 +2137,80 @@ void R_BuildLightmapUpdateList() void R_CheckForLightmapUpdates( SurfaceHandle_t surfID, int nTransformIndex ) { msurfacelighting_t *pLighting = SurfaceLighting( surfID ); - if ( pLighting->m_nLastComputedFrame != r_framecount ) - { - int nFlags = MSurf_Flags( surfID ); - - if( nFlags & SURFDRAW_NOLIGHT ) - return; - - // check for lightmap modification - bool bChanged = false; - if( nFlags & SURFDRAW_HASLIGHTSYTLES ) - { -#ifdef UPDATE_LIGHTSTYLES_EVERY_FRAME - if( mat_updatelightstyleseveryframe.GetBool() && ( pLighting->m_nStyles[0] != 0 || pLighting->m_nStyles[1] != 255 ) ) - { - bChanged = true; - } -#endif - for( int maps = 0; maps < MAXLIGHTMAPS && pLighting->m_nStyles[maps] != 255; maps++ ) - { - if( d_lightstyleframe[pLighting->m_nStyles[maps]] > pLighting->m_nLastComputedFrame ) - { - bChanged = true; - break; - } - } - } - - // was it dynamic this frame (pLighting->m_nDLightFrame == r_framecount) - // or dynamic previously (pLighting->m_fDLightBits) - bool bDLightChanged = ( pLighting->m_nDLightFrame == r_framecount ) || pLighting->m_fDLightBits; - bool bOnlyUseLightStyles = false; - if ( r_dynamic.GetInt() == 0 || r_keepstyledlightmapsonly.GetBool() ) - { - bOnlyUseLightStyles = true; - } - else - { - bChanged |= bDLightChanged; - } - - if ( bChanged ) - { - bool bNeedsBumpmap = SurfNeedsBumpedLightmaps( surfID ); - bool bNeedsLightmap = SurfNeedsLightmap( surfID ); - - if( !bNeedsBumpmap && !bNeedsLightmap ) - return; - - if( materialSortInfoArray ) - { - int nSortID = MSurf_MaterialSortID( surfID ); - Assert( nSortID >= 0 && nSortID < g_WorldStaticMeshes.Count() ); - if (( materialSortInfoArray[nSortID].lightmapPageID == MATERIAL_SYSTEM_LIGHTMAP_PAGE_WHITE ) || - ( materialSortInfoArray[nSortID].lightmapPageID == MATERIAL_SYSTEM_LIGHTMAP_PAGE_WHITE_BUMP ) ) - { - return; - } - } - bool bDlightsInLightmap = bNeedsLightmap || bNeedsBumpmap; - unsigned int nDlightMask = R_UpdateDlightState( cl_dlights, surfID, g_LightmapTransformList[nTransformIndex].xform, bOnlyUseLightStyles, bDlightsInLightmap ); - - - int nIndex = g_LightmapUpdateList.AddToTail(); - g_LightmapUpdateList[nIndex].m_SurfHandle = surfID; - g_LightmapUpdateList[nIndex].m_nTransformIndex = nTransformIndex; - g_LightmapUpdateList[nIndex].m_nDlightMask= nDlightMask; - g_LightmapUpdateList[nIndex].m_bNeedsLightmap = bNeedsLightmap; - g_LightmapUpdateList[nIndex].m_bNeedsBumpmap = bNeedsBumpmap; - } - } + if ( pLighting->m_nLastComputedFrame == r_framecount ) + return; + + int nFlags = MSurf_Flags( surfID ); + + if( nFlags & SURFDRAW_NOLIGHT ) + return; + + // check for lightmap modification + bool bChanged = false; + if( nFlags & SURFDRAW_HASLIGHTSYTLES ) + { +//#ifdef UPDATE_LIGHTSTYLES_EVERY_FRAME //lwss: enable this + if( mat_updatelightstyleseveryframe.GetBool() && ( pLighting->m_nStyles[0] != 0 || pLighting->m_nStyles[1] != 255 ) ) + { + bChanged = true; + } + else +//#endif + { + for( int maps = 0; maps < MAXLIGHTMAPS && pLighting->m_nStyles[maps] != 255; maps++ ) + { + if( d_lightstyleframe[pLighting->m_nStyles[maps]] > pLighting->m_nLastComputedFrame ) + { + bChanged = true; + break; + } + } + } + } + + // was it dynamic this frame (pLighting->m_nDLightFrame == r_framecount) + // or dynamic previously (pLighting->m_fDLightBits) + // lwss add: hack this so we can restore 32-byte alignment + //bool bDLightChanged = ( pLighting->m_nDLightFrame == r_framecount ) || pLighting->m_fDLightBits; + bool bDLightChanged = pLighting->m_wantsDlightThisFrame || pLighting->m_fDLightBits; + + bool bOnlyUseLightStyles = false; + if ( r_dynamic.GetInt() == 0 || r_keepstyledlightmapsonly.GetBool() ) + { + bOnlyUseLightStyles = true; + } + else + { + bChanged |= bDLightChanged; + } + + if ( bChanged ) + { + bool bNeedsBumpmap = SurfNeedsBumpedLightmaps( surfID ); + bool bNeedsLightmap = SurfNeedsLightmap( surfID ); + + if( !bNeedsBumpmap && !bNeedsLightmap ) + return; + + if( materialSortInfoArray ) + { + int nSortID = MSurf_MaterialSortID( surfID ); + Assert( nSortID >= 0 && nSortID < g_WorldStaticMeshes.Count() ); + if (( materialSortInfoArray[nSortID].lightmapPageID == MATERIAL_SYSTEM_LIGHTMAP_PAGE_WHITE ) || + ( materialSortInfoArray[nSortID].lightmapPageID == MATERIAL_SYSTEM_LIGHTMAP_PAGE_WHITE_BUMP ) ) + { + return; + } + } + bool bDlightsInLightmap = bNeedsLightmap || bNeedsBumpmap; + unsigned int nDlightMask = R_UpdateDlightState( cl_dlights, surfID, g_LightmapTransformList[nTransformIndex].xform, bOnlyUseLightStyles, bDlightsInLightmap ); + + + int nIndex = g_LightmapUpdateList.AddToTail(); + g_LightmapUpdateList[nIndex].m_SurfHandle = surfID; + g_LightmapUpdateList[nIndex].m_nTransformIndex = nTransformIndex; + g_LightmapUpdateList[nIndex].m_nDlightMask= nDlightMask; + g_LightmapUpdateList[nIndex].m_bNeedsLightmap = bNeedsLightmap; + g_LightmapUpdateList[nIndex].m_bNeedsBumpmap = bNeedsBumpmap; + } } diff --git a/engine/gl_model_private.h b/engine/gl_model_private.h index b502e37df..bb0badb44 100644 --- a/engine/gl_model_private.h +++ b/engine/gl_model_private.h @@ -1,4 +1,4 @@ -//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// +//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // @@ -501,9 +501,10 @@ struct msurfacelighting_t short m_LightmapExtents[2]; short m_OffsetIntoLightmapPage[2]; - int m_nLastComputedFrame; // last frame the surface's lightmap was recomputed + bool m_wantsDlightThisFrame : 1; // lwss add: hack this so we can restore 32-byte alignment + unsigned int m_nLastComputedFrame : 31; // last frame the surface's lightmap was recomputed int m_fDLightBits; // Indicates which dlights illuminates this surface. - int m_nDLightFrame; // Indicates the last frame in which dlights illuminated this surface + //int m_nDLightFrame; // Indicates the last frame in which dlights illuminated this surface unsigned char m_nStyles[MAXLIGHTMAPS]; // index into d_lightstylevalue[] for animated lights // no one surface can be effected by more than 4 @@ -522,6 +523,7 @@ const int WORLD_DECAL_HANDLE_INVALID = 0xFFFF; typedef unsigned short WorldDecalHandle_t; // NOTE: 32-bytes. Aligned/indexed often +// KISAKTODO: Align this struct back to 32-bytes (good luck) struct msurface2_t { unsigned int flags; // see SURFDRAW_ #defines (only 22-bits right now) @@ -534,9 +536,9 @@ struct msurface2_t cplane_t* plane; // pointer to shared plane #endif int firstvertindex; // look up in model->vertindices[] (only uses 17-18 bits?) - WorldDecalHandle_t decals; + WorldDecalHandle_t decals; // unsigned short ShadowDecalHandle_t m_ShadowDecals; // unsigned short - OverlayFragmentHandle_t m_nFirstOverlayFragment; // First overlay fragment on the surface (short) + OverlayFragmentHandle_t m_nFirstOverlayFragment; // First overlay fragment on the surface (unsigned short) short materialSortID; unsigned short vertBufferIndex; diff --git a/engine/gl_rlight.cpp b/engine/gl_rlight.cpp index 7f62e15c9..eb3beaa12 100644 --- a/engine/gl_rlight.cpp +++ b/engine/gl_rlight.cpp @@ -1,4 +1,4 @@ -//========= Copyright © 1996-2005, Valve Corporation, All rights reserved. ============// +//========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============// // // Purpose: // @@ -118,14 +118,18 @@ DYNAMIC LIGHTS // Returns true if the surface has the specified dlight already set on it for this frame. inline bool R_IsDLightAlreadyMarked( msurfacelighting_t *pLighting, int bit ) { - return (pLighting->m_nDLightFrame == r_framecount) && (pLighting->m_fDLightBits & bit); + // lwss add: hack this so we can restore 32-byte alignment + //return (pLighting->m_nDLightFrame == r_framecount) && (pLighting->m_fDLightBits & bit); + return (pLighting->m_wantsDlightThisFrame) && (pLighting->m_fDLightBits & bit); } // Mark the surface as changed by the specified dlight (so its texture gets updated when // it comes time to render). inline void R_MarkSurfaceDLight( SurfaceHandle_t surfID, msurfacelighting_t *pLighting, int bit) { - pLighting->m_nDLightFrame = r_framecount; + //pLighting->m_nDLightFrame = r_framecount; + // lwss add: hack this so we can restore 32-byte alignment + pLighting->m_wantsDlightThisFrame = true; pLighting->m_fDLightBits |= bit; MSurf_Flags( surfID ) |= SURFDRAW_HASDLIGHT; } diff --git a/game/client/c_baseentity.cpp b/game/client/c_baseentity.cpp index 796d04a71..3a9a09c78 100644 --- a/game/client/c_baseentity.cpp +++ b/game/client/c_baseentity.cpp @@ -5396,16 +5396,44 @@ CON_COMMAND( cl_sizeof, "Determines the size of the specified client class." ) CON_COMMAND_F( dlight_debug, "Creates a dlight in front of the player", FCVAR_CHEAT ) { - dlight_t *el = effects->CL_AllocDlight( 1 ); C_BasePlayer *player = C_BasePlayer::GetLocalPlayer(); if ( !player ) return; + + //lwss: added 3 more dlights to test 4x(MAX) on 1 surface + dlight_t *el = effects->CL_AllocDlight( 1 ); + dlight_t *el2 = effects->CL_AllocDlight( 2 ); + dlight_t *el3 = effects->CL_AllocDlight( 3 ); + dlight_t *el4 = effects->CL_AllocDlight( 4 ); + Vector start = player->EyePosition(); Vector forward; player->EyeVectors( &forward ); - Vector end = start + forward * MAX_TRACE_LENGTH; + // sloppy but works + Vector forward2 = forward; + forward2.x += 0.10f; + forward2.NormalizeInPlace(); + Vector forward3 = forward; + forward3.x -= 0.10f; + forward2.NormalizeInPlace(); + Vector forward4 = forward; + forward4.y += 0.10f; + forward4.NormalizeInPlace(); + + Vector end = start + forward * MAX_TRACE_LENGTH; + Vector end2 = start + forward2 * MAX_TRACE_LENGTH; + Vector end3 = start + forward3 * MAX_TRACE_LENGTH; + Vector end4 = start + forward4 * MAX_TRACE_LENGTH; + trace_t tr; + trace_t tr2; + trace_t tr3; + trace_t tr4; UTIL_TraceLine( start, end, MASK_SHOT_HULL & (~CONTENTS_GRATE), player, COLLISION_GROUP_NONE, &tr ); + UTIL_TraceLine( start, end2, MASK_SHOT_HULL & (~CONTENTS_GRATE), player, COLLISION_GROUP_NONE, &tr2 ); + UTIL_TraceLine( start, end3, MASK_SHOT_HULL & (~CONTENTS_GRATE), player, COLLISION_GROUP_NONE, &tr3 ); + UTIL_TraceLine( start, end4, MASK_SHOT_HULL & (~CONTENTS_GRATE), player, COLLISION_GROUP_NONE, &tr4 ); + el->origin = tr.endpos - forward * 12.0f; el->radius = 200; el->decay = el->radius / 5.0f; @@ -5415,6 +5443,32 @@ CON_COMMAND_F( dlight_debug, "Creates a dlight in front of the player", FCVAR_CH el->color.b = 64; el->color.exponent = 5; + el2->origin = tr2.endpos - forward2 * 12.0f; + el2->radius = 200; + el2->decay = el2->radius / 5.0f; + el2->die = gpGlobals->curtime + 5.0f; + el2->color.r = 55; + el2->color.g = 50; + el2->color.b = 255; + el2->color.exponent = 5; + + el3->origin = tr3.endpos - forward3 * 12.0f; + el3->radius = 200; + el3->decay = el3->radius / 5.0f; + el3->die = gpGlobals->curtime + 5.0f; + el3->color.r = 5; + el3->color.g = 220; + el3->color.b = 10; + el3->color.exponent = 5; + + el4->origin = tr4.endpos - forward4 * 12.0f; + el4->radius = 200; + el4->decay = el4->radius / 5.0f; + el4->die = gpGlobals->curtime + 5.0f; + el4->color.r = 225; + el4->color.g = 22; + el4->color.b = 22; + el4->color.exponent = 5; } //----------------------------------------------------------------------------- // Purpose: diff --git a/game/client/cstrike15/clientmode_csnormal.cpp b/game/client/cstrike15/clientmode_csnormal.cpp index 0cb972248..e74a9b62c 100644 --- a/game/client/cstrike15/clientmode_csnormal.cpp +++ b/game/client/cstrike15/clientmode_csnormal.cpp @@ -3742,8 +3742,8 @@ bool __MsgFunc_PlayerDecalDigitalSignature( const CCSUsrMsg_PlayerDecalDigitalSi g_CSClientGameStats.AddClientCSGOGameEvent( k_CSClientCsgoGameEventType_SprayApplication, vecCheck, pLocalPlayer->EyeAngles(), ( uint64( unStickerKitID ) << 32 ) | uint64( unTintID ) ); #ifdef _DEBUG - DevMsg( "Client decal signature (%llu) @(%.2f,%.2f,%.2f) T%u requested\n", cl2gc.Body().itemid(), - msg.data().endpos( 0 ), msg.data().endpos( 1 ), msg.data().endpos( 2 ), msg.data().rtime() ); + //DevMsg( "Client decal signature (%llu) @(%.2f,%.2f,%.2f) T%u requested\n", cl2gc.Body().itemid(), msg.data().endpos( 0 ), msg.data().endpos( 1 ), msg.data().endpos( 2 ), msg.data().rtime() ); + DevMsg( "Client decal signature @(%.2f,%.2f,%.2f) T%u requested\n", msg.data().endpos( 0 ), msg.data().endpos( 1 ), msg.data().endpos( 2 ), msg.data().rtime() ); #endif return true; diff --git a/game/shared/econ/econ_item_inventory.cpp b/game/shared/econ/econ_item_inventory.cpp index dbde1b449..944354e75 100644 --- a/game/shared/econ/econ_item_inventory.cpp +++ b/game/shared/econ/econ_item_inventory.cpp @@ -1308,7 +1308,8 @@ bool CPlayerInventory::AddEconDefaultEquippedDefinition( CEconDefaultEquippedDef void CPlayerInventory::SOCreated( const CSteamID & steamIDOwner, const GCSDK::CSharedObject *pObject, GCSDK::ESOCacheEvent eEvent ) { #ifdef _DEBUG - Msg("CPlayerInventory::SOCreated %s [event = %u]\n", CSteamID( owner.ID() ).Render(), eEvent ); + //Msg("CPlayerInventory::SOCreated %s [event = %u]\n", CSteamID( owner.ID() ).Render(), eEvent ); + Msg("CPlayerInventory::SOCreated [event = %u]\n", eEvent ); #endif GCSDK::SOID_t owner( steamIDOwner ); //lwss hack if ( owner != m_OwnerID ) @@ -1492,7 +1493,8 @@ void CPlayerInventory::PostSOUpdate(const CSteamID &steamIDOwner, GCSDK::ESOCach void CPlayerInventory::SODestroyed( const CSteamID & steamIDOwner, const GCSDK::CSharedObject *pObject, GCSDK::ESOCacheEvent eEvent ) { #ifdef _DEBUG - Msg("CPlayerInventory::SODestroyed %s [event = %u]\n", CSteamID( owner.ID() ).Render(), eEvent ); + //Msg("CPlayerInventory::SODestroyed %s [event = %u]\n", CSteamID( owner.ID() ).Render(), eEvent ); + Msg("CPlayerInventory::SODestroyed [event = %u]\n", eEvent ); #endif GCSDK::SOID_t owner( steamIDOwner ); //lwss hack @@ -1607,7 +1609,8 @@ void CPlayerInventory::MarkSetItemDescriptionsDirty( int nItemSetIndex ) void CPlayerInventory::SOCacheUnsubscribed( const CSteamID & steamIDOwner, GCSDK::ESOCacheEvent eEvent ) { #ifdef _DEBUG - Msg("CPlayerInventory::SOCacheUnsubscribed %s [event = %u]\n", CSteamID( ID.ID() ).Render(), eEvent ); + //Msg("CPlayerInventory::SOCacheUnsubscribed %s [event = %u]\n", CSteamID( ID.ID() ).Render(), eEvent ); + Msg("CPlayerInventory::SOCacheUnsubscribed [event = %u]\n", eEvent ); #endif GCSDK::SOID_t owner( steamIDOwner ); //lwss hack diff --git a/gcsdk/webapi_response.cpp b/gcsdk/webapi_response.cpp index f21c6f4f0..6768f4135 100755 --- a/gcsdk/webapi_response.cpp +++ b/gcsdk/webapi_response.cpp @@ -5,6 +5,7 @@ //============================================================================= #include "stdafx.h" +#include "dbg.h" #include "thirdparty/JSON_parser/JSON_parser.h" using namespace GCSDK; @@ -1192,7 +1193,7 @@ CWebAPIValues * CWebAPIValues::CreateChildInternal( const char *pchName, EWebAPI { if ( Q_stricmp( pCurLastChild->GetName(), pchName ) == 0 ) { - AssertMsg( false, "Trying to create CWebAPIValues child with name %s that conflicts with existing child. Breaks JSON output!", pchName ); + AssertMsg1( false, "Trying to create CWebAPIValues child with name %s that conflicts with existing child. Breaks JSON output!", pchName ); } } @@ -1203,7 +1204,7 @@ CWebAPIValues * CWebAPIValues::CreateChildInternal( const char *pchName, EWebAPI { if ( Q_stricmp( pCurLastChild->GetName(), pchName ) == 0 ) { - AssertMsg( false, "Trying to create CWebAPIValues child with name %s that conflicts with existing child. Breaks JSON output!", pchName ); + AssertMsg1( false, "Trying to create CWebAPIValues child with name %s that conflicts with existing child. Breaks JSON output!", pchName ); } } } diff --git a/mathlib/polyhedron.cpp b/mathlib/polyhedron.cpp index 4eb919758..292a256ae 100644 --- a/mathlib/polyhedron.cpp +++ b/mathlib/polyhedron.cpp @@ -151,8 +151,8 @@ static CPolyhedron_TempMemory s_TempMemoryPolyhedron; CPolyhedron *GetTempPolyhedron( unsigned short iVertices, unsigned short iLines, unsigned short iIndices, unsigned short iPolygons ) //grab the temporary polyhedron. Avoids new/delete for quick work. Can only be in use by one chunk of code at a time { - AssertMsg( s_TempMemoryPolyhedron.iReferenceCount == 0, "Temporary polyhedron memory being rewritten before released" ); #ifdef DBGFLAG_ASSERT + AssertMsg( s_TempMemoryPolyhedron.iReferenceCount == 0, "Temporary polyhedron memory being rewritten before released" ); ++s_TempMemoryPolyhedron.iReferenceCount; #endif s_TempMemoryPolyhedron_Buffer.SetCount( (sizeof( Vector ) * iVertices) + diff --git a/public/tier0/dbg.h b/public/tier0/dbg.h index 507c2a4b3..af9f6291f 100644 --- a/public/tier0/dbg.h +++ b/public/tier0/dbg.h @@ -261,6 +261,11 @@ PLATFORM_INTERFACE struct SDL_Window * GetAssertDialogParent(); // Assert is used to detect an important but survivable error. // It's only turned on when DBGFLAG_ASSERT is true. +// lwss hack: force on asserts for the debug build +#ifdef _DEBUG +#define DBGFLAG_ASSERT +#endif +// lwss end #ifdef DBGFLAG_ASSERT #define Assert( _exp ) _AssertMsg( _exp, _T("Assertion Failed: ") _T(#_exp), ((void)0), false ) diff --git a/thirdparty/RmlUi/Include/RmlUi/Core/Debug.h b/thirdparty/RmlUi/Include/RmlUi/Core/Debug.h index 354e33a5a..59607e26b 100644 --- a/thirdparty/RmlUi/Include/RmlUi/Core/Debug.h +++ b/thirdparty/RmlUi/Include/RmlUi/Core/Debug.h @@ -53,7 +53,8 @@ // Define the LT_ASSERT and RMLUI_VERIFY macros. -#if !defined RMLUI_DEBUG +//#if !defined RMLUI_DEBUG +#if 1 //lwss #define RMLUI_ASSERT(x) #define RMLUI_ASSERTMSG(x, m) #define RMLUI_ERROR diff --git a/vphysics_bullet/Physics_FluidController.cpp b/vphysics_bullet/Physics_FluidController.cpp index fb37972e7..b305053fa 100644 --- a/vphysics_bullet/Physics_FluidController.cpp +++ b/vphysics_bullet/Physics_FluidController.cpp @@ -204,11 +204,11 @@ void CPhysicsFluidController::Tick(float dt) { if (pOverlay) { Vector pos; ConvertPosToHL(surfPos, pos); - pOverlay->AddBoxOverlay(pos, Vector(-8), Vector(8), QAngle(0, 0, 0), 255, 0, 0, 255, 0.f); + pOverlay->AddBoxOverlay(pos, Vector(-8,-8,-8), Vector(8,8,8), QAngle(0, 0, 0), 255, 0, 0, 255, 0.f); pOverlay->AddLineOverlay(pos, pos + m_vSurfacePlane.AsVector3D() * 32, 255, 0, 0, false, 0.f); ConvertPosToHL(center, pos); - pOverlay->AddBoxOverlay(pos, Vector(-8), Vector(8), QAngle(0, 0, 0), 0, 0, 255, 255, 0.f); + pOverlay->AddBoxOverlay(pos, Vector(-8,-8,-8), Vector(8,8,8), QAngle(0, 0, 0), 0, 0, 255, 255, 0.f); if (submerged < 0) { pOverlay->AddTextOverlay(pos, 0.f, "submerged %+04.2f", submerged);