Skip to content

Commit 7ea32eb

Browse files
committed
gl_k_tragic: saneer arithmetic ops, ref #326
1 parent 1bebb36 commit 7ea32eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts_src/global/gl_k_tragic.ssl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,15 @@ procedure start begin
4040
if global_var(GVAR_ADDICT_TRAGIC) == 0 then return;
4141

4242
// Craving
43-
if game_time - time_of_last_craving >= TIME_TRAGIC_USAGE then begin
43+
if game_time >= time_of_last_craving + TIME_TRAGIC_USAGE then begin
4444
if in_world_map then force_encounter(0);
4545

4646
time_of_last_craving = game_time;
47-
if (game_time - time_of_game_load < TIME_DURATION_OF_ADDICTION) then display_mymsg(MSG_craving);
47+
if (game_time < time_of_game_load + TIME_DURATION_OF_ADDICTION) then display_mymsg(MSG_craving);
4848
end
4949

5050
// Addiction passed
51-
if game_time - time_of_game_load >= TIME_DURATION_OF_ADDICTION then begin
51+
if game_time >= time_of_game_load + TIME_DURATION_OF_ADDICTION then begin
5252
set_global_var(GVAR_ADDICT_TRAGIC, 0);
5353
if not dude_is_addicted() then hide_iface_tag(INTERFACE_TAG_ADDICT);
5454
display_mymsg(MSG_relieved);

0 commit comments

Comments
 (0)