Browse Source

ACS: Added message showing the player what they voted for, modified confetti physics.

pull/4/head
Tribeam 1 year ago
parent
commit
530b5db12e
5 changed files with 24 additions and 8 deletions
  1. 1
    0
      CompileACS.bat
  2. 22
    7
      pk3/Acs/Lexicon.c
  3. BIN
      pk3/Acs/Lexicon.o
  4. 1
    1
      pk3/Acs/acs.err
  5. BIN
      pk3/HUB.wad

+ 1
- 0
CompileACS.bat View File

@@ -2,4 +2,5 @@
2 2
 	cd Compiler
3 3
 	bcc -acc-err-file -x bcs ..\pk3\acs\Lexicon.c ..\pk3\acs\Lexicon.o
4 4
 	if not exist ..\pk3\acs\acs.err goto 20
5
+	pause
5 6
 :20

+ 22
- 7
pk3/Acs/Lexicon.c View File

@@ -159,7 +159,7 @@ strict namespace
159 159
         {
160 160
             objs_confetti[c].x = 0;
161 161
             objs_confetti[c].y = (int)hud_height/65535;
162
-            objs_confetti[c].velx = random(1, 32);
162
+            objs_confetti[c].velx = random(1, 64);
163 163
             objs_confetti[c].vely = random(-64, -1);
164 164
             objs_confetti[c].confnum = random(0, 17);
165 165
             objs_confetti[c].animnum = random(0, 7);
@@ -168,7 +168,7 @@ strict namespace
168 168
         {
169 169
             objs_confetti[c].x = (int)hud_width/65535;
170 170
             objs_confetti[c].y = (int)hud_height/65535;
171
-            objs_confetti[c].velx = random(-32, -1);
171
+            objs_confetti[c].velx = random(-64, -1);
172 172
             objs_confetti[c].vely = random(-64, -1);
173 173
             objs_confetti[c].confnum = random(0, 17);
174 174
             objs_confetti[c].animnum = random(0, 7);
@@ -212,7 +212,10 @@ strict namespace
212 212
                         y += 23.0;
213 213
                         hudmessagebold(s:"\c[Gold]", d:votessorted[i][0], s:" : ", s:votenames[votessorted[i][1]][0]; 0, i+10000, 0, 225.1, y, 0.1);
214 214
                     }
215
-                }
215
+                }
216
+                
217
+                // player's vote
218
+                hudmessagebold(s:"\c[Green]Your Vote: \c[Gold]", s:votenames[players[playernumber()]][0]; 0, 9700, 0, hud_width_half, hud_height-128.0, 0.1);
216 219
             }
217 220
             
218 221
             // system is in the end results state
@@ -225,8 +228,8 @@ strict namespace
225 228
                 for(int c = 0; c < 128; c++)
226 229
                 {
227 230
                     // slow down the confetti
228
-                    //if(objs_confetti[c].velx > 0){ objs_confetti[c].velx -= 1; }
229
-                    //if(objs_confetti[c].velx < 0){ objs_confetti[c].velx += 1; }
231
+                    if(objs_confetti[c].velx > 0){ objs_confetti[c].velx -= 1; }
232
+                    if(objs_confetti[c].velx < 0){ objs_confetti[c].velx += 1; }
230 233
                     
231 234
                     // add gravity
232 235
                     objs_confetti[c].vely += 1;
@@ -300,7 +303,13 @@ strict namespace
300 303
                 }
301 304
             }
302 305
             // sort votes
303
-            bubble_sort();
306
+            bubble_sort();
307
+            
308
+            // sync player votes
309
+            for(int i = 0; i < 63; i++)
310
+            {
311
+                ACS_ExecuteAlways(571, 0, i, players[pnum]);
312
+            }
304 313
         }
305 314
     }
306 315
 
@@ -315,7 +324,7 @@ strict namespace
315 324
         votessorted[index][0] = votes;
316 325
         votessorted[index][1] = id;
317 326
     }
318
-    
327
+
319 328
     // sync voted choice
320 329
     script 568 (int v) clientside
321 330
     {
@@ -334,6 +343,12 @@ strict namespace
334 343
         state = s;
335 344
     }
336 345
 
346
+
347
+    // sync player choices
348
+    script 571 (int pnum, int id) clientside
349
+    {
350
+        players[pnum] = id;
351
+    }
337 352
 
338 353
 
339 354
 

BIN
pk3/Acs/Lexicon.o View File


+ 1
- 1
pk3/Acs/acs.err View File

@@ -1 +1 @@
1
-..\pk3\acs\Lexicon.c:328: syntax error: unexpected `||`
1
+..\pk3\acs\Lexicon.c:218: error: `i` not found

BIN
pk3/HUB.wad View File


Loading…
Cancel
Save