Make vox roundstart (#29704)
* Make vox roundstart I believe all the issues are fixed. * Click detection bandaid
This commit is contained in:
@@ -48,7 +48,7 @@ namespace Content.Client.Clickable
|
|||||||
Angle cardinalSnapping = sprite.SnapCardinals ? relativeRotation.GetCardinalDir().ToAngle() : Angle.Zero;
|
Angle cardinalSnapping = sprite.SnapCardinals ? relativeRotation.GetCardinalDir().ToAngle() : Angle.Zero;
|
||||||
|
|
||||||
// First we get `localPos`, the clicked location in the sprite-coordinate frame.
|
// First we get `localPos`, the clicked location in the sprite-coordinate frame.
|
||||||
var entityXform = Matrix3Helpers.CreateInverseTransform(transform.WorldPosition, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping);
|
var entityXform = Matrix3Helpers.CreateInverseTransform(spritePos, sprite.NoRotation ? -eye.Rotation : spriteRot - cardinalSnapping);
|
||||||
var localPos = Vector2.Transform(Vector2.Transform(worldPos, entityXform), invSpriteMatrix);
|
var localPos = Vector2.Transform(Vector2.Transform(worldPos, entityXform), invSpriteMatrix);
|
||||||
|
|
||||||
// Check explicitly defined click-able bounds
|
// Check explicitly defined click-able bounds
|
||||||
@@ -58,8 +58,11 @@ namespace Content.Client.Clickable
|
|||||||
// Next check each individual sprite layer using automatically computed click maps.
|
// Next check each individual sprite layer using automatically computed click maps.
|
||||||
foreach (var spriteLayer in sprite.AllLayers)
|
foreach (var spriteLayer in sprite.AllLayers)
|
||||||
{
|
{
|
||||||
if (!spriteLayer.Visible || spriteLayer is not Layer layer)
|
// TODO: Move this to a system and also use SpriteSystem.IsVisible instead.
|
||||||
|
if (!spriteLayer.Visible || spriteLayer is not Layer layer || layer.CopyToShaderParameters != null)
|
||||||
|
{
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Check the layer's texture, if it has one
|
// Check the layer's texture, if it has one
|
||||||
if (layer.Texture != null)
|
if (layer.Texture != null)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
- type: species
|
- type: species
|
||||||
id: Vox
|
id: Vox
|
||||||
name: species-name-vox
|
name: species-name-vox
|
||||||
roundStart: false # sad
|
roundStart: true
|
||||||
prototype: MobVox
|
prototype: MobVox
|
||||||
sprites: MobVoxSprites
|
sprites: MobVoxSprites
|
||||||
markingLimits: MobVoxMarkingLimits
|
markingLimits: MobVoxMarkingLimits
|
||||||
|
|||||||
Reference in New Issue
Block a user