Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions l2-unity-todo.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
TODO (priority from top to bottom)

cache entity heading server side
fix player position desync
fix moving monster desync at login
login / logout

wait for monster attack animation end before following player
check if AI isnt dead before applying damage to AI's target

shadows are too dark

update npc animator as player animator to adapt to different weapon types
Expand All @@ -12,8 +14,7 @@ reduce amount data sent by players:
- share action instead of animationid, store current action in entity
- get col_r, col_r from system/chargrp.dat instead

wait for monster attack animation end before following player
check if AI isnt dead before applying damage to AI's target

monster should follow even if not on geodata/path cant be found

global variable to scale all ambientsounds
Expand All @@ -27,6 +28,9 @@ login server

DONE

fix moving monster desync at login
cache entity heading server side
fix player position desync
add player damage sound
dual/bow animations
add all atk animations (atk01..03)
Expand Down
247 changes: 106 additions & 141 deletions l2-unity/Assets/Scenes/Game.unity
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ RenderSettings:
m_ReflectionIntensity: 0.25
m_CustomReflection: {fileID: 0}
m_Sun: {fileID: 1678428046}
m_IndirectSpecularColor: {r: 0.029722925, g: 0.056262095, b: 0.0710271, a: 0.25}
m_IndirectSpecularColor: {r: 0.06290777, g: 0.08371709, b: 0.09502034, a: 0.25}
m_UseRadianceAmbientProbe: 0
--- !u!157 &3
LightmapSettings:
Expand Down Expand Up @@ -861,7 +861,7 @@ PrefabInstance:
- target: {fileID: 14083907825353274, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
propertyPath: m_Materials.Array.data[0]
value:
objectReference: {fileID: 940592050}
objectReference: {fileID: 1568223987}
- target: {fileID: 2134954596300280144, guid: 8742fc349ac4f354d9cfb98ebb79a0e3, type: 3}
propertyPath: m_Name
value: Height Fog Global
Expand Down Expand Up @@ -1202,41 +1202,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 3500825470917465012, guid: e9c4b747c5b27f843b387df47a34245d, type: 3}
m_PrefabInstance: {fileID: 923511046}
m_PrefabAsset: {fileID: 0}
--- !u!21 &940592050
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Height Fog Global
m_Shader: {fileID: 4800000, guid: 3a7ef1b66bafb7a448a880ef76d2e6e6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3001
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _FogCat: 1
- _HeightFogGlobal: 1
- _IsHeightFogShader: 1
- _NoiseCat: 1
- _SkyboxCat: 1
m_Colors: []
m_BuildTextureStacks: []
--- !u!1 &1018032324
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1561,75 +1526,6 @@ Transform:
m_Children: []
m_Father: {fileID: 581901348}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1259519039
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Override
m_Shader: {fileID: 4800000, guid: a3a3bc8785681554d9558e2ea68f100e, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _DirectionalFalloff: 2
- _DirectionalIntensity: 1
- _FarDistanceHeight: 0
- _FarDistanceOffset: 0
- _FogAxisMode: 1
- _FogCameraMode: 0
- _FogCat: 1
- _FogColorDuo: 1
- _FogDistanceEnd: 100
- _FogDistanceFalloff: 2
- _FogDistanceStart: 0
- _FogHeightEnd: 100
- _FogHeightFalloff: 2
- _FogHeightStart: 0
- _FogIntensity: 1
- _FogLayersMode: 0
- _IsHeightFogPreset: 1
- _IsHeightFogShader: 1
- _JitterIntensity: 1
- _NoiseCat: 1
- _NoiseDistanceEnd: 50
- _NoiseIntensity: 1
- _NoiseMax: 1
- _NoiseMin: 0
- _NoiseModeBlend: 1
- _NoiseScale: 30
- _SkyboxCat: 1
- _SkyboxFogBottom: 0
- _SkyboxFogFalloff: 1
- _SkyboxFogFill: 1
- _SkyboxFogHeight: 1
- _SkyboxFogIntensity: 1
- _SkyboxFogOffset: 0
m_Colors:
- _DirectionalColor: {r: 1, g: 0.7793103, b: 0.5, a: 1}
- _DirectionalDir: {r: 0, g: 0, b: 0, a: 0}
- _FogAxisOption: {r: 0, g: 0, b: 0, a: 0}
- _FogColorEnd: {r: 0.8862745, g: 1.443137, b: 2, a: 1}
- _FogColorStart: {r: 0.4411765, g: 0.722515, b: 1, a: 1}
- _NoiseSpeed: {r: 0.5, g: 0, b: 0.5, a: 0}
m_BuildTextureStacks: []
--- !u!1 &1269356233
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1764,6 +1660,75 @@ MonoBehaviour:
blendDistance: 0
weight: 1
sharedProfile: {fileID: 11400000, guid: 2606cb68fb3b8fa44b4cbf69f8fdc10e, type: 2}
--- !u!21 &1415400409
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Override
m_Shader: {fileID: 4800000, guid: a3a3bc8785681554d9558e2ea68f100e, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _DirectionalFalloff: 2
- _DirectionalIntensity: 1
- _FarDistanceHeight: 0
- _FarDistanceOffset: 0
- _FogAxisMode: 1
- _FogCameraMode: 0
- _FogCat: 1
- _FogColorDuo: 1
- _FogDistanceEnd: 100
- _FogDistanceFalloff: 2
- _FogDistanceStart: 0
- _FogHeightEnd: 100
- _FogHeightFalloff: 2
- _FogHeightStart: 0
- _FogIntensity: 1
- _FogLayersMode: 0
- _IsHeightFogPreset: 1
- _IsHeightFogShader: 1
- _JitterIntensity: 1
- _NoiseCat: 1
- _NoiseDistanceEnd: 50
- _NoiseIntensity: 1
- _NoiseMax: 1
- _NoiseMin: 0
- _NoiseModeBlend: 1
- _NoiseScale: 30
- _SkyboxCat: 1
- _SkyboxFogBottom: 0
- _SkyboxFogFalloff: 1
- _SkyboxFogFill: 1
- _SkyboxFogHeight: 1
- _SkyboxFogIntensity: 1
- _SkyboxFogOffset: 0
m_Colors:
- _DirectionalColor: {r: 1, g: 0.7793103, b: 0.5, a: 1}
- _DirectionalDir: {r: 0, g: 0, b: 0, a: 0}
- _FogAxisOption: {r: 0, g: 0, b: 0, a: 0}
- _FogColorEnd: {r: 0.8862745, g: 1.443137, b: 2, a: 1}
- _FogColorStart: {r: 0.4411765, g: 0.722515, b: 1, a: 1}
- _NoiseSpeed: {r: 0.5, g: 0, b: 0.5, a: 0}
m_BuildTextureStacks: []
--- !u!1 &1433411788
GameObject:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -1956,6 +1921,41 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &1568223987
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Height Fog Global
m_Shader: {fileID: 4800000, guid: 3a7ef1b66bafb7a448a880ef76d2e6e6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3001
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _FogCat: 1
- _HeightFogGlobal: 1
- _IsHeightFogShader: 1
- _NoiseCat: 1
- _SkyboxCat: 1
m_Colors: []
m_BuildTextureStacks: []
--- !u!1001 &1675638824
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down Expand Up @@ -2440,41 +2440,6 @@ Transform:
m_Children: []
m_Father: {fileID: 581901348}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!21 &2130106148
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Height Fog Global
m_Shader: {fileID: 4800000, guid: 3a7ef1b66bafb7a448a880ef76d2e6e6, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: 3001
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs: []
m_Ints: []
m_Floats:
- _AdvancedCat: 1
- _Banner: 1
- _DirectionalCat: 1
- _FogCat: 1
- _HeightFogGlobal: 1
- _IsHeightFogShader: 1
- _NoiseCat: 1
- _SkyboxCat: 1
m_Colors: []
m_BuildTextureStacks: []
--- !u!1001 &41349904378485352
PrefabInstance:
m_ObjectHideFlags: 0
Expand Down
2 changes: 2 additions & 0 deletions l2-unity/Assets/Scripts/Game/Entity/Entity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

[System.Serializable]
public class Entity : MonoBehaviour {
[SerializeField] private bool _entityLoaded;
[SerializeField] private NetworkIdentity _identity;
[SerializeField] private Status _status;
[SerializeField] private Stats _stats;
Expand Down Expand Up @@ -35,6 +36,7 @@ public class Entity : MonoBehaviour {
public long StartAutoAttackTime { get { return _startAutoAttackTime; } }
public CharacterRace Race { get { return _race; } set { _race = value; } }
public CharacterRaceAnimation RaceId { get { return _raceId; } set { _raceId = value; } }
public bool EntityLoaded { get { return _entityLoaded; } set { _entityLoaded = value; } }

public void FixedUpdate() {
LookAtTarget();
Expand Down
2 changes: 2 additions & 0 deletions l2-unity/Assets/Scripts/Game/Entity/MonsterEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class MonsterEntity : Entity {
public override void Initialize() {
base.Initialize();
_monsterAnimationAudioHandler = GetComponent<MonsterAnimationAudioHandler>();

EntityLoaded = true;
}

protected override void OnDeath() {
Expand Down
2 changes: 2 additions & 0 deletions l2-unity/Assets/Scripts/Game/Entity/NpcEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public class NpcEntity : Entity {
public override void Initialize() {
base.Initialize();
_npcAnimationAudioHandler = GetComponent<CharacterAnimationAudioHandler>();

EntityLoaded = true;
}

protected override void OnDeath() {
Expand Down
2 changes: 2 additions & 0 deletions l2-unity/Assets/Scripts/Game/Entity/PlayerEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public override void Initialize() {
}

EquipAllArmors();

EntityLoaded = true;
}

void OnDestroy() {
Expand Down
2 changes: 2 additions & 0 deletions l2-unity/Assets/Scripts/Game/Entity/UserEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public override void Initialize() {
_characterAnimationAudioHandler = transform.GetChild(0).GetComponentInChildren<CharacterAnimationAudioHandler>();

EquipAllArmors();

EntityLoaded = true;
}

private void EquipAllArmors() {
Expand Down
Loading