protected override List <(float centerX, float centerZ, float radius, float minY, float maxY, Color color)> Get3DDimensions() { uint objAddress = _posAngle.GetObjAddress(); ObjectDataModel obj = new ObjectDataModel(objAddress); ObjectBehaviorAssociation assoc = Config.ObjectAssociations.FindObjectAssociation(obj.BehaviorCriteria); if (assoc == null || assoc.PushHitbox == null) { return(new List <(float centerX, float centerZ, float radius, float minY, float maxY, Color color)>()); } (float radius, float minY, float maxY) = assoc.PushHitbox.GetDetails(objAddress); return(new List <(float centerX, float centerZ, float radius, float minY, float maxY, Color color)>() { ((float)_posAngle.X, (float)_posAngle.Z, radius, minY, maxY, Color) }); }
protected override List <(float centerX, float centerZ, float radius, float minY, float maxY)> Get3DDimensions() { uint objAddress = _posAngle.GetObjAddress(); float objY = Config.Stream.GetSingle(objAddress + ObjectConfig.YOffset); float hurtboxRadius = Config.Stream.GetSingle(objAddress + ObjectConfig.HurtboxRadiusOffset); float hurtboxHeight = Config.Stream.GetSingle(objAddress + ObjectConfig.HurtboxHeightOffset); float hitboxDownOffset = Config.Stream.GetSingle(objAddress + ObjectConfig.HitboxDownOffsetOffset); float hurtboxMinY = objY - hitboxDownOffset; float hurtboxMaxY = hurtboxMinY + hurtboxHeight; uint marioObjRef = Config.Stream.GetUInt32(MarioObjectConfig.PointerAddress); float marioHurtboxRadius = Config.Stream.GetSingle(marioObjRef + ObjectConfig.HurtboxRadiusOffset); float marioHitboxHeight = Config.Stream.GetSingle(marioObjRef + ObjectConfig.HitboxHeightOffset); float effectiveRadius = hurtboxRadius + marioHurtboxRadius; float effectiveMinY = hurtboxMinY - marioHitboxHeight; float effectiveMaxY = hurtboxMaxY; return(new List <(float centerX, float centerZ, float radius, float minY, float maxY)>() { ((float)_posAngle.X, (float)_posAngle.Z, effectiveRadius, effectiveMinY, effectiveMaxY) }); }
public MapSwooperEffectiveTargetArrowObject(PositionAngle posAngle) : base() { _posAngle = posAngle; _objAddress = posAngle.GetObjAddress(); }
public override List <ToolStripItem> GetHoverContextMenuStripItems(MapObjectHoverData hoverData) { List <ToolStripItem> output = base.GetHoverContextMenuStripItems(hoverData); ToolStripMenuItem selectObjectItem = new ToolStripMenuItem("Select Object in Object Tab"); selectObjectItem.Click += (sender, e) => Config.ObjectSlotsManager.SelectSlotByAddress(_posAngle.GetObjAddress()); output.Insert(0, selectObjectItem); ToolStripMenuItem copyAddressItem = new ToolStripMenuItem("Copy Address"); copyAddressItem.Click += (sender, e) => Clipboard.SetText(HexUtilities.FormatValue(_posAngle.GetObjAddress())); output.Insert(1, copyAddressItem); return(output); }
public MapObjectObject(PositionAngle posAngle) : base() { _obj = new ObjectDataModel(posAngle.GetObjAddress()); _posAngle = PositionAngle.Obj(posAngle.GetObjAddress()); }
public MapObjectMovingArrowObject(PositionAngle posAngle) : base() { _posAngle = posAngle; _objAddress = posAngle.GetObjAddress(); }
protected override double GetYaw() { float x = Config.Stream.GetFloat(_posAngle.GetObjAddress() + ObjectConfig.XSpeedOffset); float z = Config.Stream.GetFloat(_posAngle.GetObjAddress() + ObjectConfig.ZSpeedOffset); return(MoreMath.AngleTo_AngleUnits(x, z)); }
protected override double GetYaw() { return(Config.Stream.GetUShort(_posAngle.GetObjAddress() + ObjectConfig.YawMovingOffset)); }
protected override double GetYaw() { return(_numBytes == 2 ? Config.Stream.GetUShort(_posAngle.GetObjAddress() + _yawOffset) : Config.Stream.GetUInt(_posAngle.GetObjAddress() + _yawOffset)); }
public MapObjectHome(PositionAngle posAngle) : base() { _posAngle = PositionAngle.ObjHome(posAngle.GetObjAddress()); }