Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
This commit is contained in:
@@ -28,17 +28,19 @@ struct Game {Queue queue;Manager manager;Queue* GetCallqueue(){return &queue;}Ma
|
||||
Game* GetGame(){return &game;}
|
||||
struct SCR_AIGroup {static bool Cast(int e){return e==10;}};
|
||||
struct ERR_Actors {static int deleted;static void DeleteSpawned(int e){assert(e==10);deleted++;}};int ERR_Actors::deleted=0;
|
||||
struct Performance {int stops=0;explicit operator bool()const{return true;}void Stop(int){stops++;}};
|
||||
struct Command {int stops=0;explicit operator bool()const{return true;}void Stop(){stops++;}};
|
||||
struct PhaseEvent {int count=0,oldPhase=-1,newPhase=-1;std::function<void()> callback;void Invoke(int old,int next){count++;oldPhase=old;newPhase=next;if(callback)callback();}};
|
||||
struct StopEvent {int count=0;std::function<void()> callback;void Invoke(){count++;if(callback)callback();}};
|
||||
struct ForceBoundary {int clears=0;void Clear(){clears++;}};
|
||||
struct Mode {
|
||||
int viewStops=0;void StopLocalViewDistance(){viewStops++;}
|
||||
ForceBoundary m_Forces,m_ForceAgents;
|
||||
int forceTicks=0;void TickForces(float){forceTicks++;}
|
||||
bool m_Stopped=false,m_NativeEndHandled=false;
|
||||
int m_Phase=Phase::PRISON,StartScenario=1,ServerTick=2,BindLocalObserver=3;
|
||||
string m_EndReason;string m_PreparationError;
|
||||
Command m_Command;PhaseEvent m_OnPhaseChanged;StopEvent m_OnStop;
|
||||
Performance m_Performance;Command m_Command;PhaseEvent m_OnPhaseChanged;StopEvent m_OnStop;
|
||||
std::vector<int> m_OwnedEntities={10,11};
|
||||
int published=0,feedback=0,nativeEnds=0,receivedData=0,nativeWork=0,escapeSnapshot=77;
|
||||
bool RefreshRadioFeedback(){feedback++;return true;}void PublishEscapeResults(){published++;}
|
||||
@@ -55,7 +57,7 @@ int main(){
|
||||
m.OnGameModeEnd(314);
|
||||
assert(m.m_Phase==Phase::DEFEAT&&m.m_Stopped&&m.m_NativeEndHandled&&!m.Active());
|
||||
assert(m.m_OnPhaseChanged.count==1&&m.m_OnPhaseChanged.oldPhase==phase);
|
||||
assert(m.m_OnStop.count==1&&m.m_Command.stops==1&&ERR_Actors::deleted==deleted+1);
|
||||
assert(m.m_OnStop.count==1&&m.m_Command.stops==1&&m.m_Performance.stops==1&&ERR_Actors::deleted==deleted+1);
|
||||
assert(game.queue.removed.size()==removed+4&&game.queue.removed[removed]==m.BindLocalObserver&&game.queue.removed[removed+1]==m.StartScenario&&game.queue.removed[removed+2]==m.ServerTick&&game.queue.removed[removed+3]==m.BindLocalObserver);
|
||||
assert(m.nativeEnds==1&&m.receivedData==314&&m.escapeSnapshot==77&&m.published==1&&m.m_Forces.clears==1&&m.m_ForceAgents.clears==1);
|
||||
m.OnGameModeEnd(999);m.StopServices();
|
||||
@@ -73,7 +75,7 @@ int main(){
|
||||
reentrant.OnGameModeEnd(1);assert(reentrant.nativeEnds==1&&reentrant.receivedData==1&&reentrant.m_OnStop.count==1);
|
||||
// Client closes local Active immediately, without mutating replicated phase/result.
|
||||
Replication::server=false;Mode client;client.OnGameModeEnd(44);
|
||||
assert(!client.Active()&&client.m_Phase==Phase::PRISON&&!client.m_Stopped&&client.published==0&&client.m_OnPhaseChanged.count==0&&client.nativeEnds==1);
|
||||
assert(client.viewStops==1&&!client.Active()&&client.m_Phase==Phase::PRISON&&!client.m_Stopped&&client.published==0&&client.m_OnPhaseChanged.count==0&&client.nativeEnds==1);
|
||||
Replication::server=true;
|
||||
// An already dequeued preparation callback is independently inert after stop/end.
|
||||
for(int fault=0;fault<4;fault++){
|
||||
|
||||
Reference in New Issue
Block a user