mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Assorted bug fixes
This commit is contained in:
parent
31f1d27a49
commit
d1b806caf0
3 changed files with 26 additions and 3 deletions
|
|
@ -325,9 +325,7 @@ U32 PhysicalZone::packUpdate(NetConnection* con, U32 mask, BitStream* stream)
|
||||||
|
|
||||||
stream->writeFlag(mActive);
|
stream->writeFlag(mActive);
|
||||||
|
|
||||||
// AFX CODE BLOCK (enhanced-physical-zone)(pz-opt) >>
|
return retMask;
|
||||||
|
|
||||||
return retMask;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicalZone::unpackUpdate(NetConnection* con, BitStream* stream)
|
void PhysicalZone::unpackUpdate(NetConnection* con, BitStream* stream)
|
||||||
|
|
|
||||||
|
|
@ -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
|
class AITurretShape: public TurretShape
|
||||||
{
|
{
|
||||||
typedef TurretShape Parent;
|
typedef TurretShape Parent;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
|
#ifdef AFX_REUSE_TURRETSHAPE_MASKBITS
|
||||||
|
enum MaskBits {
|
||||||
|
TurretStateMask = Parent::TurretUpdateMask,
|
||||||
|
NextFreeMask = Parent::NextFreeMask
|
||||||
|
};
|
||||||
|
#else // ORIGINAL CODE
|
||||||
enum MaskBits {
|
enum MaskBits {
|
||||||
TurretStateMask = Parent::NextFreeMask,
|
TurretStateMask = Parent::NextFreeMask,
|
||||||
NextFreeMask = Parent::NextFreeMask << 1
|
NextFreeMask = Parent::NextFreeMask << 1
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
struct TargetInfo
|
struct TargetInfo
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,11 @@ void MacCursorController::setCursorShape(U32 cursorID)
|
||||||
case PlatformCursorController::curResizeHorz:
|
case PlatformCursorController::curResizeHorz:
|
||||||
[[NSCursor resizeUpDownCursor] set];
|
[[NSCursor resizeUpDownCursor] set];
|
||||||
break;
|
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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue