Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Map Benchmark by Nerexis (nmilsim.wordpress.com )
- // Discord: https://discordapp.com/invite/s7BMSjp
- // Steam: https://steamcommunity.com/profiles/76561198010051679/
- [] spawn {
- private _totalFPS = 0;
- private _count = 0;
- private _mapSize = worldSize;
- private _startTime = diag_tickTime;
- player allowDamage false;
- private _ehId = player addEventHandler["HandleDamage", {0;}];
- setViewDistance 5000;
- setObjectViewDistance 5000;
- 0 setOvercast 0.3;
- 0 setRain 0;
- 0 setFog 0;
- forceWeatherChange;
- uisleep 1;
- systemChat "Starting FPS test, please close debug console...";
- uisleep 1;
- diag_log "Starting FPS test...";
- systemChat "3";
- uisleep 1;
- systemChat "2";
- uisleep 1;
- systemChat "1";
- uisleep 1;
- systemChat "START";
- for "_x" from 0 to _mapSize step 1000 do {
- for "_y" from 0 to _mapSize step 1000 do {
- private _center = [_x + 500, _y + 500, 0];
- if (surfaceIsWater _center) then {
- continue;
- };
- private _pos = [_center select 0, _center select 1, 2];
- cameraOn setPos _pos;
- cameraOn setDir ([_pos, [worldSize/2,worldSize/2,0]] call BIS_fnc_dirTo);
- cameraOn camCommit 0;
- uiSleep 0.3;
- private _fps = diag_fps;
- _totalFPS = _totalFPS + _fps;
- _count = _count + 1;
- };
- };
- private _endTime = diag_tickTime;
- private _elapsedTime = _endTime - _startTime;
- private _averageFPS = _totalFPS / _count;
- private _msg = format ["Map %1: Average FPS: %2, Samples: %3, Took: %4 seconds", worldName, _averageFPS, _count, _elapsedTime];
- systemChat _msg;
- diag_log _msg;
- player allowDamage true;
- player removeEventHandler["HandleDamage",_ehId];
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement