2024-02-07 03:57:46 +00:00
|
|
|
Scriptname _00E_EnderalVersion extends ReferenceAlias Hidden
|
|
|
|
{This script handles Enderal SE updates, DO NOT MODIFY.}
|
|
|
|
|
|
|
|
int iPatchVersion
|
|
|
|
|
|
|
|
; Do not make comparisons with GetVersionFull(), versions are not float numbers, use GetVersion().
|
|
|
|
float function _GetVersionFull() global
|
|
|
|
; ABCD.E
|
|
|
|
; A - engine version (1 - LE, 2 - SE)
|
|
|
|
; B - backward-incompatible update
|
|
|
|
; C - backward-compatible update
|
|
|
|
; D - hotfix
|
|
|
|
; E - build
|
2024-08-06 20:09:07 +00:00
|
|
|
return 2130.0
|
2024-02-07 03:57:46 +00:00
|
|
|
endfunction
|
|
|
|
|
|
|
|
int function GetVersion() global
|
|
|
|
return Math.Floor(_GetVersionFull())
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
Event OnInit()
|
|
|
|
|
|
|
|
iPatchVersion = GetVersion()
|
|
|
|
|
|
|
|
EndEvent
|
|
|
|
|
|
|
|
Event OnPlayerLoadGame()
|
|
|
|
|
|
|
|
if iPatchVersion < GetVersion()
|
|
|
|
;Utility.Wait(0.1) ; wait for menu mode to end
|
|
|
|
;
|
|
|
|
iPatchVersion = GetVersion()
|
|
|
|
endif
|
|
|
|
|
|
|
|
EndEvent
|