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
2 changes: 2 additions & 0 deletions Game.Client/C_Rope.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,5 +81,7 @@ public partial class C_RopeKeyframe : C_BaseEntity
public float Width;
[NetworkVar("m_flScrollSpeed")]
public float ScrollSpeed;

public override Vector3 WorldSpaceCenter() => GetAbsOrigin();
}

2 changes: 1 addition & 1 deletion Game.Client/DetailObjectSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1284,7 +1284,7 @@ int BuildOutSortedSprites(FastDetailLeafSpriteList data, in Vector3 viewOrigin,
FastSpriteX4[] sprites = data.Sprites!;
SortInfo[] outSort = FastSortInfos!;
FastSpriteQuadBuildoutBufferX4[] quadBufferOut = BuildoutBuffer!;
int spriteIdx = 0;
int spriteIdx = data.StartSIMDSprite;
int outIdx = 0;
int quadIdx = 0;
int curidx = 0;
Expand Down
4 changes: 1 addition & 3 deletions Game.Shared/BaseEntityShared.cs
Original file line number Diff line number Diff line change
Expand Up @@ -635,9 +635,7 @@ public static void SetPredictionRandomSeed(in UserCmd cmd) {
}

public BasePlayer? GetSimulatingPlayer() => PlayerSimulationOwner.Get();
public virtual ref readonly Vector3 WorldSpaceCenter() {
return ref GetAbsOrigin(); // todo
}
public virtual Vector3 WorldSpaceCenter() => CollisionProp().WorldSpaceCenter();

public void SetPlayerSimulated(BasePlayer owner) {
b_IsPlayerSimulated = true;
Expand Down
2 changes: 2 additions & 0 deletions Game.Shared/Beam.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public partial class
#endif
: BaseEntity
{
// todo: WorldSpaceCenter override ((GetAbsStartPos() + GetAbsEndPos()) * 0.5f), it needs GetAbsStartPos and GetAbsEndPos ported first

public const int ATTACHMENT_INDEX_BITS = 5;
public const float MAX_BEAM_WIDTH = 102.3f;
public const float MAX_BEAM_SCROLLSPEED = 100f;
Expand Down
6 changes: 5 additions & 1 deletion Source.Engine/DtEncode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,11 @@ public static void Array_FastCopy(SendProp sendProp, RecvProp recvProp, object s
}
}

public static void Array_DecodeZero(ref DecodeInfo info) => throw new NotImplementedException();
public static void Array_DecodeZero(ref DecodeInfo info) {
ArrayLengthRecvProxyFn? lengthProxy = info.RecvProxyData.RecvProp.GetArrayLengthProxy();
if (lengthProxy != null)
lengthProxy(info.Object, info.RecvProxyData.ObjectID, 0);
}
public static void Array_Encode(object instance, ref DVariant var, SendProp prop, bf_write writeOut, int objectID) {
SendProp? arrayProp = prop.GetArrayProp();
AssertMsg(arrayProp != null, $"Array_Decode: missing m_pArrayProp for SendProp '{prop.GetName()}'.");
Expand Down
Loading