Commit Graph

113 Commits

Author SHA1 Message Date
Pavel Penev
8d4d37ca46 Make GPS respect shroud 2015-11-21 01:11:40 +02:00
Pavel Penev
78e2eabd17 Remove byPlayer parameter from IFogVisibilityModifier.HasFogVisibility() 2015-11-21 01:11:38 +02:00
atlimit8
9acf121eb1 Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>() 2015-09-21 15:50:57 -05:00
RoosterDragon
d1960258db Speed up Player.CanViewActor.
Create Actor.CanBeViewedByPlayer and simply call this instead. The actor can cache all trait lookups on construction to avoid them being repeated for every visibility check.
2015-09-06 23:29:09 +01:00
Matthias Mailänder
88b98fa8ef Merge pull request #8975 from penev92/bleed_rename
Some more renaming from "country" and "race" to "faction"
2015-08-08 16:13:16 +02:00
Matthias Mailänder
6c45763d75 avoid observers being allied to world owning neutral players 2015-08-05 22:35:28 +02:00
Pavel Penev
5eaf5b5b51 Rename Session.Client.Race 2015-08-05 17:45:56 +03:00
penev92
479eb307d6 Remove unused parameter from Player's constructor 2015-07-15 04:58:50 +03:00
penev92
317576a9bb Touch up Player.cs 2015-07-15 04:22:57 +03:00
penev92
b8aa92c4be Rename Player.DisplayCountry to Player.DisplayFaction 2015-07-15 04:10:13 +03:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
Oliver Brakmann
380cf22477 Merge pull request #8661 from penev92/bleed_renameCountry
Rename the Country trait to Faction
2015-07-14 21:05:52 +02:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
penev92
a1af5386e0 Rename the Country trait to Faction 2015-07-14 18:50:31 +03:00
penev92
1d49c23af0 Rename PlayerReference.Race and LockRace to Faction and LockFaction 2015-07-05 23:08:49 +03:00
Oliver Brakmann
fc8a34a7a2 Match all kinds of spectators in Player::IsAlliedWith() 2015-06-29 18:11:52 +02:00
Paul Chote
0677c309f3 Move Shroud.IsTargetable to Player. 2015-06-19 22:02:08 +01:00
Paul Chote
b887d2bfd7 Introduce IDefaultVisibility. 2015-06-19 22:02:06 +01:00
Paul Chote
0a2757d0e0 Remove Shroud.IsExplored(Actor) and IsVisible(Actor). 2015-06-19 22:01:48 +01:00
Curtis Shmyr
6ca51e47c1 Give ally players a yellow hp bar for team health colors 2015-05-10 11:12:10 -06:00
Paul Chote
4b22436d14 Fix a regression from #7987. 2015-04-20 04:55:31 +12:00
Paul Chote
3cfa96e7a6 Fix random country display. 2015-04-20 03:33:46 +12:00
penev92
cc73ba09ab Fix flag-related crash for scripted "players" 2015-04-13 23:36:29 +03:00
Oliver Brakmann
7b1b17df4a Allow non-selectable factions for players if LockRace is set 2015-04-12 15:27:25 +02:00
penev92
2c108a1845 Use proper names and flags for unknown players 2015-04-04 17:24:19 +03:00
abcdefg30
63fe578ba8 Allow picking of a random subfaction 2015-03-12 21:34:23 +01:00
Paul Chote
b968b527d2 Allow map players to use non-selectable races. 2015-03-03 18:45:46 +00:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Hellhake
5a97a4b63b Fix StyleCop warnings in OpenRA.Game 2015-01-02 12:11:01 +01:00
Matthias Mailänder
e16bc064a0 fix the end game dialog not showing which objectives failed
- don't mark everything as failed just because one objective did
- remove fake objectives workarounds for non-playable factions
2014-12-06 21:04:46 +01:00
abcdefg30
d7857416b1 Added two diplomacy functions to lua
...and sneaked into AUTHORS
2014-10-19 13:30:00 +02:00
Paul Chote
19760b44cc Don’t regenerate the lua player bindings each query. 2014-10-12 10:43:15 +13:00
Matthias Mailänder
6eabd080b8 StyleCop 2014-06-22 13:30:35 +02:00
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Pavlos Touboulidis
b8bbd55598 Misc changes
* Use Pair instead of KeyValuePair
* double -> var
* Butcher XML comments
* Change WinState default to Undefined and use it instead of the new GameOutcome
* Other changes
2014-05-22 21:57:07 +03:00
Pavlos Touboulidis
de0a5ebd43 Improve replay metadata and the replay browser
List of changes:

* Better and more filters with new layout, for both mods.

* Rename/Delete/Detele all functionality.

* Simplified ReplayMetadata class considerably by introducing a new
GameInformation data object. The new GameInformation class contains
more information than previously available so the new solution is not
compatible with old replays, meaning it can't read old replays.

* Better and cleaner game information gathering in order to be written
at the end of the replay file.

* Revert changes to ReplayConnection, no longer necessary.

* Better exception message on missing sprites and fonts.

* New "SpawnOccupant" class that holds all the information needed by the
MapPreviewWidget to visualize a spawn point. It was using Session.Client
before and it was necessary to separate it to be able to show information
not available at lobby time.

* Fix keyboard focus UI bug when closing a window would not remove focus.
2014-05-22 21:54:14 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Paul Chote
d73af0190f Add a new native-lua implementation. 2014-05-02 22:18:34 +12:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Matthias Mailänder
fbf408b886 add a spectator player that shares shroud with everyone
closes #4607
2014-03-13 21:57:59 +01:00
Matthias Mailänder
bbff99d958 remove kill/death count in player/health 2013-08-11 12:21:33 +02:00
Paul Chote
656476991f Replace ColorRamp with HSLColor everywhere.
Fixes:
* Nuclear-purple color exploit.
* #3247.
* Removes a bunch of unnecessary color conversions every frame.

Caveats:
* The ramp range is now defined on the palette, so ramps can no longer be set per-player (may impact maps which define custom colors).
* It's no longer possible to perfectly recreate the original WW color ramps (I doubt we care).
* The old ColorRamp setting isn't migrated, so players will lose their color settings.
2013-05-10 19:23:30 +12:00
Chris Forbes
3eed67c61b Merge pull request #2945 from bidifx/syncrep
fixes #2941 -  dump fields in syncreport
2013-04-12 12:10:48 -07:00
Paul Chote
248e815d99 More shroud refactoring.
This introduces a hash on Shroud which ShroudRenderer
can observe, removing the need to explicitly twiddle
a dirty flag between objects.

Shroud disabling is now done via RenderPlayer, so
enabling the cheat or winning/losing will now give
vis equivalent to an observer.
2013-04-10 21:08:22 +12:00
Paul Chote
c428cad70c Refactor per-player shrouds & fix shellmap shroud. 2013-04-10 19:36:03 +12:00
Sascha Biedermann
2fb12f755a added ToString() for OpenRA.Player 2013-04-07 17:01:55 +02:00
Matthias Mailänder
0a82bfe552 format TODO: uniformly to auto-generate task list in MonoDevelop 2013-03-27 09:45:17 +01:00
Scott_NZ
8a32e5761c Change map player clientindex to 0 2013-01-28 00:33:05 +13:00