SDK Known Issues List Fixed: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
(add Assert ''iAddBucket >= 0 && iAddBucket < NUM_BUCKETS'')
(add BotPutInServer linker failures)
Line 1: Line 1:
This page is intended to store important SDK bugs/known issues that existed in previous released but have now been fixed.  If your mod is based on an older SDK release, you may still be experiencing some of these bugs.
This page is intended to store important SDK bugs/known issues that existed in previous released but have now been fixed.  If your mod is based on an older SDK release, you may still be experiencing some of these bugs.
== BotPutInServer linker failures ==
{{Note|This issue was fixed in the 2006-01-12 SDK Update}}
'''Fix:''' This is fixed in the latest (February 12th or later) SDK from Valve by adding the files to the build:
<pre>
--- mod/src/dlls/hl_sdk.vcproj  2005-08-04 17:01:08.000000000 -0500
+++ mod/src/dlls/hl_sdk.vcproj  2006-02-12 13:52:33.000000000 -0600
@@ -3374,6 +3375,12 @@
                                Name="HL2MP"
                                Filter="">
                                <File
+                                      RelativePath=".\hl2mp_dll\hl2mp_bot_temp.cpp">
+                              </File>
+                              <File
+                                      RelativePath=".\hl2mp_dll\hl2mp_bot_temp.h">
+                              </File>
+                              <File
                                        RelativePath=".\hl2mp_dll\hl2mp_client.cpp">
                                </File>
                                <File
</pre>


== Assert ''iAddBucket >= 0 && iAddBucket < NUM_BUCKETS'' ==
== Assert ''iAddBucket >= 0 && iAddBucket < NUM_BUCKETS'' ==

Revision as of 21:56, 12 August 2006

This page is intended to store important SDK bugs/known issues that existed in previous released but have now been fixed. If your mod is based on an older SDK release, you may still be experiencing some of these bugs.

BotPutInServer linker failures

Note.pngNote:This issue was fixed in the 2006-01-12 SDK Update

Fix: This is fixed in the latest (February 12th or later) SDK from Valve by adding the files to the build:

--- mod/src/dlls/hl_sdk.vcproj  2005-08-04 17:01:08.000000000 -0500
+++ mod/src/dlls/hl_sdk.vcproj  2006-02-12 13:52:33.000000000 -0600
@@ -3374,6 +3375,12 @@
                                Name="HL2MP"
                                Filter="">
                                <File
+                                       RelativePath=".\hl2mp_dll\hl2mp_bot_temp.cpp">
+                               </File>
+                               <File
+                                       RelativePath=".\hl2mp_dll\hl2mp_bot_temp.h">
+                               </File>
+                               <File
                                        RelativePath=".\hl2mp_dll\hl2mp_client.cpp">
                                </File>
                                <File

Assert iAddBucket >= 0 && iAddBucket < NUM_BUCKETS

Note.pngNote:This issue was fixed in the 2006-08-04 SDK Update

Add after float flPercent = (zCoords[iCurParticle] - minZ) / (maxZ - minZ);:

// DM: WTF happens here?
if ( (maxZ - minZ) == 0 || flPercent < 0 )
	flPercent = 0.0f;

vphysics patch from Jay at Valve

Note.pngNote:This issue was fixed in the 2006-08-04 SDK Update

In addition to the vphysics bug/feature listed below where ShouldCollide can cause it to engage Physical Mayhem, an additional requirement for vphysics is this - again quoted from Jay. Need to figure out where in the code to patch in some docs on this - in the meantime:

Calling UTIL_Remove() or delete on an entity during a callback may corrupt vphysics.

The following patch uses an assert to document this requirement from the closed-source side of things:

--- mod/src/dlls/physics.cpp    2005/10/16 16:26:25     1.4
+++ mod/src/dlls/physics.cpp    2006/05/29 17:39:03
@@ -141,6 +141,7 @@

        // IPhysicsCollisionSolver
        int             ShouldCollide( IPhysicsObject *pObj0, IPhysicsObject *pObj1, void *pGameData0, void *pGameData1 );
+       int             ShouldCollide_Default(IPhysicsObject *pObj0, IPhysicsObject *pObj1, void *pGameData0, void *pGameData1);
        int             ShouldSolvePenetration( IPhysicsObject *pObj0, IPhysicsObject *pObj1, void *pGameData0, void *pGameData1, float dt );
        bool    ShouldFreezeObject( IPhysicsObject *pObject ) { return true; }
        int             AdditionalCollisionChecksThisTick( int currentChecksDone )
@@ -482,6 +483,21 @@
 }

 int CCollisionEvent::ShouldCollide( IPhysicsObject *pObj0, IPhysicsObject *pObj1, void *pGameData0, void *pGameData1 )
+{
+       int x0 = ShouldCollide_Default(pObj0, pObj1, pGameData0, pGameData1);
+#if !defined(NDEBUG)
+       int x1 = ShouldCollide_Default(pObj1, pObj0, pGameData1, pGameData0);
+       if ( x0 != x1 )
+       {
+               Assert(0 && "ShouldCollide must return the same value regardless of the order of the two objects that are passed in");
+               ShouldCollide_Default(pObj0, pObj1, pGameData0, pGameData1);
+               ShouldCollide_Default(pObj1, pObj0, pGameData1, pGameData0);
+       }
+#endif
+       return x0;
+}
+
+int CCollisionEvent::ShouldCollide_Default( IPhysicsObject *pObj0, IPhysicsObject *pObj1, void *pGameData0, void *pGameData1 )
 {
        CallbackContext check(this);

Here's another for Jay. I haven't tested this yet, but what's the worst that it could do? :)

--- ./mod/src/game_shared/physics_main_shared.cpp       2005/02/18 04:45:54     1.1.1.1
+++ ./mod/src/game_shared/physics_main_shared.cpp       2005/11/04 02:01:53
@@ -371,6 +371,8 @@
        return link;
 }

+static touchlink_t *g_pNextLink = NULL;
+
 //-----------------------------------------------------------------------------
 // Purpose:
 // Input  : *link -
@@ -380,6 +382,10 @@
 {
        if ( link )
        {
+        if ( link == g_pNextLink )
+        {
+            g_pNextLink = link->nextLink;
+        }
                --linksallocated;
        }
        g_EdictTouchLinks.Free( link );
@@ -442,7 +448,9 @@
 //-----------------------------------------------------------------------------
 void CBaseEntity::PhysicsCheckForEntityUntouch( void )
 {
-       touchlink_t *link, *nextLink;
+       Assert( g_pNextLink == NULL );
+
+    touchlink_t *link;

        touchlink_t *root = ( touchlink_t * )GetDataObject( TOUCHLINK );
        if ( root )
@@ -453,7 +461,7 @@
                link = root->nextLink;
                while ( link != root )
                {
-                       nextLink = link->nextLink;
+                       g_pNextLink = link->nextLink;

                        // these touchlinks are not polled.  The ents are touching due to an outside
                        // system that will add/delete them as necessary (vphysics in this case)
@@ -476,7 +484,7 @@
                                }
                        }

-                       link = nextLink;
+                       link = g_pNextLink;
                }

                g_bCleanupDatObject = saveCleanup;
@@ -489,6 +497,8 @@
                }
        }

+    g_pNextLink = NULL;
+
        SetCheckUntouch( false );
 }

Other info and links

See SDK Known Issues List for issues in the latest SDK.