Compare commits

...

2 Commits

Author SHA1 Message Date
Pieter-Jan Briers
07e4d6398b Version: 230.1.0-pvsdebug 2024-08-29 02:02:40 +02:00
Pieter-Jan Briers
c93e42d23d Enable PVS asserts even on release 2024-08-29 02:00:26 +02:00
4 changed files with 16 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
<Project>
<!-- This file automatically reset by Tools/version.py -->
<!-- This file automatically reset by Tools/version.py -->

View File

@@ -54,6 +54,9 @@ END TEMPLATE-->
*None yet*
## 230.1.0-pvsdebug
## 230.1.0
### New features

View File

@@ -1,3 +1,5 @@
#define DEBUG
using System;
using System.Collections.Generic;
using System.IO;

View File

@@ -1,3 +1,5 @@
#define DEBUG
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
@@ -56,6 +58,8 @@ internal sealed partial class PvsSystem
private WaitHandle? _deletionTask;
private int _mainThreadId;
/// <summary>
/// Expand the size of <see cref="_metadataMemory"/> (and all session data stores) one iteration.
/// </summary>
@@ -89,6 +93,8 @@ internal sealed partial class PvsSystem
/// </summary>
private void InitializePvsArray()
{
_mainThreadId = Environment.CurrentManagedThreadId;
var initialCount = _configManager.GetCVar(CVars.NetPvsEntityInitial);
var maxCount = _configManager.GetCVar(CVars.NetPvsEntityMax);
@@ -255,6 +261,8 @@ internal sealed partial class PvsSystem
/// </summary>
private void AssignEntityPointer(MetaDataComponent meta)
{
DebugTools.Assert(Environment.CurrentManagedThreadId == _mainThreadId);
if (_dataFreeListHead == PvsIndex.Invalid)
{
ExpandEntityCapacity();
@@ -313,6 +321,8 @@ internal sealed partial class PvsSystem
/// </summary>
private void ProcessDeletions()
{
DebugTools.Assert(Environment.CurrentManagedThreadId == _mainThreadId);
var curTick = _gameTiming.CurTick;
if (curTick < _lastReturn + (uint)ForceAckThreshold + 1)