@@ -313,24 +313,7 @@ void (entity pl) PrintWho = {
313
313
strunzone(msg);
314
314
}
315
315
316
- void (entity pov, string color, float tno) UpdateTeamColor = {
317
- local string command = "";
318
-
319
- switch (tno) {
320
- case 1:
321
- command = "team1color";
322
- break;
323
- case 2:
324
- command = "team2color";
325
- break;
326
- case 3:
327
- command = "team3color";
328
- break;
329
- case 4:
330
- command = "team4color";
331
- break;
332
- }
333
-
316
+ void (entity pov, string command, string color) UpdateTeamColor = {
334
317
forceinfokey(pov, command, color);
335
318
336
319
local entity te = find(world, classname, "player");
@@ -387,19 +370,10 @@ float (string arg1, string arg2, string arg3) ParseCmds = {
387
370
/* processedCmd = TRUE; */
388
371
/* break; */
389
372
case "team1color":
390
- UpdateTeamColor(self, arg3, 1);
391
- processedCmd = TRUE;
392
- break;
393
373
case "team2color":
394
- UpdateTeamColor(self, arg3, 2);
395
- processedCmd = TRUE;
396
- break;
397
374
case "team3color":
398
- UpdateTeamColor(self, arg3, 3);
399
- processedCmd = TRUE;
400
- break;
401
375
case "team4color":
402
- UpdateTeamColor(self, arg3, 4 );
376
+ UpdateTeamColor(self, arg2, arg3 );
403
377
processedCmd = TRUE;
404
378
break;
405
379
}
0 commit comments