--- a/tests/test_observer_ownership.py +++ b/tests/test_observer_ownership.py @@ -45,11 +45,11 @@ // changes only its own currently selected camera, never a foreign current one. ~SCR_ManualCamera(){Terminate();if(manager.current==this&&previous)manager.SetCamera(previous);deleted++;} }; -struct SCR_HintManagerComponent{int attempts=0;static SCR_HintManagerComponent*GetInstance(){static SCR_HintManagerComponent h;return &h;}bool ShowCustom(string,string,int){attempts++;return true;}}; +struct SCR_HintManagerComponent{int attempts=0;bool silent=false;static SCR_HintManagerComponent*GetInstance(){static SCR_HintManagerComponent h;return &h;}bool ShowCustom(string,string,int,bool quiet=false){attempts++;silent=quiet;return true;}}; struct SCR_RespawnSystemComponent{int clears=0;static SCR_RespawnSystemComponent*GetInstance(){static SCR_RespawnSystemComponent r;return &r;}void DestroyLoadingPlaceholder(){clears++;}}; struct SCR_EditorManagerEntity{bool opened=false;int closes=0;static SCR_EditorManagerEntity*GetInstance(){static SCR_EditorManagerEntity e;return &e;}bool IsOpened(){return opened;}void Close(bool){opened=false;closes++;}}; struct RplId{static int Invalid(){return -1;}};namespace LogLevel{enum{WARNING};}void Print(const char*,int){} -namespace System{bool IsConsoleApp(){return false;}} +namespace System{int now=0;int GetTickCount(){return now;}bool IsConsoleApp(){return false;}} struct Queue{std::setowners;int added=0;void CallLater(void*owner,int,bool){owners.insert(owner);added++;}void Remove(void*owner){owners.erase(owner);}} queue; struct World{float now=1;float GetWorldTime(){return now;}} world; struct Game{void*local=nullptr;int spawns=0;void*GetPlayerController(){return local;}Queue*GetCallqueue(){return &queue;}World*GetWorld(){return &world;}CameraManager*GetCameraManager(){return &manager;} @@ -59,7 +59,8 @@ string ERR_SelfEpinephrineHint(){return "";} IEntity actor=nullptr,m_ERRRecoveryBody=nullptr;float m_ERRRecoveryDeadline=-1; bool m_ERRObserverMonitor=false,m_ERRObserverReady=false,m_ERRShownObserverAvailable=false; - string m_ERRShownRecoveryStatus; + string m_ERRShownRecoveryStatus,m_ERRPendingRecoveryStatus; + int m_ERRRecoveryStatusSince=0; int m_ERRObserverReason=0,m_ERRShownObserverReason=0,m_ERRObservedId=1,starts=0; Vec m_ERRObserverAnchor;SCR_ManualCamera*m_ERRObserverCamera=nullptr;CameraBase*playerCamera=nullptr; IEntity GetControlledEntity(){return actor;}CameraBase*GetPlayerCamera(){return playerCamera;}