atlimit8
9efcf231e1
Refactor MobileInfo.CanEnterCell
2014-08-29 23:00:53 -05:00
atlimit8
fe57417aa8
Added int subCell = -1 to IMove.MoveIntoWorld & IPositionable.SetPosition(Actor self, CPos cell)
2014-08-29 23:00:53 -05:00
Alexander Fast
070d00c678
Fixes year numbers in license text in file headers.
2014-08-21 11:27:52 +02:00
Paul Chote
84d3497e96
Convert speed modifiers to integer percentages.
2014-08-12 11:41:09 +12:00
atlimit8
898bf4959a
Remove sub-cell offset bounds checking
2014-08-04 18:09:26 -05:00
atlimit8
9b30c21f93
Load subcells and default subcell index from mod.yaml
2014-08-04 18:09:26 -05:00
atlimit8
4b7537bb13
Moved MobileInfo.SubCellOffsets to Map (dropping static) & added Map.SubCellsDefaultIndex
2014-08-04 18:09:26 -05:00
atlimit8
43478dd500
enum SubCell => int & Dictionary<SubCell, WVec> => WVec[]
2014-08-04 18:09:26 -05:00
Taryn Hill
d6931f1d05
Added flag to Mobile/AircraftInfo: MoveIntoShroud.
...
Does not change the audio feedback given.
2014-08-01 20:43:29 -05:00
Pavlos Touboulidis
daed053a57
Fix and optimize FindTilesInCircle
2014-07-03 18:11:28 +03:00
Paul Chote
9487f49cd5
Replace WPos.ToCPos -> Map.CellContaining.
2014-06-27 23:30:40 +12:00
Paul Chote
7b52fa52b6
Replace CPos.CenterPosition -> Map.CenterOfCell.
2014-06-27 23:30:40 +12:00
Paul Chote
086ec07eb6
Add World parameter to Target.FromCell.
2014-06-27 23:30:40 +12:00
Paul Chote
5560f276ca
Map: Rename IsInMap -> Contains.
2014-06-27 22:07:03 +12:00
Paul Chote
2026747f2a
Use Map.IsInMap(CPos) for things that are checking CPos.
2014-06-27 19:20:46 +12:00
Paul Chote
58c3f9ad0c
Use MoveWithinRange for attack activities.
...
Fixes #2104 . Fixes #2923 . Fixes #4455 .
2014-06-15 22:48:43 +12:00
Paul Chote
887a515e14
Add MinRange plumbing to attack activities.
2014-06-15 22:48:43 +12:00
ScottNZ
90894aa03e
Use var everywhere
2014-06-15 22:17:34 +12:00
Pavlos Touboulidis
060d5326ed
Move FindTilesInCircle from WorldUtils to Map
2014-06-13 14:24:53 +03:00
Pavlos Touboulidis
77fb188585
Move ClampToWorld from WorldUtils to Map
2014-06-13 13:59:40 +03:00
Pavlos Touboulidis
c282fa1077
Move GetTerrainIndex/Info from WorldUtils to Map
2014-06-13 13:57:32 +03:00
Pavlos Touboulidis
092352729f
Change terrain type from string based dictionaries to arrays
2014-06-13 11:20:54 +03:00
RoosterDragon
2e992a7310
Changed MiniYaml.NodesDict property into a method.
...
Method is now called ToDictionary.
- Cached a few invocations into locals which should prevent some redundant evaluation.
- Added ToDictionary overloads that take projection functions for the keys and elements, since several callsites were doing a subsequent Linq.ToDictionary call to get this.
2014-06-09 17:06:42 +01:00
RoosterDragon
0c8bdff5be
Formatting fixes.
...
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
RoosterDragon
a0db80cb6a
Changes to reduce allocations in the main loop.
...
Targeted some methods that generated allocated a lot of memory in the main game loop:
- Actor.Render - Changed LINQ calls into equivalent loops. No allocation for delegates.
- Animation.Render - Returned an array rather than a yield expression. The array uses less memory than the complier generated enumerable.
- FrozenActor and FrozenUnderFog - Materialize the footprint into an array: The enumerable is not-trivial to evaluate is and evaluated many times inside the Tick function. The memory needed is minimal. Changed LINQ into equivalent loops to prevent delegate allocation. Should result in overall much faster calls.
- Widget.GetEventBounds - Changed LINQ calls into equivalent loops.
- MobileInfo.CanEnterCell - Changed LINQ calls into equivalent loops. Don't materialize list of blocking actors every time, instead enumerate them and only when they need to be checked.
- FrozenUnderFog.TickRender - Generate the renderables lazily and also remove a no-op Select call.
2014-05-23 14:48:11 +01:00
Paul Chote
4935266945
Merge FileFormats dll into Game and reorganise namespaces.
2014-04-17 01:20:47 +12:00
Paul Chote
ac5a4589ea
Add IMove.MoveIntoWorld and IMove.VisualMove.
2014-03-19 13:40:32 +13:00
Ian T. Jacobsen
3c80024113
Made Move::NotifyBlocker handle traits appropriately
2014-02-09 15:50:49 +00:00
Ian T. Jacobsen
2f2afd9fc5
Added OnNotifyBlockingMove to Mobile
2014-02-09 13:52:40 +00:00
Taryn
9c4ad15d1e
Changed most references of trait Mobile -> IMove.
...
In Mobile.cs IsMoving now has a public set as opposed to the initial internal.
Added IMoveInfo interface to go with *Info classes that require IMove.
WithRotor now uses IMove.IsMoving instead of (self.CenterPosition.Z > 0) as part of a check.
2014-02-02 15:13:49 -06:00
Paul Chote
1759d73ed7
Add following to IMove.
2014-02-01 10:55:05 +13:00
Paul Chote
512358eb72
Disable Move OrderTargeter if the Move order is rejected.
2013-12-30 08:54:02 +01:00
Paul Chote
0b8dafcdf0
Convert actor speed to world coordinates.
2013-12-26 19:45:13 +13:00
Paul Chote
aa2f865d5d
Convert Altitude to world coords.
...
Removes the obsolete AltitudeInit: use CenterPositionInit instead.
2013-12-26 17:25:07 +13:00
Matthias Mailänder
73750f5a7c
StyleCop cleanup
2013-11-02 18:03:55 +01:00
Paul Chote
e03ec690ff
Track actor positions in ActorMap.
2013-09-27 15:36:51 +12:00
Paul Chote
b00cc6108d
Make ActorMap addition explicit.
2013-09-27 15:36:51 +12:00
Paul Chote
dfd51c0caa
Introduce ScreenMap trait for caching screen-coord queries.
2013-09-27 15:36:25 +12:00
Paul Chote
bc5c11e44f
Check ITargetable when deciding target validity. Fixes #3659 .
2013-08-22 19:29:05 +12:00
Paul Chote
e4d1c654ed
Merge IOrderTargeter.CanTargetActor and CanTargetLocation.
2013-08-11 22:23:52 +12:00
Paul Chote
3b3e6edc90
Add IMove interface.
...
Fixes Rallypoints for aircraft.
2013-08-11 00:28:31 +12:00
Paul Chote
c3f04cc32e
Convert non-aircraft positioning to world coords.
...
This removes the incomplete and unused hover code
on Mobile, which would be more trouble that it is
currently worth to carry over.
2013-07-21 17:35:47 +12:00
Paul Chote
6a435752fd
Remove *PxPosition from IOccupySpace/IPositionable.
2013-07-21 17:35:46 +12:00
Paul Chote
19165d259d
Add world coord overloads to IOccupySpace and IPositionable.
2013-07-21 17:35:46 +12:00
Paul Chote
3e9bc63d4e
Prevent things from tweaking mobile position directly.
2013-07-21 17:35:45 +12:00
Paul Chote
0676116d77
Convert Move and related plumbing to world coordinates.
2013-07-21 17:35:45 +12:00
Paul Chote
048bed0a5e
Rename ITeleportable -> IPositionable.
2013-07-21 17:35:41 +12:00
Paul Chote
ecc119cb29
Combine IHasLocation -> IOccupySpace, IMove -> ITeleportable.
2013-07-21 17:33:32 +12:00
Paul Chote
2091a386fb
Improve support for picking a valid actor spawn cell.
2013-07-13 19:18:26 +12:00
Paul Chote
91698678a2
Use WRange for Mobile.MoveWithinRange.
2013-07-10 19:59:03 +12:00