4
4
5
5
init()
6
6
{
7
-
7
+
8
8
// ============================================================================================================
9
9
// _ __ _ __ _____ ____ __ __________
10
10
// | | / /___ | | / / / ___// __ \/ / / _/_ __/
11
- // | | /| / / __ `/ | /| / / ______ \__ \/ /_/ / / / / / / WaW-Split (Version 1)
11
+ // | | /| / / __ `/ | /| / / ______ \__ \/ /_/ / / / / / / WaW-Split (Version 1.1 )
12
12
// | |/ |/ / /_/ /| |/ |/ / /_____/ ___/ / ____/ /____/ / / /
13
13
// |__/|__/\__,_/ |__/|__/ /____/_/ /_____/___/ /_/
14
14
//
15
15
//
16
- // Customizable speedrun split timer for World at War (Plutonium) w/ optional backspeed fix
17
- // Complies with ZWR world record rules: https://zwr.gg/rules/#section-21
16
+ // Customizable speedrun split timer for World at War (Plutonium) w/ optional backspeed fix.
17
+ // Complies with ZWR world record rules:
18
+ // https://zwr.gg/rules/#section-1
19
+ // https://zwr.gg/rules/#section-19
20
+ // https://zwr.gg/leaderboards/waw/100-speedrun/shi-no-numa/
18
21
//
19
22
// ============================================== TIMER SETTINGS ============================================
20
23
//
@@ -29,12 +32,12 @@ init()
29
32
// Color values are (RED, GREEN, YELLOW) each with a value between 0.0 and 1.0
30
33
// Alpha values are between 0.0 and 1.0
31
34
32
- level .FIX_BACKSPEED = true ; // Disable this to revert the backspeed fix
35
+ level .FIX_BACKSPEED = true ; // Disable this to revert the backspeed fix
33
36
34
- level .HUD_X_COORD = -100 ; // Move the timer HUD on X axis (left=negative, right=positive )
35
- level .HUD_Y_COORD = 0 ; // Move the timer HUD on Y axis (up=negative, down=positive )
36
- level .HUD_COL_SPACING = 70 ; // Space between the label/value columns
37
- level .HUD_ROW_SPACING = 10 ; // Space between the data rows
37
+ level .HUD_X_COORD = -100 ; // Move the timer on X axis (left=negative)
38
+ level .HUD_Y_COORD = 0 ; // Move the timer on Y axis (up=negative)
39
+ level .HUD_COL_SPACING = 70 ; // Space between the label/value columns
40
+ level .HUD_ROW_SPACING = 10 ; // Space between the data rows
38
41
39
42
level .GAME_TIME_COLOR = (1 , 0 , 0 );
40
43
level .GAME_TIME_ALPHA = 1 ;
@@ -51,11 +54,11 @@ init()
51
54
level .HISTORY_ALPHA = 0.9 ;
52
55
level .HISTORY_LABEL_TEXT = " Round" ;
53
56
level .HISTORY_LABEL_DELIMITER = " :" ;
54
-
55
- level .MILESTONES_HIDDEN = false ; // Hide the Round milestones section
56
- level .MILESTONES = []; // Cumulative time will show on HUD upon reaching certain rounds
57
- level .MILESTONES[0 ] = 10 ; // Usefull for world record attempts (30, 50, 70, 100)
58
- level .MILESTONES[1 ] = 30 ; // WARNING: Don't add too many! keep [index] increasing by 1
57
+
58
+ level .MILESTONES_HIDDEN = false ; // Hide the Round milestones section
59
+ level .MILESTONES = []; // Cumulative time will show on HUD upon reaching certain rounds
60
+ level .MILESTONES[0 ] = 10 ; // Usefull for world record attempts (ex: 30, 50, 70, 100)
61
+ level .MILESTONES[1 ] = 30 ; // WARNING: Don't add too many! keep [index] increasing by 1
59
62
level .MILESTONES[2 ] = 50 ;
60
63
level .MILESTONES[3 ] = 70 ;
61
64
level .MILESTONES[4 ] = 100 ;
@@ -83,8 +86,6 @@ game_timer()
83
86
hud.alpha = level .GAME_TIME_ALPHA;
84
87
hud.color = level .GAME_TIME_COLOR;
85
88
hud.fontscale = 2 ;
86
- hud SetText(" --:--" );
87
- level waittill (" round_transition" );
88
89
hud setTimerUp(0 );
89
90
}
90
91
@@ -101,7 +102,6 @@ round_timer()
101
102
label.alpha = level .ROUND_TIME_ALPHA;
102
103
label.color = level .ROUND_TIME_LABEL_COLOR;
103
104
label.fontscale = 1 ;
104
- label SetText(" Round starting..." );
105
105
106
106
time = create_simple_hud( self );
107
107
time.foreground = true ;
@@ -116,15 +116,18 @@ round_timer()
116
116
time.fontscale = 1 ;
117
117
118
118
roundHistory = spawnStruct();
119
- level waittill (" round_transition" );
120
119
init_round_history(roundHistory);
121
120
122
121
for (;;)
123
122
{
124
- currentRound = level .round_number;
125
123
time setTimerUp(0 );
126
124
roundStart = GetTime() / 1000 ;
125
+ currentRound = level .round_number;
126
+ if (!isdefined (currentRound)) currentRound = 1 ;
127
127
label SetText(level .HISTORY_LABEL_TEXT + " " + currentRound + level .HISTORY_LABEL_DELIMITER);
128
+
129
+ // Don't do anything when starting round 1
130
+ if (currentRound == 1 ) level waittill (" round_transition" );
128
131
level waittill (" round_transition" );
129
132
130
133
if (level .HISTORY_MAX_COUNT == 0 ) continue ;
@@ -201,7 +204,6 @@ milestone_timers()
201
204
202
205
init_round_history(roundHistory)
203
206
{
204
- // Crude circular queue implementation to store limited round history
205
207
roundHistory.queue = [];
206
208
207
209
// Index starts at last position and becomes 0 on round 1
@@ -327,12 +329,11 @@ patch_notifier()
327
329
{
328
330
backspeedStatus = " + backspeed " ;
329
331
}
330
- hud SetText(" Custom timer " + backspeedStatus + " patch in use (WaW-Split v1)" );
332
+ hud SetText(" Custom timer " + backspeedStatus + " patch in use (waw-split v1.1 )" );
331
333
wait (10 );
332
334
hud destroy();
333
335
}
334
336
335
- // Not the best way to do this but it works for all maps and is accurate enough
336
337
round_monitor()
337
338
{
338
339
for (;;) {
@@ -357,14 +358,12 @@ on_connect()
357
358
on_player_spawned()
358
359
{
359
360
level waittill (" connected" , player);
360
-
361
- // Custom timer functions
362
361
self thread round_monitor();
363
362
self thread game_timer();
364
363
if (!level .ROUND_TIME_HIDDEN) self thread round_timer();
365
364
if (!level .MILESTONES_HIDDEN) self thread milestone_timers();
366
365
367
- // Backspeed fix - (enforce the default values)
366
+ // Backspeed fix (enforce the default values first )
368
367
self SetClientDvars(" player_backSpeedScale" , " 0.7" , " player_strafeSpeedScale" , " 0.8" );
369
368
if (level .FIX_BACKSPEED)
370
369
{
0 commit comments