Kaynağa Gözat

Assorted bug fixes

Marc Chapman 8 yıl önce
ebeveyn
işleme
51df59092d

+ 1 - 3
Engine/source/T3D/physicalZone.cpp

@@ -325,9 +325,7 @@ U32 PhysicalZone::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
 
    stream->writeFlag(mActive);
 
-   // AFX CODE BLOCK (enhanced-physical-zone)(pz-opt) >>
-
-   return retMask;
+     return retMask;
 }
 
 void PhysicalZone::unpackUpdate(NetConnection* con, BitStream* stream)

+ 20 - 0
Engine/source/T3D/turret/aiTurretShape.h

@@ -151,16 +151,36 @@ public:
 
 //----------------------------------------------------------------------------
 
+// As shipped, AITurretShape plus the chain of classes it inherits from, consumes
+// all 32 mask-bits. AFX uses one additional mask-bit in GameBase, which pushes
+// AITurretShape over the mask-bit limit which will cause runtime crashes. As 
+// a workaround, AFX modifies AITurretShape so that it reuses the TurretUpdateMask
+// defined by TurretShape rather than adding a unique TurretStateMask. This will
+// make AITurretShape's network updates slightly less efficient, but should be 
+// acceptable for most uses of AITurretShape. If you plan to populate your levels
+// with many AITurretShape objects, consider restoring it to use of a unique
+// bit-mask, but if you do that, you will have to eliminate at use of at least one
+// bit by one of it's parent classes. (FYI ShapeBase uses 20 bits.)
+//
+// Comment out this define if you want AITurretShape to define it's own bit-mask.
+#define AFX_REUSE_TURRETSHAPE_MASKBITS
 class AITurretShape: public TurretShape
 {
    typedef TurretShape Parent;
 
 protected:
 
+#ifdef AFX_REUSE_TURRETSHAPE_MASKBITS
+   enum MaskBits {
+      TurretStateMask   = Parent::TurretUpdateMask,
+      NextFreeMask      = Parent::NextFreeMask
+   };
+#else // ORIGINAL CODE
    enum MaskBits {
       TurretStateMask   = Parent::NextFreeMask,
       NextFreeMask      = Parent::NextFreeMask << 1
    };
+#endif
 
    struct TargetInfo
    {

+ 5 - 0
Engine/source/windowManager/mac/macCursorController.mm

@@ -127,6 +127,11 @@ void MacCursorController::setCursorShape(U32 cursorID)
       case PlatformCursorController::curResizeHorz:
          [[NSCursor resizeUpDownCursor] set];
       break;
+      // This sets an appropriate value for the standard hand cursor.
+      // In AFX this is used for rollover feedback.
+      case PlatformCursorController::curHand:
+         [[NSCursor pointingHandCursor] set];
+      break;
    }
 }