Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
If you got couple of them active near you (about 200 tiles around you) - you will have an additional CPU load. So, if you feel unacceptable lag for you - reduce an amount of turrets, make the game lighter by lower your display settings such as texture resolution, upgrade your PC or just stop using them for now until PZ will receive a global performance optimization.
I noticed you call getGameTime():getRealworldSecondsSinceLastUpdate() a few times in AT_TurretUpdate function.
I'd like to recommend setting this at the top of AT_AngryTurretsServerUpdate:
local gameTime
local timeSinceLastUpdate = 0
Events.OnGameTimeLoaded.Add(function()
gameTime = GameTime.getInstance()
end)
Then in DoZTurretJob() you could just add
timeSinceLastUpdate = gameTime:getMultipliedSecondsSinceLastUpdate()
And in AT_TurretUpdate() you could update reloadtime and aimingtime according to that value instead :)
That way you you will not only call the java function only once, but even the time will be reused during the tick, all the turrets will go through timeSinceLastUpdate each tick anyway so it will not get "out of date" during runtime.
Also MultipliedSeconds takes into accound game-speed!
Thank you for your time and I hope you get this.