factoring various junk out of Bullet.Tick in prep for homing bullets
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
using OpenRa.Game.GameRules;
|
||||
namespace OpenRa.Game
|
||||
{
|
||||
static class Smudge
|
||||
@@ -23,6 +24,22 @@ namespace OpenRa.Game
|
||||
Rules.Map.MapTiles[x, y].smudge++;
|
||||
}
|
||||
|
||||
public static void AddSmudge(int2 targetTile, WarheadInfo warhead)
|
||||
{
|
||||
switch (warhead.Explosion) /* todo: push the scorch/crater behavior into data */
|
||||
{
|
||||
case 4:
|
||||
case 5:
|
||||
Smudge.AddSmudge(true, targetTile.X, targetTile.Y);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
case 6:
|
||||
Smudge.AddSmudge(false, targetTile.X, targetTile.Y);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static int lastSmudge = 0;
|
||||
static int ChooseSmudge() { lastSmudge = (lastSmudge + 1) % 6; return lastSmudge; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user