Commit Graph

4605 Commits

Author SHA1 Message Date
reaperrr
ade85f8977 Skip DamageWarhead armor lookups if no Versus defined
- directly return 100 when no Versus values are defined (meaning the warhead would have 100% efficiency vs. all armor types anyway)
2018-09-29 12:54:34 +01:00
reaperrr
1f7edf9f0b Cache *Notify traits in Health where applicable
During heated battles, those TraitsImplementing look-ups in Health might cause bursty CPU load on warhead impacts. Caching the notify traits of the actor + owner can reduce the trait look-ups per impact by more than half.
2018-09-29 12:54:34 +01:00
reaperrr
13769d48a1 Minor Health readability style fix 2018-09-29 12:54:34 +01:00
reaperrr
43693d84d1 Migrate DamageState thresholds to integer
While avoiding divisions.

While there haven't been any desyncs to speak of recently (not in this part of the code, in any case), this still looks like an oversight from when we migrated away from using floats.
This also makes it easier to expose the thresholds to modders later.
2018-09-29 12:54:34 +01:00
reaperrr
0b0c3b7170 Changed an 'if' to 'else' in Health.Tick
Since the two 'if's were mutually exclusive, the 2nd 'if' was turned into an 'else' to potentially skip that check if the 1st succeeds.
2018-09-29 12:54:34 +01:00
Mustafa Alperen Seki
b53c13dca4 Add GrantConditionOnProduction 2018-09-29 12:10:11 +01:00
abcdefg30
4298584af2 Prevent units from gaining more experience than MaxLevel requires 2018-09-28 22:48:50 +01:00
Andre Mohren
a86f41cd5c Made Valued optional for traits who do not require it. 2018-09-28 22:06:56 +01:00
reaperrr
ec15acbc80 Enable LaserZap launch-effect syncing with current source barrel/muzzle facing 2018-09-28 21:32:34 +02:00
reaperrr
28c89920ac Add dynamic muzzle LaunchEffect facing plumbing 2018-09-28 21:32:34 +02:00
reaperrr
8144fca5be Merge repair and rearm anim traits into WithResupplyAnimation
This is the safest approach to avoid conflicts/visual glitches when the host is responsible for both resupply types.
The new trait will simply play a looping animation as long as the actor is resupplying in any form.
2018-09-27 16:38:08 +02:00
reaperrr
288dfdbf03 Update UpdatePaths and move bleed rules to subfolder 2018-09-26 23:43:30 +01:00
Paul Chote
09d8aafddf Add a lint test for audio notifications.
Only traits are linted - the UI still hardcodes
too many audio references for this to be worthwhile.
2018-09-26 13:57:05 +02:00
Andre Mohren
f342ecf18a Added UpdateRule. 2018-09-24 22:43:14 +02:00
Andre Mohren
a68ea0fe2d RepairsUnits notification now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
091f660dc7 Extracted Repairing notification to RepairableBuilding. 2018-09-24 22:43:14 +02:00
Andre Mohren
a0ad79e555 Extracted RadarUp and RadarDown notifications to RadarWidget. 2018-09-24 22:43:14 +02:00
Andre Mohren
d7f81d4a20 Extracted Win and Lose and Leave notifications MissionObjectives. 2018-09-24 22:43:14 +02:00
Andre Mohren
fac758f38e ProductionQueue notifications now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
c2b1a5f4e0 Extracted BuildingCannotPlaceAudio to PlaceBuilding. 2018-09-24 22:43:14 +02:00
Andre Mohren
8834cee13c PlaceBuilding notification now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
7057e32902 PowerManager notification now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
90c2249317 PrimaryBuilding notification now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
cf84e6f8d5 GainsExperience notification now optional. 2018-09-24 22:43:14 +02:00
Andre Mohren
e353ff326e Extracted CashTickUp and CashTickDown to PlayerResources. 2018-09-24 22:43:14 +02:00
reaperrr
bb7c19ad02 Fix spawning 1 crate too much if maximum == minimum
If Maximum == Minimum but 'crates' < Maximum, the formula would simply return min + 1 regardless of max being identical to min.
Only adding 1 more crate if Maximum is higher than Minimum fixes that.
2018-09-24 22:06:21 +02:00
reaperrr
1098804f9b Make WithSpriteBody always use Animation.PlayRepeating
... for looped sequences.

PlayCustomAnimationRepeating looping back into itself via Action instead of simply using Animation.PlayRepeating is weird, and in fact causes a slight 'desync' in animation speed with Animation.PlayRepeating in at least one downstream mod.
2018-09-24 22:06:10 +02:00
abcdefg30
978d447d42 Disable the restart button on dedicated servers 2018-09-22 15:44:56 +01:00
abcdefg30
92e8fbf4d0 Make the menu widget readonly 2018-09-22 15:44:56 +01:00
Ectras
d9946f63e4 Renamed EditorTilesetFilter to MapEditorData and added an update rule 2018-09-22 15:12:15 +02:00
Matthias Mailänder
cb05d8a98d Fix CustomTerrainDebugOverlay not rendered in isometric mods 2018-09-19 20:04:41 +02:00
Noam
4e7a35b50f add NoAvailableMaps exception.
modify ChooseInitialMap to throw NoAvailalbeMaps exception if no maps were loaded.
implement Utilities.TryWithPrompt - safe execution of a provided action with ability to prompt user on error.
2018-09-19 12:52:51 +02:00
Paul Chote
7438af8266 Improve status line display for unknown-size downloads. 2018-09-14 18:55:58 +02:00
Emmalyn Renato
3f4d5fa68c Fix display of progress text in Advanced Install when total file size is unknown. 2018-09-14 17:30:53 +01:00
Dennis Snell
95558a36ab Fix: Display progress message properly when download size missing (#1)
When I downloaded the assets for Red Alert through the Quick Install I noticed the progress bar proceed and display a recognizable message: `Downloading from … 1.47/12 MB (12%)`. This was fine.

When I downloaded the assets for one of the other games, maybe Dune 2000, there was obviously no total download size available. I was an unexpected message: `Downloading from … 1.47/NaN (NaN%)`

The code handling network progress events seems to be aware of the possibility that no full download size exists but it doesn't update the message. In this path I'm proposing that we display a separate messaging indicating that we don't know how much more we have to download for these cases.

Of the alternative ways to implement this I chose to move the reassignment of `getStatusText` into the conditional structures to preserve the existing choice. The message was qualitatively different and so I felt it worthwhile to create entirely different closures vs. doing something like this…

```cs
getStatusText = () => ( Double.isNaN( dataTotal ) ? "Downloading {1} of unknown amount" : "Downloading {1}/{2}" ).F( … );
```
2018-09-13 16:55:51 +02:00
Andre Mohren
ef7c49c116 Allow mods to determine associated SuperPower from SelectGenericPowerTarget 2018-09-12 15:11:18 +02:00
Paul Chote
16ff9fbc8e Fix menu/exit fade effect for paused replays. 2018-09-11 23:29:23 +02:00
reaperrr
bbf6e38faa Always leave trails when no TerrainTypes are defined
Requiring terrain types is bogus, as it unnecessarily complicates using this trait for airborne units.
2018-09-10 19:45:02 +02:00
Paul Chote
0a507f3d33 Allow deploy orders to be queued from the command bar. 2018-09-10 19:42:24 +02:00
Paul Chote
3abc85b588 Add a Desc for Buildable.BuildPaletteOrder.
Also removes the long-outdated UI-fluff comment.
2018-09-10 11:27:50 +02:00
abcdefg30
5d1c37a4c5 Remove the CodeAnalysisRuleSet property from all csproj files 2018-08-25 22:02:59 +02:00
Paul Chote
48f2519811 Make SetupLatencyWidget consistent with SetupProfileWidget. 2018-08-25 21:56:10 +02:00
Paul Chote
0c098e74f1 Don't crash when mousing over a bot as a non-admin. 2018-08-25 21:56:10 +02:00
Chris Forbes
67d9ad6a93 Convert cloak types to use BitSet
Fixes #15412
2018-08-20 01:11:43 +02:00
Paul Chote
8634c001f9 Add requires-auth indicator to the server lists. 2018-08-18 16:57:28 +02:00
Paul Chote
9ec22e48a6 Revert "Re-active Edge-Scrolling for inverted Mouse-Scrolling"
This reverts commit c4867d4030db1edc6400e6f3f62ca64905607a3c.
2018-08-18 16:51:51 +02:00
Paul Chote
03adceb656 Rework master server ping rate-limit logic.
Pings are now delayed instead of dropped to avoid data loss.
2018-08-18 09:31:11 +01:00
Paul Chote
efccd610d3 Simplify server tick timeout handling. 2018-08-18 09:31:11 +01:00
Andre Mohren
8c5caaf154 Fixed unnecessary crash if RallyPoint palette is not used. 2018-08-16 22:24:58 +02:00
Mustafa Alperen Seki
6df243f79b Fix GivesExperienceModifier not working 2018-08-16 19:44:08 +02:00