Projectile handling
This commit is contained in:
@@ -1132,7 +1132,10 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
RecoveryChance = ammo.ArrowRecoveryChance,
|
||||
CanHitMobs = true,
|
||||
CanHitPlayers = false, // TODO: PvP support
|
||||
SpriteKey = ammo.SpritePath ?? "projectile_arrow"
|
||||
SpriteKey = ammo.SpritePath ?? "projectile_arrow",
|
||||
IsLinear = ammo.IsLinearProjectile,
|
||||
FrontFrame = ammo.ProjectileFrontFrame,
|
||||
BackFrame = ammo.ProjectileBackFrame
|
||||
};
|
||||
|
||||
dungeon.Simulation.Projectiles.TryAdd(projectile.Id, projectile);
|
||||
@@ -1153,7 +1156,10 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
y = projectile.Y,
|
||||
vx = projectile.VelocityX,
|
||||
vy = projectile.VelocityY,
|
||||
sprite = projectile.SpriteKey
|
||||
sprite = projectile.SpriteKey,
|
||||
isLinear = projectile.IsLinear,
|
||||
frontFrame = projectile.FrontFrame,
|
||||
backFrame = projectile.BackFrame
|
||||
}, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
@@ -1208,7 +1214,10 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
RecoveryChance = weapon.ArrowRecoveryChance,
|
||||
CanHitMobs = true,
|
||||
CanHitPlayers = false,
|
||||
SpriteKey = weapon.SpritePath ?? "projectile_knife"
|
||||
SpriteKey = weapon.SpritePath ?? "projectile_knife",
|
||||
IsLinear = weapon.IsLinearProjectile,
|
||||
FrontFrame = weapon.ProjectileFrontFrame,
|
||||
BackFrame = weapon.ProjectileBackFrame
|
||||
};
|
||||
|
||||
dungeon.Simulation.Projectiles.TryAdd(projectile.Id, projectile);
|
||||
@@ -1227,7 +1236,10 @@ public sealed partial class DungeonHandler : IClientMessageHandler
|
||||
y = projectile.Y,
|
||||
vx = projectile.VelocityX,
|
||||
vy = projectile.VelocityY,
|
||||
sprite = projectile.SpriteKey
|
||||
sprite = projectile.SpriteKey,
|
||||
isLinear = projectile.IsLinear,
|
||||
frontFrame = projectile.FrontFrame,
|
||||
backFrame = projectile.BackFrame
|
||||
}, CancellationToken.None);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user