-
Notifications
You must be signed in to change notification settings - Fork 9
/
tf_defs.h
1260 lines (1047 loc) · 57.3 KB
/
tf_defs.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
****/
#ifndef __TF_DEFS_H__
#define __TF_DEFS_H__
#include <cstdint>
// instant damage
constexpr int DMG_GENERIC = 0; // generic damage was done
constexpr int DMG_CRUSH = 1 << 0; // crushed by falling or moving object
constexpr int DMG_BULLET = 1 << 1; // shot
constexpr int DMG_SLASH = 1 << 2; // cut, clawed, stabbed
constexpr int DMG_BURN = 1 << 3; // heat burned
constexpr int DMG_FREEZE = 1 << 4; // frozen
constexpr int DMG_FALL = 1 << 5; // fell too far
constexpr int DMG_BLAST = 1 << 6; // explosive blast damage
constexpr int DMG_CLUB = 1 << 7; // crowbar, punch, headbutt
constexpr int DMG_SHOCK = 1 << 8; // electric shock
constexpr int DMG_SONIC = 1 << 9; // sound pulse shockwave
constexpr int DMG_ENERGYBEAM = 1 << 10; // laser or other high energy beam
constexpr int DMG_NEVERGIB = 1 << 12; // with this bit OR'd in, no damage type will be able to gib victims upon death
constexpr int DMG_ALWAYSGIB = 1 << 13; // with this bit OR'd in, any damage type can be made to gib victims upon death.
constexpr int DMG_DROWN = 1 << 14; // Drowning
// time-based damage
constexpr int DMG_TIMEBASED = ~0x3fff; // mask for time-based damage
constexpr int DMG_PARALYZE = 1 << 15; // slows affected creature down
constexpr int DMG_NERVEGAS = 1 << 16; // nerve toxins, very bad
constexpr int DMG_POISON = 1 << 17; // blood poisoning
constexpr int DMG_RADIATION = 1 << 18; // radiation exposure
constexpr int DMG_DROWNRECOVER = 1 << 19; // drowning recovery
constexpr int DMG_ACID = 1 << 20; // toxic chemicals or acid burns
constexpr int DMG_SLOWBURN = 1 << 21; // in an oven
constexpr int DMG_SLOWFREEZE = 1 << 22; // in a subzero freezer
constexpr int DMG_MORTAR = 1 << 23; // Hit by air raid (done to distinguish grenade from mortar)
// these are the damage types that are allowed to gib corpses
#define DMG_GIB_CORPSE (DMG_CRUSH | DMG_FALL | DMG_BLAST | DMG_SONIC | DMG_CLUB)
// these are the damage types that have client hud art
#define DMG_SHOWNHUD (DMG_POISON | DMG_ACID | DMG_FREEZE | DMG_SLOWFREEZE | DMG_DROWN | DMG_BURN | DMG_SLOWBURN | DMG_NERVEGAS | DMG_RADIATION | DMG_SHOCK)
//===========================================================================
// OLD OPTIONS.QC
//===========================================================================
#define DEFAULT_AUTOZOOM false
#define WEINER_SNIPER // autoaiming for sniper rifle
constexpr unsigned char FLAME_MAXWORLDNUM = 20; // maximum number of flames in the world. DO NOT PUT BELOW 20.
//#define MAX_WORLD_PIPEBOMBS 15 // This is divided between teams - this is the most you should have on a net server
constexpr unsigned char MAX_PLAYER_PIPEBOMBS = 8; // maximum number of pipebombs any 1 player can have active
constexpr unsigned char MAX_PLAYER_AMMOBOXES = 3; // maximum number of ammoboxes any 1 player can have active
//#define MAX_WORLD_FLARES 9 // This is the total number of flares allowed in the world at one time
//#define MAX_WORLD_AMMOBOXES 20 // This is divided between teams - this is the most you should have on a net server
constexpr unsigned char GR_TYPE_MIRV_NO = 4; // Number of Mirvs a Mirv Grenade breaks into
constexpr unsigned char GR_TYPE_NAPALM_NO = 8; // Number of flames napalm grenade breaks into (unused if net server)
#define MEDIKIT_IS_BIOWEAPON // Medikit acts as a bioweapon against enemies
constexpr unsigned char TEAM_HELP_RATE = 60; // used only if teamplay bit 64 (help team with lower score) is set.
// 60 is a mild setting, and won't make too much difference
// increasing it _decreases_ the amount of help the losing team gets
// Minimum setting is 1, which would really help the losing team
#define DISPLAY_CLASS_HELP true // Change this to #OFF if you don't want the class help to
// appear whenever a player connects
#define NEVER_TEAMFRAGS false // teamfrags options always off
#define ALWAYS_TEAMFRAGS false // teamfrags options always on
#define CHECK_SPEEDS true // makes sure players aren't moving too fast
#define SNIPER_RIFLE_RELOAD_TIME 1.5f // seconds
constexpr unsigned short MAPBRIEFING_MAXTEXTLENGTH = 512;
constexpr unsigned short PLAYER_PUSH_VELOCITY = 50; // Players push teammates if they're moving under this speed
// Debug Options
//#define MAP_DEBUG // Debug for Map code. I suggest running in a hi-res
// mode and/or piping the output from the server to a file.
#ifdef MAP_DEBUG
#define MDEBUG(x) x
#else
#define MDEBUG(x)
#endif
//#define VERBOSE // Verbose Debugging on/off
//===========================================================================
// OLD QUAKE Defs
//===========================================================================
// items
constexpr unsigned int IT_AXE = 4096;
constexpr unsigned int IT_SHOTGUN = 1;
constexpr unsigned int IT_SUPER_SHOTGUN = 2;
constexpr unsigned int IT_NAILGUN = 4;
constexpr unsigned int IT_SUPER_NAILGUN = 8;
constexpr unsigned int IT_GRENADE_LAUNCHER = 16;
constexpr unsigned int IT_ROCKET_LAUNCHER = 32;
constexpr unsigned int IT_LIGHTNING = 64;
constexpr unsigned int IT_EXTRA_WEAPON = 128;
constexpr unsigned int IT_SHELLS = 256;
constexpr unsigned int IT_NAILS = 512;
constexpr unsigned int IT_ROCKETS = 1024;
constexpr unsigned int IT_CELLS = 2048;
constexpr unsigned int IT_ARMOR1 = 8192;
constexpr unsigned int IT_ARMOR2 = 16384;
constexpr unsigned int IT_ARMOR3 = 32768;
constexpr unsigned int IT_SUPERHEALTH = 65536;
constexpr unsigned int IT_KEY1 = 131072;
constexpr unsigned int IT_KEY2 = 262144;
constexpr unsigned int IT_INVISIBILITY = 524288;
constexpr unsigned int IT_INVULNERABILITY = 1048576;
constexpr unsigned int IT_SUIT = 2097152;
constexpr unsigned int IT_QUAD = 4194304;
constexpr unsigned int IT_HOOK = 8388608;
constexpr unsigned int IT_KEY3 = 16777216; // Stomp invisibility
constexpr unsigned int IT_KEY4 = 33554432; // Stomp invulnerability
//===========================================================================
// TEAMFORTRESS Defs
//===========================================================================
// TeamFortress State Flags
constexpr unsigned int TFSTATE_GRENPRIMED = 1; // Whether the player has a primed grenade
constexpr unsigned int TFSTATE_RELOADING = 2; // Whether the player is reloading
constexpr unsigned int TFSTATE_ALTKILL = 4; // #true if killed with a weapon not in self.weapon: NOT USED ANYMORE
constexpr unsigned int TFSTATE_RANDOMPC = 8; // Whether Playerclass is random, new one each respawn
constexpr unsigned int TFSTATE_INFECTED = 16; // set when player is infected by the bioweapon
constexpr unsigned int TFSTATE_INVINCIBLE = 32; // Player has permanent Invincibility (Usually by GoalItem)
constexpr unsigned int TFSTATE_INVISIBLE = 64; // Player has permanent Invisibility (Usually by GoalItem)
constexpr unsigned int TFSTATE_QUAD = 128; // Player has permanent Quad Damage (Usually by GoalItem)
constexpr unsigned int TFSTATE_RADSUIT = 256; // Player has permanent Radsuit (Usually by GoalItem)
constexpr unsigned int TFSTATE_BURNING = 512; // Is on fire
constexpr unsigned int TFSTATE_GRENTHROWING = 1024; // is throwing a grenade
constexpr unsigned int TFSTATE_AIMING = 2048; // is using the laser sight
constexpr unsigned int TFSTATE_ZOOMOFF = 4096; // doesn't want the FOV changed when zooming
constexpr unsigned int TFSTATE_RESPAWN_READY = 8192; // is waiting for respawn, and has pressed fire
constexpr unsigned int TFSTATE_HALLUCINATING = 16384; // set when player is hallucinating
constexpr unsigned int TFSTATE_TRANQUILISED = 32768; // set when player is tranquilised
constexpr unsigned int TFSTATE_CANT_MOVE = 65536; // set when player is setting a detpack
constexpr unsigned int TFSTATE_RESET_FLAMETIME = 131072; // set when the player has to have his flames increased in health
// Defines used by TF_T_Damage (see combat.qc)
constexpr unsigned char TF_TD_IGNOREARMOUR = 1; // Bypasses the armour of the target
constexpr unsigned char TF_TD_NOTTEAM = 2; // Doesn't damage a team member (indicates direct fire weapon)
constexpr unsigned char TF_TD_NOTSELF = 4; // Doesn't damage self
constexpr unsigned short TF_TD_OTHER = 0; // Ignore armorclass
constexpr unsigned short TF_TD_SHOT = 1; // Bullet damage
constexpr unsigned short TF_TD_NAIL = 2; // Nail damage
constexpr unsigned short TF_TD_EXPLOSION = 4; // Explosion damage
constexpr unsigned short TF_TD_ELECTRICITY = 8; // Electric damage
constexpr unsigned short TF_TD_FIRE = 16; // Fire damage
constexpr unsigned short TF_TD_NOSOUND = 256; // Special damage. Makes no sound/painframe, etc
/*==================================================*/
/* Toggleable Game Settings */
/*==================================================*/
constexpr unsigned char TF_RESPAWNDELAY1 = 5; // seconds of waiting before player can respawn
constexpr unsigned char TF_RESPAWNDELAY2 = 10; // seconds of waiting before player can respawn
constexpr unsigned char TF_RESPAWNDELAY3 = 20; // seconds of waiting before player can respawn
constexpr unsigned short TEAMPLAY_NORMAL = 1;
constexpr unsigned short TEAMPLAY_HALFDIRECT = 2;
constexpr unsigned short TEAMPLAY_NODIRECT = 4;
constexpr unsigned short TEAMPLAY_HALFEXPLOSIVE = 8;
constexpr unsigned short TEAMPLAY_NOEXPLOSIVE = 16;
constexpr unsigned short TEAMPLAY_LESSPLAYERSHELP = 32;
constexpr unsigned short TEAMPLAY_LESSSCOREHELP = 64;
constexpr unsigned short TEAMPLAY_HALFDIRECTARMOR = 128;
constexpr unsigned short TEAMPLAY_NODIRECTARMOR = 256;
constexpr unsigned short TEAMPLAY_HALFEXPARMOR = 512;
constexpr unsigned short TEAMPLAY_NOEXPARMOR = 1024;
constexpr unsigned short TEAMPLAY_HALFDIRMIRROR = 2048;
constexpr unsigned short TEAMPLAY_FULLDIRMIRROR = 4096;
constexpr unsigned short TEAMPLAY_HALFEXPMIRROR = 8192;
constexpr unsigned short TEAMPLAY_FULLEXPMIRROR = 16384;
#define TEAMPLAY_TEAMDAMAGE (TEAMPLAY_NODIRECT | TEAMPLAY_HALFDIRECT | TEAMPLAY_HALFEXPLOSIVE | TEAMPLAY_NOEXPLOSIVE)
// FortressMap stuff
constexpr unsigned char TEAM1_CIVILIANS = 1;
constexpr unsigned char TEAM2_CIVILIANS = 2;
constexpr unsigned char TEAM3_CIVILIANS = 4;
constexpr unsigned char TEAM4_CIVILIANS = 8;
// Defines for the playerclass
constexpr unsigned char PC_UNDEFINED = 0;
constexpr unsigned char PC_SCOUT = 1;
constexpr unsigned char PC_SNIPER = 2;
constexpr unsigned char PC_SOLDIER = 3;
constexpr unsigned char PC_DEMOMAN = 4;
constexpr unsigned char PC_MEDIC = 5;
constexpr unsigned char PC_HVYWEAP = 6;
constexpr unsigned char PC_PYRO = 7;
constexpr unsigned char PC_SPY = 8;
constexpr unsigned char PC_ENGINEER = 9;
// Insert new class definitions here
// PC_RANDOM _MUST_ be the third last class
constexpr unsigned char PC_RANDOM = 10; // Random playerclass
constexpr unsigned char PC_CIVILIAN = 11; // Civilians are a special class. They cannot be chosen by players, only enforced by maps
constexpr unsigned char PC_LASTCLASS = 12; // Use this as the high-boundary for any loops
// through the playerclass.
constexpr unsigned char SENTRY_COLOR = 10; // will be in the PC_RANDOM slot for team colors
// These are just for the scanner
constexpr unsigned char SCAN_SENTRY = 13;
constexpr unsigned char SCAN_GOALITEM = 14;
// Values returned by CheckArea
constexpr unsigned char CAREA_CLEAR = 0;
constexpr unsigned char CAREA_BLOCKED = 1;
constexpr unsigned char CAREA_NOBUILD = 2;
/*==================================================*/
/* Impulse Defines */
/*==================================================*/
// Alias check to see whether they already have the aliases
constexpr unsigned char TF_ALIAS_CHECK = 13;
// CTF Support Impulses
constexpr unsigned char HOOK_IMP1 = 22;
constexpr unsigned char FLAG_INFO = 23;
constexpr unsigned char HOOK_IMP2 = 39;
// Axe
constexpr unsigned char AXE_IMP = 40;
// Camera Impulse
constexpr unsigned char TF_CAM_TARGET = 50;
constexpr unsigned char TF_CAM_ZOOM = 51;
constexpr unsigned char TF_CAM_ANGLE = 52;
constexpr unsigned char TF_CAM_VEC = 53;
constexpr unsigned char TF_CAM_PROJECTILE = 54;
constexpr unsigned char TF_CAM_PROJECTILE_Z = 55;
constexpr unsigned char TF_CAM_REVANGLE = 56;
constexpr unsigned char TF_CAM_OFFSET = 57;
constexpr unsigned char TF_CAM_DROP = 58;
constexpr unsigned char TF_CAM_FADETOBLACK = 59;
constexpr unsigned char TF_CAM_FADEFROMBLACK = 60;
constexpr unsigned char TF_CAM_FADETOWHITE = 61;
constexpr unsigned char TF_CAM_FADEFROMWHITE = 62;
// Last Weapon impulse
constexpr unsigned char TF_LAST_WEAPON = 69;
// Status Bar Resolution Settings. Same as CTF to maintain ease of use.
constexpr unsigned char TF_STATUSBAR_RES_START = 71;
constexpr unsigned char TF_STATUSBAR_RES_END = 81;
// Clan Messages
constexpr unsigned char TF_MESSAGE_1 = 82;
constexpr unsigned char TF_MESSAGE_2 = 83;
constexpr unsigned char TF_MESSAGE_3 = 84;
constexpr unsigned char TF_MESSAGE_4 = 85;
constexpr unsigned char TF_MESSAGE_5 = 86;
constexpr unsigned char TF_CHANGE_CLASS = 99; // Bring up the Class Change menu
// Added to PC_??? to get impulse to use if this clashes with your
// own impulses, just change this value, not the PC_??
constexpr unsigned char TF_CHANGEPC = 100;
// The next few impulses are all the class selections
// PC_SCOUT 101
// PC_SNIPER 102
// PC_SOLDIER 103
// PC_DEMOMAN 104
// PC_MEDIC 105
// PC_HVYWEAP 106
// PC_PYRO 107
// PC_RANDOM 108
// PC_CIVILIAN 109 // Cannot be used
// PC_SPY 110
// PC_ENGINEER 111
// Help impulses
constexpr unsigned char TF_DISPLAYLOCATION = 118;
constexpr unsigned char TF_STATUS_QUERY = 119;
constexpr unsigned char TF_HELP_MAP = 131;
// Information impulses
constexpr unsigned char TF_INVENTORY = 135;
constexpr unsigned char TF_SHOWTF = 136;
constexpr unsigned char TF_SHOWLEGALCLASSES = 137;
// Team Impulses
constexpr unsigned char TF_TEAM_1 = 140; // Join Team 1
constexpr unsigned char TF_TEAM_2 = 141; // Join Team 2
constexpr unsigned char TF_TEAM_3 = 142; // Join Team 3
constexpr unsigned char TF_TEAM_4 = 143; // Join Team 4
constexpr unsigned char TF_TEAM_CLASSES = 144; // Impulse to display team classes
constexpr unsigned char TF_TEAM_SCORES = 145; // Impulse to display team scores
constexpr unsigned char TF_TEAM_LIST = 146; // Impulse to display the players in each team.
// Grenade Impulses
constexpr unsigned char TF_GRENADE_1 = 150; // Prime grenade type 1
constexpr unsigned char TF_GRENADE_2 = 151; // Prime grenade type 2
constexpr unsigned char TF_GRENADE_T = 152; // Throw primed grenade
// Impulses for new items
// #define TF_SCAN 159 // Scanner Pre-Impulse
// #define TF_SCAN_10 162 // Scan using 10 enery (1 cell)
constexpr unsigned char TF_AUTO_SCAN = 159; // Scanner On/Off
constexpr unsigned char TF_SCAN_ENEMY = 160; // Impulses to toggle scanning of enemies
constexpr unsigned char TF_SCAN_FRIENDLY = 161; // Impulses to toggle scanning of friendlies
constexpr unsigned char TF_SCAN_SOUND = 162; // Scanner sounds on/off
constexpr unsigned char TF_SCAN_30 = 163; // Scan using 30 energy (2 cells)
constexpr unsigned char TF_SCAN_100 = 164; // Scan using 100 energy (5 cells)
constexpr unsigned char TF_DETPACK_5 = 165; // Detpack set to 5 seconds
constexpr unsigned char TF_DETPACK_20 = 166; // Detpack set to 20 seconds
constexpr unsigned char TF_DETPACK_50 = 167; // Detpack set to 50 seconds
constexpr unsigned char TF_DETPACK = 168; // Detpack Pre-Impulse
constexpr unsigned char TF_DETPACK_STOP = 169; // Impulse to stop setting detpack
constexpr unsigned char TF_PB_DETONATE = 170; // Detonate Pipebombs
// Special skill
constexpr unsigned char TF_SPECIAL_SKILL = 171;
// Ammo Drop impulse
constexpr unsigned char TF_DROP_AMMO = 172;
// Reload impulse
constexpr unsigned char TF_RELOAD = 173;
// auto-zoom toggle
constexpr unsigned char TF_AUTOZOOM = 174;
// drop/pass commands
constexpr unsigned char TF_DROPKEY = 175;
// Select Medikit
constexpr unsigned char TF_MEDIKIT = 176;
// Spy Impulses
constexpr unsigned char TF_SPY_SPY = 177; // On net, go invisible, on LAN, change skin/color
constexpr unsigned char TF_SPY_DIE = 178; // Feign Death
// Engineer Impulses
constexpr unsigned char TF_ENGINEER_BUILD = 179;
constexpr unsigned char TF_ENGINEER_SANDBAG = 180;
// Medic
constexpr unsigned char TF_MEDIC_HELPME = 181;
// Status bar
constexpr unsigned char TF_STATUSBAR_ON = 182;
constexpr unsigned char TF_STATUSBAR_OFF = 183;
// Discard impulse
constexpr unsigned char TF_DISCARD = 184;
// ID Player impulse
constexpr unsigned char TF_ID = 185;
// Clan Battle impulses
constexpr unsigned char TF_SHOWIDS = 186;
// More Engineer Impulses
constexpr unsigned char TF_ENGINEER_DETDISP = 187;
constexpr unsigned char TF_ENGINEER_DETSENT = 188;
// Admin Commands
constexpr unsigned char TF_ADMIN_DEAL_CYCLE = 189;
constexpr unsigned char TF_ADMIN_KICK = 190;
constexpr unsigned char TF_ADMIN_BAN = 191;
constexpr unsigned char TF_ADMIN_COUNTPLAYERS = 192;
constexpr unsigned char TF_ADMIN_CEASEFIRE = 193;
// Drop Goal Items
constexpr unsigned char TF_DROPGOALITEMS = 194;
// More Admin Commands
constexpr unsigned char TF_ADMIN_NEXT = 195;
// More Engineer Impulses
constexpr unsigned char TF_ENGINEER_DETEXIT = 196;
constexpr unsigned char TF_ENGINEER_DETENTRANCE = 197;
// Yet MORE Admin Commands
constexpr unsigned char TF_ADMIN_LISTIPS = 198;
// Silent Spy Feign
constexpr unsigned char TF_SPY_SILENTDIE = 199;
/*==================================================*/
/* Defines for the ENGINEER's Building ability */
/*==================================================*/
// Ammo costs
constexpr unsigned char AMMO_COST_SHELLS = 2; // Metal needed to make 1 shell
constexpr unsigned char AMMO_COST_NAILS = 1;
constexpr unsigned char AMMO_COST_ROCKETS = 2;
constexpr unsigned char AMMO_COST_CELLS = 2;
// Building types
constexpr unsigned char BUILD_DISPENSER = 1;
constexpr unsigned char BUILD_SENTRYGUN = 2;
constexpr unsigned char BUILD_MORTAR = 3;
constexpr unsigned char BUILD_TELEPORTER_ENTRANCE = 4;
constexpr unsigned char BUILD_TELEPORTER_EXIT = 5;
// Building metal costs
constexpr unsigned char BUILD_COST_DISPENSER = 100; // Metal needed to build
constexpr unsigned char BUILD_COST_SENTRYGUN = 130;
constexpr unsigned char BUILD_COST_MORTAR = 150;
constexpr unsigned char BUILD_COST_TELEPORTER = 125;
constexpr unsigned char BUILD_COST_SANDBAG = 20; // Built with a separate alias
// Building times
constexpr unsigned char BUILD_TIME_DISPENSER = 2; // seconds to build
constexpr unsigned char BUILD_TIME_SENTRYGUN = 5;
constexpr unsigned char BUILD_TIME_MORTAR = 5;
constexpr unsigned char BUILD_TIME_TELEPORTER = 4;
// Building health levels
constexpr unsigned char BUILD_HEALTH_DISPENSER = 150; // Health of the building
constexpr unsigned char BUILD_HEALTH_SENTRYGUN = 150;
constexpr unsigned char BUILD_HEALTH_MORTAR = 200;
constexpr unsigned char BUILD_HEALTH_TELEPORTER = 80;
// Dispenser's maximum carrying capability
constexpr unsigned short BUILD_DISPENSER_MAX_SHELLS = 400;
constexpr unsigned short BUILD_DISPENSER_MAX_NAILS = 600;
constexpr unsigned short BUILD_DISPENSER_MAX_ROCKETS = 300;
constexpr unsigned short BUILD_DISPENSER_MAX_CELLS = 400;
constexpr unsigned short BUILD_DISPENSER_MAX_ARMOR = 500;
// Build state sent down to client
constexpr unsigned char BS_BUILDING = 1 << 0;
constexpr unsigned char BS_HAS_DISPENSER = 1 << 1;
constexpr unsigned char BS_HAS_SENTRYGUN = 1 << 2;
constexpr unsigned char BS_CANB_DISPENSER = 1 << 3;
constexpr unsigned char BS_CANB_SENTRYGUN = 1 << 4;
/*==================================================*/
/* Ammo quantities for dropping & dispenser use */
/*==================================================*/
constexpr unsigned char DROP_SHELLS = 20;
constexpr unsigned char DROP_NAILS = 20;
constexpr unsigned char DROP_ROCKETS = 10;
constexpr unsigned char DROP_CELLS = 10;
constexpr unsigned char DROP_ARMOR = 40;
/*==================================================*/
/* Team Defines */
/*==================================================*/
constexpr unsigned char TM_MAX_NO = 4; // Max number of teams. Simply changing this value isn't enough.
// A new global to hold new team colors is needed, and more flags
// in the spawnpoint spawnflags may need to be used.
// Basically, don't change this unless you know what you're doing :)
/*==================================================*/
/* New Weapon Defines */
/*==================================================*/
constexpr unsigned int WEAP_HOOK = 1;
constexpr unsigned int WEAP_BIOWEAPON = 2;
constexpr unsigned int WEAP_MEDIKIT = 4;
constexpr unsigned int WEAP_SPANNER = 8;
constexpr unsigned int WEAP_AXE = 16;
constexpr unsigned int WEAP_SNIPER_RIFLE = 32;
constexpr unsigned int WEAP_AUTO_RIFLE = 64;
constexpr unsigned int WEAP_SHOTGUN = 128;
constexpr unsigned int WEAP_SUPER_SHOTGUN = 256;
constexpr unsigned int WEAP_NAILGUN = 512;
constexpr unsigned int WEAP_SUPER_NAILGUN = 1024;
constexpr unsigned int WEAP_GRENADE_LAUNCHER = 2048;
constexpr unsigned int WEAP_FLAMETHROWER = 4096;
constexpr unsigned int WEAP_ROCKET_LAUNCHER = 8192;
constexpr unsigned int WEAP_INCENDIARY = 16384;
constexpr unsigned int WEAP_ASSAULT_CANNON = 32768;
constexpr unsigned int WEAP_LIGHTNING = 65536;
constexpr unsigned int WEAP_DETPACK = 131072;
constexpr unsigned int WEAP_TRANQ = 262144;
constexpr unsigned int WEAP_LASER = 524288;
// still room for 12 more weapons
// but we can remove some by giving the weapons
// a weapon mode (like the rifle)
// HL-compatible weapon numbers
constexpr unsigned char WEAPON_HOOK = 1;
#define WEAPON_BIOWEAPON (WEAPON_HOOK + 1)
#define WEAPON_MEDIKIT (WEAPON_HOOK + 2)
#define WEAPON_SPANNER (WEAPON_HOOK + 3)
#define WEAPON_AXE (WEAPON_HOOK + 4)
#define WEAPON_SNIPER_RIFLE (WEAPON_HOOK + 5)
#define WEAPON_AUTO_RIFLE (WEAPON_HOOK + 6)
#define WEAPON_TF_SHOTGUN (WEAPON_HOOK + 7)
#define WEAPON_SUPER_SHOTGUN (WEAPON_HOOK + 8)
#define WEAPON_NAILGUN (WEAPON_HOOK + 9)
#define WEAPON_SUPER_NAILGUN (WEAPON_HOOK + 10)
#define WEAPON_GRENADE_LAUNCHER (WEAPON_HOOK + 11)
#define WEAPON_FLAMETHROWER (WEAPON_HOOK + 12)
#define WEAPON_ROCKET_LAUNCHER (WEAPON_HOOK + 13)
#define WEAPON_INCENDIARY (WEAPON_HOOK + 14)
#define WEAPON_ASSAULT_CANNON (WEAPON_HOOK + 16)
#define WEAPON_LIGHTNING (WEAPON_HOOK + 17)
#define WEAPON_DETPACK (WEAPON_HOOK + 18)
#define WEAPON_TRANQ (WEAPON_HOOK + 19)
#define WEAPON_LASER (WEAPON_HOOK + 20)
#define WEAPON_PIPEBOMB_LAUNCHER (WEAPON_HOOK + 21)
#define WEAPON_KNIFE (WEAPON_HOOK + 22)
#define WEAPON_BENCHMARK (WEAPON_HOOK + 23)
/*==================================================*/
/* New Weapon Related Defines */
/*==================================================*/
// shots per reload
constexpr unsigned char RE_SHOTGUN = 8;
constexpr unsigned char RE_SUPER_SHOTGUN = 16; // 8 shots
constexpr unsigned char RE_GRENADE_LAUNCHER = 6;
constexpr unsigned char RE_ROCKET_LAUNCHER = 4;
// reload times
constexpr unsigned char RE_SHOTGUN_TIME = 2;
constexpr unsigned char RE_SUPER_SHOTGUN_TIME = 3;
constexpr unsigned char RE_GRENADE_LAUNCHER_TIME = 4;
constexpr unsigned char RE_ROCKET_LAUNCHER_TIME = 5;
// Maximum velocity you can move and fire the Sniper Rifle
constexpr unsigned char WEAP_SNIPER_RIFLE_MAX_MOVE = 50;
// Medikit
constexpr unsigned char WEAP_MEDIKIT_HEAL = 200; // Amount medikit heals per hit
constexpr unsigned char WEAP_MEDIKIT_OVERHEAL = 50; // Amount of superhealth over max_health the medikit will dispense
// Spanner
constexpr unsigned char WEAP_SPANNER_REPAIR = 10;
// Detpack
constexpr unsigned short WEAP_DETPACK_DISARMTIME = 3; // Time it takes to disarm a Detpack
constexpr unsigned short WEAP_DETPACK_SETTIME = 3; // Time it takes to set a Detpack
constexpr unsigned short WEAP_DETPACK_SIZE = 700; // Explosion Size
constexpr unsigned short WEAP_DETPACK_GOAL_SIZE = 1500; // Explosion Size for goal triggering
constexpr unsigned short WEAP_DETPACK_BITS_NO = 12; // Bits that detpack explodes into
// Tranquiliser Gun
constexpr unsigned char TRANQ_TIME = 15;
// Grenades
constexpr unsigned char GR_PRIMETIME = 3;
#define GR_CALTROP_PRIME 0.5f
constexpr unsigned char GR_TYPE_NONE = 0;
constexpr unsigned char GR_TYPE_NORMAL = 1;
constexpr unsigned char GR_TYPE_CONCUSSION = 2;
constexpr unsigned char GR_TYPE_NAIL = 3;
constexpr unsigned char GR_TYPE_MIRV = 4;
constexpr unsigned char GR_TYPE_NAPALM = 5;
// #define GR_TYPE_FLARE 6
constexpr unsigned char GR_TYPE_GAS = 7;
constexpr unsigned char GR_TYPE_EMP = 8;
constexpr unsigned char GR_TYPE_CALTROP = 9;
//#define GR_TYPE_FLASH 10
// Defines for WeaponMode
constexpr unsigned char GL_NORMAL = 0;
constexpr unsigned char GL_PIPEBOMB = 1;
// Defines for OLD Concussion Grenade
constexpr unsigned char GR_OLD_CONCUSS_TIME = 5;
constexpr unsigned char GR_OLD_CONCUSS_DEC = 20;
// Defines for Concussion Grenade
constexpr float GR_CONCUSS_TIME = 0.25f;
constexpr unsigned char GR_CONCUSS_DEC = 10;
constexpr unsigned char MEDIUM_PING = 150;
constexpr unsigned char HIGH_PING = 200;
// Defines for the Gas Grenade
constexpr float GR_HALLU_TIME = 0.3f;
constexpr float GR_OLD_HALLU_TIME = 0.5f;
constexpr float GR_HALLU_DEC = 2.5f;
// Defines for the BioInfection
constexpr unsigned char BIO_JUMP_RADIUS = 128; // The distance the bioinfection can jump between players
/*==================================================*/
/* New Items */
/*==================================================*/
constexpr unsigned char NIT_SCANNER = 1;
#define NIT_SILVER_DOOR_OPENED #IT_KEY1 // 131072
#define NIT_GOLD_DOOR_OPENED #IT_KEY2 // 262144
/*==================================================*/
/* New Item Flags */
/*==================================================*/
constexpr unsigned char NIT_SCANNER_ENEMY = 1; // Detect enemies
constexpr unsigned char NIT_SCANNER_FRIENDLY = 2; // Detect friendlies (team members)
constexpr unsigned char NIT_SCANNER_SOUND = 4; // Motion detection. Only report moving entities.
/*==================================================*/
/* New Item Related Defines */
/*==================================================*/
constexpr unsigned char NIT_SCANNER_POWER = 25; // The amount of power spent on a scan with the scanner
// is multiplied by this to get the scan range.
constexpr unsigned char NIT_SCANNER_MAXCELL = 50; // The maximum number of cells that can be used in one scan
constexpr unsigned char NIT_SCANNER_MIN_MOVEMENT = 50; // The minimum velocity an entity must have to be detected
// by scanners that only detect movement
/*==================================================*/
/* Variables used for New Weapons and Reloading */
/*==================================================*/
// Armor Classes : Bitfields. Use the "armorclass" of armor for the Armor Type.
constexpr unsigned char AT_SAVESHOT = 1; // Kevlar: Reduces bullet damage by 15%
constexpr unsigned char AT_SAVENAIL = 2; // Wood: Reduces nail damage by 15%
constexpr unsigned char AT_SAVEEXPLOSION = 4; // Blast: Reduces explosion damage by 15%
constexpr unsigned char AT_SAVEELECTRICITY = 8; // Shock: Reduces electricity damage by 15%
constexpr unsigned char AT_SAVEFIRE = 16; // Asbestos: Reduces fire damage by 15%
/*==========================================================================*/
/* TEAMFORTRESS CLASS DETAILS */
/*==========================================================================*/
// Class Details for SCOUT
constexpr unsigned short PC_SCOUT_SKIN = 4; // Skin for this class when Classkin is on.
constexpr unsigned short PC_SCOUT_MAXHEALTH = 75; // Maximum Health Level
constexpr unsigned short PC_SCOUT_MAXSPEED = 400; // Maximum movement speed
constexpr unsigned short PC_SCOUT_MAXSTRAFESPEED = 400; // Maximum strafing movement speed
constexpr unsigned short PC_SCOUT_MAXARMOR = 50; // Maximum Armor Level, of any armor class
constexpr unsigned short PC_SCOUT_INITARMOR = 25; // Armor level when respawned
constexpr float PC_SCOUT_MAXARMORTYPE = 0.3f; // Maximum level of Armor absorption
constexpr float PC_SCOUT_INITARMORTYPE = 0.3f; // Absorption Level of armor when respawned
constexpr unsigned char PC_SCOUT_ARMORCLASSES = 3; // #AT_SAVESHOT | #AT_SAVENAIL <- Armor Classes allowed for this class
constexpr unsigned char PC_SCOUT_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_SCOUT_WEAPONS (WEAP_AXE | WEAP_SHOTGUN | WEAP_NAILGUN)
constexpr unsigned char PC_SCOUT_MAXAMMO_SHOT = 50; // Maximum amount of shot ammo this class can carry
constexpr unsigned char PC_SCOUT_MAXAMMO_NAIL = 200; // Maximum amount of nail ammo this class can carry
constexpr unsigned char PC_SCOUT_MAXAMMO_CELL = 100; // Maximum amount of cell ammo this class can carry
constexpr unsigned char PC_SCOUT_MAXAMMO_ROCKET = 25; // Maximum amount of rocket ammo this class can carry
constexpr unsigned char PC_SCOUT_INITAMMO_SHOT = 25; // Amount of shot ammo this class has when respawned
constexpr unsigned char PC_SCOUT_INITAMMO_NAIL = 100; // Amount of nail ammo this class has when respawned
constexpr unsigned char PC_SCOUT_INITAMMO_CELL = 50; // Amount of cell ammo this class has when respawned
constexpr unsigned char PC_SCOUT_INITAMMO_ROCKET = 0; // Amount of rocket ammo this class has when respawned
#define PC_SCOUT_GRENADE_TYPE_1 GR_TYPE_CALTROP // <- 1st Type of Grenade this class has
#define PC_SCOUT_GRENADE_TYPE_2 GR_TYPE_CONCUSSION // <- 2nd Type of Grenade this class has
constexpr unsigned char PC_SCOUT_GRENADE_INIT_1 = 2; // Number of grenades of Type 1 this class has when respawned
constexpr unsigned char PC_SCOUT_GRENADE_INIT_2 = 3; // Number of grenades of Type 2 this class has when respawned
#define PC_SCOUT_TF_ITEMS NIT_SCANNER // <- TeamFortress Items this class has
constexpr float PC_SCOUT_MOTION_MIN_I = 0.5f; // < Short range
constexpr unsigned char PC_SCOUT_MOTION_MIN_MOVE = 50; // Minimum vlen of player velocity to be picked up by motion detector
constexpr unsigned char PC_SCOUT_SCAN_TIME = 2; // # of seconds between each scan pulse
constexpr unsigned char PC_SCOUT_SCAN_RANGE = 100; // Default scanner range
constexpr unsigned char PC_SCOUT_SCAN_COST = 2; // Default scanner cell usage per scan
// Class Details for SNIPER
constexpr unsigned short PC_SNIPER_SKIN = 5;
constexpr unsigned short PC_SNIPER_MAXHEALTH = 90;
constexpr unsigned short PC_SNIPER_MAXSPEED = 300;
constexpr unsigned short PC_SNIPER_MAXSTRAFESPEED = 300;
constexpr unsigned short PC_SNIPER_MAXARMOR = 50;
constexpr unsigned short PC_SNIPER_INITARMOR = 0;
constexpr float PC_SNIPER_MAXARMORTYPE = 0.3f;
constexpr float PC_SNIPER_INITARMORTYPE = 0.3f;
constexpr unsigned char PC_SNIPER_ARMORCLASSES = 3; // #AT_SAVESHOT | #AT_SAVENAIL
constexpr unsigned char PC_SNIPER_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_SNIPER_WEAPONS (WEAP_SNIPER_RIFLE | WEAP_AUTO_RIFLE | WEAP_AXE | WEAP_NAILGUN)
constexpr unsigned char PC_SNIPER_MAXAMMO_SHOT = 75;
constexpr unsigned char PC_SNIPER_MAXAMMO_NAIL = 100;
constexpr unsigned char PC_SNIPER_MAXAMMO_CELL = 50;
constexpr unsigned char PC_SNIPER_MAXAMMO_ROCKET = 25;
constexpr unsigned char PC_SNIPER_INITAMMO_SHOT = 60;
constexpr unsigned char PC_SNIPER_INITAMMO_NAIL = 50;
constexpr unsigned char PC_SNIPER_INITAMMO_CELL = 0;
constexpr unsigned char PC_SNIPER_INITAMMO_ROCKET = 0;
#define PC_SNIPER_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_SNIPER_GRENADE_TYPE_2 GR_TYPE_NONE
constexpr unsigned char PC_SNIPER_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_SNIPER_GRENADE_INIT_2 = 0;
constexpr unsigned char PC_SNIPER_TF_ITEMS = 0;
// Class Details for SOLDIER
constexpr unsigned short PC_SOLDIER_SKIN = 6;
constexpr unsigned short PC_SOLDIER_MAXHEALTH = 100;
constexpr unsigned short PC_SOLDIER_MAXSPEED = 240;
constexpr unsigned short PC_SOLDIER_MAXSTRAFESPEED = 240;
constexpr unsigned short PC_SOLDIER_MAXARMOR = 200;
constexpr unsigned short PC_SOLDIER_INITARMOR = 100;
constexpr float PC_SOLDIER_MAXARMORTYPE = 0.8f;
constexpr float PC_SOLDIER_INITARMORTYPE = 0.8f;
constexpr unsigned char PC_SOLDIER_ARMORCLASSES = 31; // ALL
constexpr unsigned char PC_SOLDIER_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_SOLDIER_WEAPONS (WEAP_AXE | WEAP_SHOTGUN | WEAP_SUPER_SHOTGUN | WEAP_ROCKET_LAUNCHER)
constexpr unsigned char PC_SOLDIER_MAXAMMO_SHOT = 100;
constexpr unsigned char PC_SOLDIER_MAXAMMO_NAIL = 100;
constexpr unsigned char PC_SOLDIER_MAXAMMO_CELL = 50;
constexpr unsigned char PC_SOLDIER_MAXAMMO_ROCKET = 50;
constexpr unsigned char PC_SOLDIER_INITAMMO_SHOT = 50;
constexpr unsigned char PC_SOLDIER_INITAMMO_NAIL = 0;
constexpr unsigned char PC_SOLDIER_INITAMMO_CELL = 0;
constexpr unsigned char PC_SOLDIER_INITAMMO_ROCKET = 10;
#define PC_SOLDIER_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_SOLDIER_GRENADE_TYPE_2 GR_TYPE_NAIL
constexpr unsigned char PC_SOLDIER_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_SOLDIER_GRENADE_INIT_2 = 1;
constexpr unsigned char PC_SOLDIER_TF_ITEMS = 0;
constexpr unsigned char MAX_NAIL_GRENS = 2; // Can only have 2 Nail grens active
constexpr unsigned char MAX_NAPALM_GRENS = 2; // Can only have 2 Napalm grens active
constexpr unsigned char MAX_GAS_GRENS = 2; // Can only have 2 Gas grenades active
constexpr unsigned char MAX_MIRV_GRENS = 2; // Can only have 2 Mirv's
constexpr unsigned char MAX_CONCUSSION_GRENS = 3;
constexpr unsigned char MAX_CALTROP_CANS = 3;
// Class Details for DEMOLITION MAN
constexpr unsigned short PC_DEMOMAN_SKIN = 1;
constexpr unsigned short PC_DEMOMAN_MAXHEALTH = 90;
constexpr unsigned short PC_DEMOMAN_MAXSPEED = 280;
constexpr unsigned short PC_DEMOMAN_MAXSTRAFESPEED = 280;
constexpr unsigned short PC_DEMOMAN_MAXARMOR = 120;
constexpr unsigned short PC_DEMOMAN_INITARMOR = 50;
constexpr float PC_DEMOMAN_MAXARMORTYPE = 0.6f;
constexpr float PC_DEMOMAN_INITARMORTYPE = 0.6f;
constexpr unsigned short PC_DEMOMAN_ARMORCLASSES = 31; // ALL
constexpr unsigned short PC_DEMOMAN_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_DEMOMAN_WEAPONS (WEAP_AXE | WEAP_SHOTGUN | WEAP_GRENADE_LAUNCHER | WEAP_DETPACK)
constexpr unsigned char PC_DEMOMAN_MAXAMMO_SHOT = 75;
constexpr unsigned char PC_DEMOMAN_MAXAMMO_NAIL = 50;
constexpr unsigned char PC_DEMOMAN_MAXAMMO_CELL = 50;
constexpr unsigned char PC_DEMOMAN_MAXAMMO_ROCKET = 50;
constexpr unsigned char PC_DEMOMAN_MAXAMMO_DETPACK = 1;
constexpr unsigned char PC_DEMOMAN_INITAMMO_SHOT = 30;
constexpr unsigned char PC_DEMOMAN_INITAMMO_NAIL = 0;
constexpr unsigned char PC_DEMOMAN_INITAMMO_CELL = 0;
constexpr unsigned char PC_DEMOMAN_INITAMMO_ROCKET = 20;
constexpr unsigned char PC_DEMOMAN_INITAMMO_DETPACK = 1;
#define PC_DEMOMAN_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_DEMOMAN_GRENADE_TYPE_2 GR_TYPE_MIRV
constexpr unsigned char PC_DEMOMAN_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_DEMOMAN_GRENADE_INIT_2 = 2;
constexpr unsigned char PC_DEMOMAN_TF_ITEMS = 0;
// Class Details for COMBAT MEDIC
constexpr unsigned short PC_MEDIC_SKIN = 3;
constexpr unsigned short PC_MEDIC_MAXHEALTH = 90;
constexpr unsigned short PC_MEDIC_MAXSPEED = 320;
constexpr unsigned short PC_MEDIC_MAXSTRAFESPEED = 320;
constexpr unsigned short PC_MEDIC_MAXARMOR = 100;
constexpr unsigned short PC_MEDIC_INITARMOR = 50;
constexpr float PC_MEDIC_MAXARMORTYPE = 0.6f;
constexpr float PC_MEDIC_INITARMORTYPE = 0.3f;
constexpr unsigned char PC_MEDIC_ARMORCLASSES = 11; // ALL except EXPLOSION
constexpr unsigned char PC_MEDIC_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_MEDIC_WEAPONS (WEAP_BIOWEAPON | WEAP_MEDIKIT | WEAP_SHOTGUN | WEAP_SUPER_SHOTGUN | WEAP_SUPER_NAILGUN)
constexpr unsigned char PC_MEDIC_MAXAMMO_SHOT = 75;
constexpr unsigned char PC_MEDIC_MAXAMMO_NAIL = 150;
constexpr unsigned char PC_MEDIC_MAXAMMO_CELL = 50;
constexpr unsigned char PC_MEDIC_MAXAMMO_ROCKET = 25;
constexpr unsigned char PC_MEDIC_MAXAMMO_MEDIKIT = 100;
constexpr unsigned char PC_MEDIC_INITAMMO_SHOT = 50;
constexpr unsigned char PC_MEDIC_INITAMMO_NAIL = 50;
constexpr unsigned char PC_MEDIC_INITAMMO_CELL = 0;
constexpr unsigned char PC_MEDIC_INITAMMO_ROCKET = 0;
constexpr unsigned char PC_MEDIC_INITAMMO_MEDIKIT = 50;
#define PC_MEDIC_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_MEDIC_GRENADE_TYPE_2 GR_TYPE_CONCUSSION
constexpr unsigned char PC_MEDIC_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_MEDIC_GRENADE_INIT_2 = 2;
constexpr unsigned char PC_MEDIC_TF_ITEMS = 0;
constexpr unsigned char PC_MEDIC_REGEN_TIME = 3; // Number of seconds between each regen.
constexpr unsigned char PC_MEDIC_REGEN_AMOUNT = 2; // Amount of health regenerated each regen.
// Class Details for HVYWEAP
constexpr unsigned short PC_HVYWEAP_SKIN = 2;
constexpr unsigned short PC_HVYWEAP_MAXHEALTH = 100;
constexpr unsigned short PC_HVYWEAP_MAXSPEED = 230;
constexpr unsigned short PC_HVYWEAP_MAXSTRAFESPEED = 230;
constexpr unsigned short PC_HVYWEAP_MAXARMOR = 300;
constexpr unsigned short PC_HVYWEAP_INITARMOR = 15;
constexpr float PC_HVYWEAP_MAXARMORTYPE = 0.8f;
constexpr float PC_HVYWEAP_INITARMORTYPE = 0.8f;
constexpr unsigned char PC_HVYWEAP_ARMORCLASSES = 31; // ALL
constexpr unsigned char PC_HVYWEAP_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_HVYWEAP_WEAPONS (WEAP_ASSAULT_CANNON | WEAP_AXE | WEAP_SHOTGUN | WEAP_SUPER_SHOTGUN)
constexpr unsigned char PC_HVYWEAP_MAXAMMO_SHOT = 200;
constexpr unsigned char PC_HVYWEAP_MAXAMMO_NAIL = 200;
constexpr unsigned char PC_HVYWEAP_MAXAMMO_CELL = 50;
constexpr unsigned char PC_HVYWEAP_MAXAMMO_ROCKET = 25;
constexpr unsigned char PC_HVYWEAP_INITAMMO_SHOT = 200;
constexpr unsigned char PC_HVYWEAP_INITAMMO_NAIL = 0;
constexpr unsigned char PC_HVYWEAP_INITAMMO_CELL = 30;
constexpr unsigned char PC_HVYWEAP_INITAMMO_ROCKET = 0;
#define PC_HVYWEAP_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_HVYWEAP_GRENADE_TYPE_2 GR_TYPE_MIRV
constexpr unsigned char PC_HVYWEAP_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_HVYWEAP_GRENADE_INIT_2 = 1;
constexpr unsigned char PC_HVYWEAP_TF_ITEMS = 0;
constexpr unsigned char PC_HVYWEAP_CELL_USAGE = 7; // Amount of cells spent to power up assault cannon
// Class Details for PYRO
constexpr unsigned short PC_PYRO_SKIN = 21;
constexpr unsigned short PC_PYRO_MAXHEALTH = 100;
constexpr unsigned short PC_PYRO_MAXSPEED = 300;
constexpr unsigned short PC_PYRO_MAXSTRAFESPEED = 300;
constexpr unsigned short PC_PYRO_MAXARMOR = 150;
constexpr unsigned short PC_PYRO_INITARMOR = 5;
constexpr float PC_PYRO_MAXARMORTYPE = 0.6f;
constexpr float PC_PYRO_INITARMORTYPE = 0.6f;
constexpr unsigned char PC_PYRO_ARMORCLASSES = 27; // ALL except EXPLOSION
constexpr unsigned char PC_PYRO_INITARMORCLASS = 16; // #AT_SAVEFIRE
#define PC_PYRO_WEAPONS (WEAP_INCENDIARY | WEAP_FLAMETHROWER | WEAP_AXE | WEAP_SHOTGUN)
constexpr unsigned char PC_PYRO_MAXAMMO_SHOT = 40;
constexpr unsigned char PC_PYRO_MAXAMMO_NAIL = 50;
constexpr unsigned char PC_PYRO_MAXAMMO_CELL = 200;
constexpr unsigned char PC_PYRO_MAXAMMO_ROCKET = 20;
constexpr unsigned char PC_PYRO_INITAMMO_SHOT = 20;
constexpr unsigned char PC_PYRO_INITAMMO_NAIL = 0;
constexpr unsigned char PC_PYRO_INITAMMO_CELL = 120;
constexpr unsigned char PC_PYRO_INITAMMO_ROCKET = 5;
#define PC_PYRO_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_PYRO_GRENADE_TYPE_2 GR_TYPE_NAPALM
constexpr unsigned char PC_PYRO_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_PYRO_GRENADE_INIT_2 = 4;
constexpr unsigned char PC_PYRO_TF_ITEMS = 0;
constexpr unsigned char PC_PYRO_ROCKET_USAGE = 3; // Number of rockets per incendiary cannon shot
// Class Details for SPY
constexpr unsigned short PC_SPY_SKIN = 22;
constexpr unsigned short PC_SPY_MAXHEALTH = 90;
constexpr unsigned short PC_SPY_MAXSPEED = 300;
constexpr unsigned short PC_SPY_MAXSTRAFESPEED = 300;
constexpr unsigned short PC_SPY_MAXARMOR = 100;
constexpr unsigned short PC_SPY_INITARMOR = 25;
constexpr float PC_SPY_MAXARMORTYPE = 0.6f; // Was 0.3
constexpr float PC_SPY_INITARMORTYPE = 0.6f; // Was 0.3
constexpr unsigned char PC_SPY_ARMORCLASSES = 27; // ALL except EXPLOSION
constexpr unsigned char PC_SPY_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_SPY_WEAPONS (WEAP_AXE | WEAP_TRANQ | WEAP_SUPER_SHOTGUN | WEAP_NAILGUN)
constexpr unsigned char PC_SPY_MAXAMMO_SHOT = 40;
constexpr unsigned char PC_SPY_MAXAMMO_NAIL = 100;
constexpr unsigned char PC_SPY_MAXAMMO_CELL = 30;
constexpr unsigned char PC_SPY_MAXAMMO_ROCKET = 15;
constexpr unsigned char PC_SPY_INITAMMO_SHOT = 40;
constexpr unsigned char PC_SPY_INITAMMO_NAIL = 50;
constexpr unsigned char PC_SPY_INITAMMO_CELL = 10;
constexpr unsigned char PC_SPY_INITAMMO_ROCKET = 0;
#define PC_SPY_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_SPY_GRENADE_TYPE_2 GR_TYPE_GAS
constexpr unsigned char PC_SPY_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_SPY_GRENADE_INIT_2 = 2;
constexpr unsigned char PC_SPY_TF_ITEMS = 0;
constexpr unsigned char PC_SPY_CELL_REGEN_TIME = 5;
constexpr unsigned char PC_SPY_CELL_REGEN_AMOUNT = 1;
constexpr unsigned char PC_SPY_CELL_USAGE = 3; // Amount of cells spent while invisible
constexpr unsigned char PC_SPY_GO_UNDERCOVER_TIME = 4; // Time it takes to go undercover
// Class Details for ENGINEER
constexpr unsigned short PC_ENGINEER_SKIN = 22; // Not used anymore
constexpr unsigned short PC_ENGINEER_MAXHEALTH = 80;
constexpr unsigned short PC_ENGINEER_MAXSPEED = 300;
constexpr unsigned short PC_ENGINEER_MAXSTRAFESPEED = 300;
constexpr unsigned short PC_ENGINEER_MAXARMOR = 50;
constexpr unsigned short PC_ENGINEER_INITARMOR = 25;
constexpr float PC_ENGINEER_MAXARMORTYPE = 0.6f;
constexpr float PC_ENGINEER_INITARMORTYPE = 0.3f;
constexpr unsigned char PC_ENGINEER_ARMORCLASSES = 31; // ALL
constexpr unsigned char PC_ENGINEER_INITARMORCLASS = 0; // Armor class worn when respawned
#define PC_ENGINEER_WEAPONS (WEAP_SPANNER | WEAP_LASER | WEAP_SUPER_SHOTGUN)
constexpr unsigned char PC_ENGINEER_MAXAMMO_SHOT = 50;
constexpr unsigned char PC_ENGINEER_MAXAMMO_NAIL = 50;
constexpr unsigned char PC_ENGINEER_MAXAMMO_CELL = 200; // synonymous with metal
constexpr unsigned char PC_ENGINEER_MAXAMMO_ROCKET = 30;
constexpr unsigned char PC_ENGINEER_INITAMMO_SHOT = 20;
constexpr unsigned char PC_ENGINEER_INITAMMO_NAIL = 25;
constexpr unsigned char PC_ENGINEER_INITAMMO_CELL = 100; // synonymous with metal
constexpr unsigned char PC_ENGINEER_INITAMMO_ROCKET = 0;
#define PC_ENGINEER_GRENADE_TYPE_1 GR_TYPE_NORMAL
#define PC_ENGINEER_GRENADE_TYPE_2 GR_TYPE_EMP
constexpr unsigned char PC_ENGINEER_GRENADE_INIT_1 = 2;
constexpr unsigned char PC_ENGINEER_GRENADE_INIT_2 = 2;
constexpr unsigned char PC_ENGINEER_TF_ITEMS = 0;
// Class Details for CIVILIAN
constexpr unsigned short PC_CIVILIAN_SKIN = 22;
constexpr unsigned short PC_CIVILIAN_MAXHEALTH = 50;
constexpr unsigned short PC_CIVILIAN_MAXSPEED = 240;
constexpr unsigned short PC_CIVILIAN_MAXSTRAFESPEED = 240;
constexpr unsigned short PC_CIVILIAN_MAXARMOR = 0;
constexpr unsigned short PC_CIVILIAN_INITARMOR = 0;
constexpr unsigned short PC_CIVILIAN_MAXARMORTYPE = 0;
constexpr unsigned short PC_CIVILIAN_INITARMORTYPE = 0;
constexpr unsigned short PC_CIVILIAN_ARMORCLASSES = 0;
constexpr unsigned short PC_CIVILIAN_INITARMORCLASS = 0;
#define PC_CIVILIAN_WEAPONS WEAP_AXE
constexpr unsigned char PC_CIVILIAN_MAXAMMO_SHOT = 0;
constexpr unsigned char PC_CIVILIAN_MAXAMMO_NAIL = 0;
constexpr unsigned char PC_CIVILIAN_MAXAMMO_CELL = 0;
constexpr unsigned char PC_CIVILIAN_MAXAMMO_ROCKET = 0;
constexpr unsigned char PC_CIVILIAN_INITAMMO_SHOT = 0;
constexpr unsigned char PC_CIVILIAN_INITAMMO_NAIL = 0;
constexpr unsigned char PC_CIVILIAN_INITAMMO_CELL = 0;
constexpr unsigned char PC_CIVILIAN_INITAMMO_ROCKET = 0;
constexpr unsigned char PC_CIVILIAN_GRENADE_TYPE_1 = 0;
constexpr unsigned char PC_CIVILIAN_GRENADE_TYPE_2 = 0;
constexpr unsigned char PC_CIVILIAN_GRENADE_INIT_1 = 0;
constexpr unsigned char PC_CIVILIAN_GRENADE_INIT_2 = 0;
constexpr unsigned char PC_CIVILIAN_TF_ITEMS = 0;
/*==========================================================================*/
/* TEAMFORTRESS GOALS */
/*==========================================================================*/
// For all these defines, see the tfortmap.txt that came with the zip
// for complete descriptions.
// Defines for Goal Activation types : goal_activation (in goals)
constexpr unsigned short TFGA_TOUCH = 1; // Activated when touched
constexpr unsigned short TFGA_TOUCH_DETPACK = 2; // Activated when touched by a detpack explosion
constexpr unsigned short TFGA_REVERSE_AP = 4; // Activated when AP details are _not_ met
constexpr unsigned short TFGA_SPANNER = 8; // Activated when hit by an engineer's spanner
constexpr unsigned short TFGA_DROPTOGROUND = 2048; // Drop to Ground when spawning
// Defines for Goal Effects types : goal_effect
constexpr unsigned char TFGE_AP = 1; // AP is affected. Default.
constexpr unsigned char TFGE_AP_TEAM = 2; // All of the AP's team.
constexpr unsigned char TFGE_NOT_AP_TEAM = 4; // All except AP's team.
constexpr unsigned char TFGE_NOT_AP = 8; // All except AP.
constexpr unsigned char TFGE_WALL = 16; // If set, walls stop the Radius effects
constexpr unsigned char TFGE_SAME_ENVIRONMENT = 32; // If set, players in a different environment to the Goal are not affected
constexpr unsigned char TFGE_TIMER_CHECK_AP = 64; // If set, Timer Goals check their criteria for all players fitting their effects