Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/FAForever/fa into deploy…
Browse files Browse the repository at this point in the history
…/fafbeta
  • Loading branch information
shalkya committed Apr 4, 2020
2 parents c785720 + 720a72f commit 02aea8c
Show file tree
Hide file tree
Showing 331 changed files with 24,525 additions and 3,975 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Contributing
------------

To contribute, please fork this repository and make pull requests to the
develop branch.
`deploy/fafdevelop` branch.

Use the normal git conventions for commit messages, with the following rules:
- Subject line shorter than 80 characters
Expand Down
50 changes: 47 additions & 3 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Patch 3712 (15 April, 2020)
Patch 3713 (20 April, 2020)
============================
- Land
- Sniper Bot
Expand Down Expand Up @@ -114,6 +114,50 @@ Patch 3712 (15 April, 2020)
- TurinTurambar
- Petricpwnz

Patch 3712 (4 April, 2020)
============================

- Fixed wrong rating reward when someone quit the game before it ended
- Fixed the black plane bug for maps
- Allowed to scale the UI for people playing with big screens
- Changed the aesthetic of seraphim units
- Scoreboard now group people from same team together when score is off
- Added support for custom map Props
- Clean up improving the simulation
- Removed drag build from radars/sonars/stealth field and soothsayer
- Fixed the targeting of structures with beam weapons
- Addded Chinese translation and improved russian translation
- Score windows closing on pressing F2
- Added ability to spawn unit with veterancy using cheat
- Added ability to spawn multiple units while holding shift
- Fixed ACU playing twice the contruction visual fx when building
- Fixed UEF construction beams animation
- Improved the frigate sink animation rate
- Fixed the UI of UEF navy
- Improved CPU usage in lobby
- Moved mod manager menu from extra menu to main menu
- Fixed mods dependencies handling in mod manager
- Improved simspeed and removed code that wasn\'t working
- Improved Kennel animation and reduce lags due to kennel
- Improved text display in game and translation
- Fixed Russian name being wrongly displayed in lobby
- Improved dialogue button especially for coop
- Changed the display of the warning when trying to ctrl-k ACU in coop
- Updated mod and map blacklist

### Contributors ###
- speed2
- KionX
- keyser
- Uveso
- BlackYps
- Strogo
- Stratege
- ZeroCiel
- Exotic-Retard
- Lorhtan
- Askaholic

Patch 3711 (15 March, 2020)
============================
- Fix a bug allowing to generate resources for free
Expand Down Expand Up @@ -211,8 +255,8 @@ Patch 3709 (16 December, 2019)
- Overcharge no longer drains more than 5000 energy for the minimum damage of 1500
- Target priorities
- ACUs cannot be prioritised by units other than experimentals, labs, gunships, fighter/bombers and ACUs
- Repair
- Repair get 25% cost reduction
- Repair
- Repair get 25% cost reduction

### Contributors
- Strogo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ local SIFInainoStrategicMissileEffect04 = '/effects/Entities/SIFInainoStrategicM

InainoEffectController01 = Class(NullShell) {
EffectThread = function(self, Data)
local army = self:GetArmy()
self:ForkThread(self.CreateInitialHit, army)
self:ForkThread(self.CreateInitialBuildup, army)
self:ForkThread(self.CreateInitialHit, self.Army)
self:ForkThread(self.CreateInitialBuildup, self.Army)
self:ForkThread(self.CreateGroundFingers)
self:ForkThread(self.CreateInitialFingers)
self:ForkThread(self.MainBlast, army)
self:ForkThread(self.MainBlast, self.Army)
end,

CreateInitialHit = function(self, army)
Expand All @@ -40,10 +39,10 @@ InainoEffectController01 = Class(NullShell) {
WaitSeconds(5.00)

-- Create a light for this thing's flash.
CreateLightParticle(self, -1, self:GetArmy(), 160, 14, 'flare_lens_add_03', 'ramp_white_07')
CreateLightParticle(self, -1, self.Army, 160, 14, 'flare_lens_add_03', 'ramp_white_07')

-- Create our decals
CreateDecal(self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self:GetArmy())
CreateDecal(self:GetPosition(), RandomFloat(0.0,6.28), 'Scorch_012_albedo', '', 'Albedo', 80, 80, 1000, 0, self.Army)

-- Create explosion effects
for k, v in EffectTemplate.SIFInainoDetonate01 do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ SeraphimNukeEffectController01 = Class(NullShell) {
EffectThread = function(self)
self:ForkThread(self.CreateEffectInnerPlasma)
self:ForkThread(self.CreateEffectElectricity)
local army = self:GetArmy()
local position = self:GetPosition()

-- Knockdown force rings
Expand All @@ -74,29 +73,29 @@ SeraphimNukeEffectController01 = Class(NullShell) {
DamageRing(self, position, 0.1, 45, 1, 'Force', true)

-- Create full-screen glow flash
CreateLightParticle(self, -1, army, 140, 10, 'glow_02', 'ramp_blue_22')
CreateLightParticle(self, -1, self.Army, 140, 10, 'glow_02', 'ramp_blue_22')
WaitSeconds(0.3)
CreateLightParticle(self, -1, army, 80, 36, 'glow_02', 'ramp_blue_16')
CreateLightParticle(self, -1, self.Army, 80, 36, 'glow_02', 'ramp_blue_16')

-- Create explosion effects
for k, v in EffectTemplate.SIFExperimentalStrategicMissileHit01 do
emit = CreateEmitterAtEntity(self,army,v)
emit = CreateEmitterAtEntity(self, self.Army, v)
end

WaitSeconds(3.0)
CreateLightParticle(self, -1, army, 160, 6, 'glow_02', 'ramp_blue_16')
CreateLightParticle(self, -1, self.Army, 160, 6, 'glow_02', 'ramp_blue_16')
WaitSeconds(0.1)
CreateLightParticle(self, -1, army, 60, 60, 'glow', 'ramp_blue_22')
CreateLightParticle(self, -1, self.Army, 60, 60, 'glow', 'ramp_blue_22')

-- Create detonate effects
for k, v in EffectTemplate.SIFExperimentalStrategicMissileDetonate01 do
emit = CreateEmitterAtEntity(self,army,v)
emit = CreateEmitterAtEntity(self, self.Army, v)
end

-- Create ground decals
local orientation = RandomFloat(0,2*math.pi)
CreateDecal(position, orientation, 'Scorch_012_albedo', '', 'Albedo', 300, 300, 1200, 0, army)
CreateDecal(position, orientation, 'Crater01_normals', '', 'Normals', 150, 150, 1200, 0, army)
CreateDecal(position, orientation, 'Scorch_012_albedo', '', 'Albedo', 300, 300, 1200, 0, self.Army)
CreateDecal(position, orientation, 'Crater01_normals', '', 'Normals', 150, 150, 1200, 0, self.Army)

-- Create explosion dust ring
local vx, vy, vz = self:GetVelocity()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ local RandomFloat = Util.GetRandomFloat

UEFNukeEffectController01 = Class(NullShell) {
EffectThread = function(self)
local army = self:GetArmy()
local position = self:GetPosition()

-- Create full-screen glow flash
CreateLightParticle(self, -1, army, 35, 4, 'glow_02', 'ramp_red_02')
CreateLightParticle(self, -1, self.Army, 35, 4, 'glow_02', 'ramp_red_02')
WaitSeconds(0.25)
CreateLightParticle(self, -1, army, 80, 20, 'glow_03', 'ramp_fire_06')
CreateLightParticle(self, -1, self.Army, 80, 20, 'glow_03', 'ramp_fire_06')

-- Create initial fireball dome effect
local FireballDomeYOffset = -5
Expand All @@ -28,7 +27,7 @@ UEFNukeEffectController01 = Class(NullShell) {
self:CreateProjectile('/effects/entities/UEFNukeEffect02/UEFNukeEffect02_proj.bp',0,PlumeEffectYOffset,0,0,0,1)

for k, v in EffectTemplate.TNukeRings01 do
CreateEmitterAtEntity(self, army, v)
CreateEmitterAtEntity(self, self.Army, v)
end

self:CreateInitialFireballSmokeRing()
Expand All @@ -38,16 +37,16 @@ UEFNukeEffectController01 = Class(NullShell) {

WaitSeconds(0.55)

CreateLightParticle(self, -1, army, 300, 250, 'glow_03', 'ramp_nuke_04')
CreateLightParticle(self, -1, self.Army, 300, 250, 'glow_03', 'ramp_nuke_04')

-- Create ground decals
local orientation = RandomFloat(0,2*math.pi)
CreateDecal(position, orientation, 'Crater01_albedo', '', 'Albedo', 50, 50, 1200, 0, army)
CreateDecal(position, orientation, 'Crater01_normals', '', 'Normals', 50, 50, 1200, 0, army)
CreateDecal(position, orientation, 'nuke_scorch_003_albedo', '', 'Albedo', 60, 60, 1200, 0, army)
CreateDecal(position, orientation, 'Crater01_albedo', '', 'Albedo', 50, 50, 1200, 0, self.Army)
CreateDecal(position, orientation, 'Crater01_normals', '', 'Normals', 50, 50, 1200, 0, self.Army)
CreateDecal(position, orientation, 'nuke_scorch_003_albedo', '', 'Albedo', 60, 60, 1200, 0, self.Army)

WaitSeconds(8.9)
self:CreateGroundPlumeConvectionEffects(army)
self:CreateGroundPlumeConvectionEffects(self.Army)
end,

CreateInitialFireballSmokeRing = function(self)
Expand Down
71 changes: 41 additions & 30 deletions effects/mesh.fx
Original file line number Diff line number Diff line change
Expand Up @@ -2847,40 +2847,39 @@ float4 UnitFalloffPS_02( NORMALMAPPED_VERTEX vertex, uniform bool hiDefShadows)
float4 specular = tex2D( specularSampler, vertex.texcoord0.xy);
float3 environment = texCUBE( environmentSampler, reflect( -vertex.viewDirection, normal));

// Calculate lookup into falloff ramp
float NdotV = pow(1 - saturate(dot( normalize(vertex.viewDirection), normal )), 0.6);
float4 fallOff = tex2D( falloffSampler, float2(NdotV,vertex.material.x));
// Calculate lookup texture for falloff ramp
float NdotV = saturate(dot( normalize(vertex.viewDirection), normal ));
float4 fallOff = tex2D( falloffSampler, float2(pow(1 - NdotV, 0.6),vertex.material.x));

// Calculate lighting and shadows
float shadow = ComputeShadow( vertex.shadow, hiDefShadows);
float3 light = sunDiffuse * saturate( dotLightNormal ) * shadow + sunAmbient;
light = light + ( 1 - light ) * shadowFill;

// Normalizes the light to 1 for consistent results across different maps
float correction = sunDiffuse.g + sunAmbient.g;
light = light / correction + ( 1 - light / correction ) * shadowFill * 0.5;

// Calculate specular highlights of the sun
float3 reflection = reflect( sunDirection, normal);
float specularAmount = saturate( dot( reflection, -vertex.viewDirection));
float3 phongAdditive = pow( specularAmount, 9) * specular.g * shadow * 0.7;
float3 phongAdditive = pow( specularAmount, 9) * specular.g * shadow * sunDiffuse * 0.7;
phongAdditive *= (diffuse.g + 1);

// Calculate environment map reflection
float reflectivity = saturate(specular.r * 2.5); // Reduce artifacts of texture
environment *= reflectivity * fallOff.a;
float3 phongMultiplicative = light * environment * (1 - (diffuse.a * 0.5) ) * 0.7;

// Makes reflection more intense depending on the diffuse color. Could be cool, but
// looks like shit because the diffuse texture is not interpolated for unknown reasons
// TODO: find out why the diffuse texture is not interpolated
// float Amount = (diffuse.r + diffuse.g + diffuse.b) / 3;
// Amount = pow(Amount * 10, 0.3) * 2;
// Amount = 1.0 - (Amount * 0.25);
// phongMultiplicative *= (float3(0.5, 0.7, 0.9) + Amount);
environment *= reflectivity * fallOff.a * light;

float3 teamColSpec = NdotV * vertex.color.rgb * 2;
// This gives almost the same result as the ramp in fallOff.rgb, but we will use this,
// because it produces consistent results with different player colors
NdotV = 2 * pow(NdotV, 6) - 2 * NdotV + 1.5;
float3 teamColor = NdotV * vertex.color.rgb;

// There are also white highlights in the diffuse texture in some models
float whiteness = light * saturate(diffuse.rgb - float3 (0.4,0.4,0.4));
float3 whiteness = light * saturate(diffuse.rgb - float3 (0.4,0.4,0.4));

// Combine all previous computations
float3 color = (diffuse.rgb + float3 (0.25,0.35,0.45)) * light * (1 - diffuse.a) * 0.4;
color += phongAdditive + phongMultiplicative + (teamColSpec.rgb * diffuse.a) + whiteness;
float3 color = (diffuse.rgb + float3 (0.25,0.35,0.45)) * light * (1 - diffuse.a) * 0.65;
color += phongAdditive + environment;
color += (teamColor * diffuse.a) + whiteness;

// Substitute all the computations on pure glowing parts with the pure brightness texture
// to get rid of reflections and shadows
Expand All @@ -2889,9 +2888,9 @@ float4 UnitFalloffPS_02( NORMALMAPPED_VERTEX vertex, uniform bool hiDefShadows)
color += specular.b * 2 * mask;

// Bloom is only rendered where alpha > 0
float teamColGlow = (vertex.color.r + vertex.color.g + vertex.color.b) / 3;
teamColGlow = diffuse.a * (1 - teamColGlow) * 0.06;
float alpha = mirrored ? 0.5 : specular.b * 0.4 + teamColGlow;
float teamColorGlow = (vertex.color.r + vertex.color.g + vertex.color.b) / 3;
teamColorGlow = diffuse.a * (1 - teamColorGlow) * 0.06;
float alpha = mirrored ? 0.5 : specular.b * 0.4 + teamColorGlow;

return float4( color, alpha );
}
Expand Down Expand Up @@ -3118,17 +3117,29 @@ float4 SeraphimBuildPS( NORMALMAPPED_VERTEX vertex, uniform bool hiDefShadows) :
float3 normal = ComputeNormal( normalsSampler, vertex.texcoord0.zw + lerp( uvaddress.rb, 0, buildFractionMul ), rotationMatrix);
float dotLightNormal = dot(sunDirection,normal);

// Calculate lookup into falloff ramp
float NdotV = pow(1 - saturate(dot( normalize(vertex.viewDirection), normal )), 0.6);
float4 fallOff = tex2D( falloffSampler, float2(NdotV,vertex.depth.y));
// Calculate lookup texture for falloff ramp
float NdotV = saturate(dot( normalize(vertex.viewDirection), normal ));
float4 fallOff = tex2D( falloffSampler, float2(pow(1 - NdotV, 0.6),vertex.material.x));

// Calculate lighting and shadows
float shadow = ComputeShadow( vertex.shadow, hiDefShadows);
float3 light = sunDiffuse * saturate( dotLightNormal ) * shadow + sunAmbient;
float correction = sunDiffuse.g + sunAmbient.g;
light = light / correction + ( 1 - light / correction ) * shadowFill * 0.5;

float4 diffuse = tex2D( albedoSampler, texcoord2);
float4 specular = tex2D( specularSampler, texcoord2);
float3 environment = texCUBE( environmentSampler, reflect( -vertex.viewDirection, normal)) * specular.r * fallOff.a;
float3 environment = texCUBE( environmentSampler, reflect( -vertex.viewDirection, normal));
environment *= specular.r * fallOff.a * light;

// Calculate specular highlights of the sun
float3 reflection = reflect( sunDirection, normal);
float specularAmount = saturate( dot( reflection, -vertex.viewDirection));
float3 phongAdditive = pow( specularAmount, 9) * specular.g * shadow * sunDiffuse * 0.7;

// Determine our final output color
float3 color = diffuse.rgb * ( sunAmbient + ( 1 - sunAmbient ) * shadowFill) ;
color += environment * 0.7 + (NdotV * vertex.color.rgb * 2 * diffuse.a);
float3 color = (diffuse.rgb + float3 (0.25,0.35,0.45)) * light * (1 - diffuse.a) * 0.65;
color += environment + phongAdditive + (NdotV * vertex.color.rgb * diffuse.a);

return float4( color, max(vertex.material.y, 0.25) );
}
Expand Down Expand Up @@ -5848,7 +5859,7 @@ technique SeraphimBuild_MedFidelity
RasterizerState( Rasterizer_Cull_CW )

VertexShader = compile vs_1_1 SeraphimBuildVS();
PixelShader = compile ps_2_0 SeraphimBuildPS(false);
PixelShader = compile ps_2_a SeraphimBuildPS(true);
}
}

Expand Down
27 changes: 27 additions & 0 deletions engine/Sim.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1050,3 +1050,30 @@ end
function moho.entity_methods()
end

------
-- New functions from engine patch:
------

-- Returns list of deposits
-- Type: 0 - All, 1 - Mass, 2 - Energy
-- Result: {{X1,X2,Z1,Z2,Type,Dist},...}
function GetDepositsAroundPoint(X, Z, Radius, Type)
end

-- Returns true if the active session is a replay
-- Same as user SessionIsReplay.
function SessionIsReplay()
end

-- Allows set the rights to the army
-- targetArmyIndex, sourceHumanIndex is 0 based index
-- 'Set or Unset' is boolean
-- Nothing returns
function SetCommandSource(targetArmyIndex, sourceHumanIndex, Set or Unset)
end

-- Sets the focus without checking rights
-- armyIndex is 0 based index
-- Nothing returns
function SetFocusArmy(armyIndex or -1)
end
3 changes: 3 additions & 0 deletions engine/Sim/Unit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,9 @@ end
-- Example: 'KILLS'.
-- @param statName String, name of the stat to find out.
-- @param [defaultVal] TODO.
-- Special case for the Salem:
-- GetStat("h1_SetSalemAmph", 0 or 1)
-- Disable/Enable amphibious mode
function Unit:GetStat(statName, [defaultVal])
end

Expand Down
9 changes: 9 additions & 0 deletions engine/User.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1051,3 +1051,12 @@ end
function moho.discovery_service_methods()
end

------
-- New functions from engine patch:
------

-- Returns list of deposits
-- Type: 0 - All, 1 - Mass, 2 - Energy
-- Result: {{X1,X2,Z1,Z2,Type,Dist},...}
function GetDepositsAroundPoint(X, Z, Radius, Type)
end
5 changes: 5 additions & 0 deletions etc/faf/blacklist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ Blacklist = {
['7749EEN4-DE86-5CC2-39AC-35692BDE76XF'] = UPGRADE,
['1749EEN4-DE86-5CC2-39AC-35692BDE76XF'] = UPGRADE,
['EEFFA8C6-96D9-11E4-9DA1-460D1D5D46B0'] = UPGRADE,
['1dd86878-6d2f-4f6d-b879-d14d37bcd45b'] = UPGRADE, --V9

-- OneClickWonder
['c5cc7241-d9f8-4b46-8662-ad130e426a4a'] = UPGRADE,
Expand Down Expand Up @@ -189,6 +190,10 @@ Blacklist = {
['fff6f6c8-248a-11de-8c30-362b9e100007'] = HARMFUL,
['fff6f6c8-248a-11de-8c30-362b9e100008'] = HARMFUL,
['fff6f6c8-248a-11de-8c30-362b9e100009'] = HARMFUL,

-- cheat mods
['086060ea-6452-466d-b576-f756f9c913ef'] = HARMFUL, --Quality of Performance v3
['086061ea-6452-466d-b576-f756f9c913ef'] = HARMFUL, --Quality of Performance v4

-- cheat mod
['086060ea-6452-466d-b576-f756f9c913ef'] = HARMFUL, --Quality of Performance v3
Expand Down
1 change: 0 additions & 1 deletion etc/faf/mapblacklist.lua
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,6 @@ MapBlacklist = {
['denmark3.v0002'] = true,
['denmark3.v0003'] = true,
['depths v6'] = true,
['desert arena.v0001'] = true,
['desert arena v2.v0002'] = true,
['desert conflict.v0001'] = true,
['desert fox.v0001'] = true,
Expand Down
Loading

0 comments on commit 02aea8c

Please sign in to comment.