-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMultiplayer.c
3839 lines (3331 loc) · 92 KB
/
Multiplayer.c
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
/*
* The X Men, October 1996
* Copyright (c) 1996 Probe Entertainment Limited
* All Rights Reserved
*
* $Header: /PcProjectX/Multiplayer.c 290 17/09/98 15:27 Phillipd $
*
* $Log: /PcProjectX/Multiplayer.c $
*
* 290 17/09/98 15:27 Phillipd
*
* 289 14/09/98 16:33 Philipy
*
* 288 14/09/98 15:35 Philipy
* added facility for server based collisions
*
* 287 3/09/98 17:34 Philipy
* fixed server lag tolerance bug
*
* 286 3/09/98 15:42 Philipy
* re-allowed lag tolerance for server games
*
* 285 3/09/98 9:31 Philipy
* somw Gamespy fixes
* added Session ( GUID ) and TCP command line flags
* added TRACKER_NAME facility
*
* 284 28/08/98 9:19 Collinsd
*
* 283 27/08/98 20:12 Philipy
* manual / auto server mode now selectable from menus
* text now displayed when server in game & not rendering
* dynamic PPS setting re-enabled for server
*
* 282 26/08/98 17:06 Philipy
* tracker now migrates along with host
*
* 281 20/08/98 15:28 Philipy
* You can now join server based games after being launched by a lobby.
* Level name is updated after pseudohost selects level
* AVI can now play if no sound hw exists
* started gamespy support
*
* 280 18/08/98 16:19 Philipy
*
* 279 17/08/98 18:00 Philipy
* removed loads of unreferenced local variables
*
* 278 17/08/98 17:13 Philipy
* added -ServerChoosesGame & ServerAutoStart command line options
*
* 277 17/08/98 4:59p Oliverc
* Changed the DirectPlay check to DX6
*
* 276 17/08/98 11:16 Philipy
* prevented \n appearing in session desc
*
* 275 14/08/98 15:25 Philipy
* added trilinear option to menus
* fixed level name / shutdown packet in heartbeat
*
*
* 274 14/08/98 9:13 Phillipd
* DirectX6 is in effect.......
*
* 273 12/08/98 12:51 Philipy
* status request now treated as type 0 if no type specified.
* responses now sent to requester address, not tracker address.
* correct max players value now sent in heartbeat packet.
*
* 272 7/08/98 12:45 Philipy
* heartbeat now enabled for non tcp games ( if heartbeat.txt exists )
* status type 0 now treated as status type 254
* if lobby launched with max players set to 0, host is able to set max
* players
* shutdown udp packet now sent ( if specified in heartbeat.txt )
*
* 271 5/08/98 11:04 Philipy
* added AutoStart facility ( joins game based on GUID in registery )
* upped patch version to 1.02
*
* 270 31/07/98 12:17 Philipy
*
* 269 30/07/98 10:43a Oliverc
* Fixed TCP/IP address saving
*
* 268 28/07/98 14:44 Philipy
* all server timeouts now configurable
*
* 267 28/07/98 10:39 Philipy
* Max players now works properly for server games
*
* 266 23/07/98 15:51 Philipy
* CTF subtype now set b4 calling SetUpGameType
*
* 265 22/07/98 16:53 Philipy
* changed rejoining check so that dynamically updated user fields in SD
* are not compared
*
* 264 21/07/98 17:31 Philipy
* added timeout stuff for titles
*
* 263 21/07/98 14:21 Phillipd
*
* 262 21/07/98 12:10 Philipy
*
* 261 21/07/98 12:09 Collinsd
* MAX_PLAYERS increased to 24 and version number incremented.
*
* 260 21/07/98 11:39 Philipy
* heartbeat packets now only sent if frequency specified
* modified PlayersList to use 16 rather than MAX_PLAYERS
*
* 259 20/07/98 12:27 Philipy
* nicer handling of uninstalled levels
*
* 258 7/16/98 10:01a Phillipd
*
* 257 7/15/98 9:37a Phillipd
*
* 256 7/15/98 9:30a Phillipd
*
* 255 7/14/98 11:26a Phillipd
*
* 254 14/07/98 11:15 Philipy
* various patch bugs
* pseudohost quitting in titles
*
* 253 7/14/98 10:25a Phillipd
*
* 252 7/10/98 5:20p Phillipd
*
* 251 7/10/98 11:15a Phillipd
*
* 250 7/09/98 11:50a Phillipd
* Polytext now works being turned off for the Server.....HooRay...
*
* 249 8/07/98 10:13 Philipy
*
* 248 7/07/98 18:05 Philipy
* added lobby autostart code ( when all players have recieved init msg )
* added num primary weapons menu option ( propergated to other players &|
* server )
* extracted new title text for localisation
*
* 247 3/07/98 17:46 Philipy
* added quit option when using quickstart
*
* 246 3/07/98 11:54 Philipy
* heartbeat & quickstart stuff
*
* 245 7/01/98 3:26p Phillipd
*
* 244 6/26/98 4:13p Phillipd
*
* 243 6/24/98 10:44a Phillipd
*
* 242 6/24/98 10:31a Phillipd
*
* 241 24/06/98 10:04 Philipy
* heartbeat stuff ( not currently active )
*
* 240 23/06/98 15:13 Philipy
*
* 239 23/06/98 14:49 Philipy
*
* 238 23/06/98 12:46 Philipy
*
* 237 6/22/98 2:16p Phillipd
* Option to reset the score for every level..............
*
* 236 17/06/98 19:33 Philipy
* more win98 stuff
*
* 235 16/06/98 16:32 Philipy
* more lobby / join game stuff
*
* 234 13/06/98 20:46 Philipy
* improved lobby support:
* host now migrates properly
* you can quit b4 starting game without screwing up session
*
* 233 11/06/98 17:28 Collinsd
* Fixed some warnings.
*
* 232 11/06/98 16:57 Philipy
* loads of win98 shareware version stuff
*
* 231 6/11/98 12:43p Phillipd
*
* 230 11/06/98 9:54 Philipy
* files checked in prior to starting Win98 shareware version
*
* 229 6/09/98 3:49p Phillipd
*
* 228 6/09/98 12:14p Phillipd
*
* 227 6/09/98 12:09p Phillipd
*
* 226 9/06/98 11:23 Philipy
* server now reset if pseudohost does not have any valid levels
* fixed timed game bug for server based games
*
* 225 8/06/98 12:28 Philipy
* server levels now sent across to pseudohost. Pseudohost can only pick
* valid levels
*
* 224 22/05/98 17:51 Philipy
* more work on session info
*
* 223 20/05/98 16:42 Philipy
* stoped server team games starting straight away
*
* 222 20/05/98 9:38 Philipy
* implemented front end server menus
* removed ( invalid ) ping from sessions menu
* changed EnumPlayers so that it solely uses MSG_NAME
*
* 221 5/12/98 2:59p Phillipd
*
* 220 5/12/98 2:54p Phillipd
*
* 219 5/12/98 11:02a Phillipd
*
* 218 11/05/98 15:15 Philipy
* added session info stuff ( game type, ping etc )
*
* 217 5/07/98 9:37a Phillipd
*
* 216 4/29/98 4:41p Phillipd
*
* 215 4/29/98 11:43a Phillipd
*
* 214 4/27/98 4:01p Phillipd
*
* 213 4/14/98 3:54p Phillipd
*
* 212 11/04/98 12:17 Oliverc
* Added -AnyDPlayVersion command line switch to disable Direct Play DLL
* version checking
*
* 211 4/10/98 12:43p Phillipd
*
* 210 8/04/98 20:47 Philipy
* title text messages now properly initialised
* holo-glaire removed for sw version
* compound buffer size can now be set in command line and opt file
* prevented "level select disabled" from appearing at start of
* multiplayer game
*
* 209 8/04/98 20:35 Collinsd
*
* 208 8/04/98 20:33 Collinsd
*
* 207 8/04/98 17:01 Oliverc
* Last service provider now stored in registry
*
* 206 4/08/98 2:45p Phillipd
*
* 205 8/04/98 11:06 Philipy
* fixed host not displaying player names bug
*
* 204 7/04/98 12:09 Philipy
* Olly fixed CTF flag now reset when going into single player game
*
* 203 7/04/98 9:10 Philipy
* fixed mem leak in FileGetVersion
*
* 202 6/04/98 21:19 Oliverc
* Increased line spacing for network service providers to prevent TCP/IP
* from being truncated
*
* 201 4/06/98 7:06p Phillipd
*
* 200 5/04/98 17:40 Collinsd
* Updated all demo functions.
*
* 199 5/04/98 17:10 Collinsd
* Hacked demos to work.
*
* 198 4/05/98 2:33p Phillipd
*
* 197 4/04/98 11:21 Oliverc
* Demos now play from CD if not installed
*
* 196 3/04/98 17:58 Collinsd
*
* 195 30/03/98 23:38 Oliverc
* Fixed minor glitch in PreferedMaxPlayers for modem vs network multiplay
*
* 194 30/03/98 21:28 Oliverc
* Fixed demo naming bug
*
* 193 3/30/98 7:35p Phillipd
*
* 192 3/30/98 7:11p Phillipd
*
* 191 3/27/98 3:10p Phillipd
*
* 190 25/03/98 15:06 Oliverc
* Only standard service providers are DirectPlay version checked now
*
* 189 3/21/98 2:34p Phillipd
*
* 188 16/03/98 16:40 Philipy
* fixed buffered key problem
* added AVI to splash screens
*
* 187 16/03/98 16:39 Collinsd
* Random pickups now work ( honest ).
*
* 186 16/03/98 10:52 Philipy
* removed 'No splash levels' msg
*
* 185 15/03/98 18:40 Philipy
* added water effect splash screen
* fixed bug with end game sequence
* implemented attract mode
* text macros now saved in config
*
* 184 11/03/98 10:55 Philipy
* all sfx now stopped for pause mode
* correct level info now displayed in briefing screen
* correct level now entered after completing a previously saved level
* level timer now accurate
*
* 183 8/03/98 16:50 Philipy
* prevent MenuBack from some menus when lobby launched
* added team game support for lobby
*
* 182 7/03/98 14:26 Oliverc
* Clean demo no longer needs different output name
*
* 181 6/03/98 17:36 Philipy
* implemented ability to run when launched by lobby
*
* 180 3/06/98 5:13p Phillipd
*
* 179 4/03/98 12:54 Oliverc
* Added ACCLAIM_EUROPE fingerprint and re-enabled IP protection
*
* 178 4/03/98 12:33 Oliverc
* CTF mode fully enabled
*
* 177 3/03/98 16:59 Oliverc
* New multiplayer CTF mode stuff (1st attempt)
*
* 176 3/02/98 12:29p Phillipd
*
* 175 2/03/98 12:10 Oliverc
* Hidden ".DMO" extension from demo file names
* and added extra info to .DMO file to specify game type etc
*
* 174 27/02/98 16:30 Oliverc
* Multiplayer game options always restored from registry on entering
* "create multiplayer game" menu, and only saved back to registry when
* multiplayer game started
*
* 173 25/02/98 16:19 Oliverc
* More multiplayer tweaks
*
* 172 24/02/98 22:00 Oliverc
* Tweaks to multiplayer games
*
* 171 24/02/98 16:54 Oliverc
* 1st attempt at bounty hunt multiplayer game
*
* 170 2/23/98 2:02p Phillipd
* Load Save now works.
*
* 169 20/02/98 19:41 Oliverc
* 2nd prototype of capture the flag game
*
* 168 20/02/98 15:28 Philipy
* re-implented AVI
* splash screens can now play demos and AVIs
*
* 167 10/02/98 16:08 Collinsd
* Toggle for descent/forsaken collision added
*
* 166 5/02/98 12:51 Collinsd
* Bomb tag works again and invulnerable enemies are no longer effected by
* shockwaves
*
* 165 2/02/98 16:15 Oliverc
* Added check for Direct Play 5.0a update when creating or joining
* multiplayer games
*
* 164 1/29/98 2:27p Phillipd
* Demo can now be saved to ram....and can be saved if your not the
* host...
*
* 163 27/01/98 12:11 Philipy
* demo settings now always restored b4 playing demo
* drop primary / drop secondary removed
*
* 162 27/01/98 11:05 Philipy
* fixed team game stuff
*
* 161 24/01/98 18:38 Philipy
* time limit max now 15 mins
* impossible to have unlimited time
*
* 160 24/01/98 17:38 Philipy
* fixed multiplayer join-quit-join bug
* fixed attract mode loading wrong level
*
* 159 22/01/98 19:13 Philipy
* fixed re-loading looping sfx while in level
* biker speech now switchable
*
* 158 22/01/98 10:07 Collinsd
* Names dont appear in demo playback if teamgame played before.
*
* 157 22/01/98 8:45 Collinsd
* Deallocate CountDownDigits in release level.
* Turned off CoundDown when playing Demos
*
* 156 21/01/98 12:19 Philipy
* Added attract mode for shareware
* fixed looping sfx volume bug
*
* 155 1/19/98 4:21p Phillipd
* Bright Ships flag added.....
*
* 154 1/19/98 9:41a Phillipd
*
* 153 17/01/98 16:16 Philipy
* fixed demo playback bug
*
* 152 1/16/98 2:54p Phillipd
*
* 151 1/16/98 8:46a Phillipd
*
* 150 15/01/98 23:19 Oliverc
* Moved new Probe IP from EXTRA_IP to default CheckLegalIP()
*
* 149 1/15/98 1:59p Phillipd
*
* 148 13/01/98 11:48 Oliverc
* TCPIP disabled for SHAREWARE
*
* 147 13/01/98 10:58 Philipy
* lives now carry over between levels as before
* put #ifdefs around splash screens for shareware
*
* 146 12/01/98 18:05 Oliverc
*
* 145 1/12/98 10:04a Phillipd
*
* 144 11/01/98 17:54 Philipy
* inter level mission screen
*
* 143 9/01/98 17:25 Philipy
* player is now forced to start on level 0
*
* 142 9/01/98 11:13 Philipy
* CD nows plays last track
* CD now replays current track from seperate ( low priority ) thread -
* but still causes pause
* loading bar now displayed when loading
*
* 141 9/01/98 10:35 Oliverc
* Re-enabled MULTIPLAYER_VERSION check when joining game
*
* 140 1/09/98 10:31a Phillipd
* Bugs fixed......
*
* 139 7/01/98 15:03 Oliverc
* SHAREWARE versions now use built-in level lists instead of external
* mission.dat and battle.dat files
*
* 138 1/07/98 11:07a Phillipd
*
* 137 1/07/98 10:43a Phillipd
*
* 136 12/19/97 2:35p Phillipd
*
* 135 12/13/97 1:35p Phillipd
*
* 134 12/11/97 4:04p Phillipd
*
* 133 12/11/97 12:00p Phillipd
*
* 132 11/12/97 11:55 Oliverc
* Fixed CRASH_BUG in multiplayer joining then aborting (pls check this
* Phil!)
*
* 131 12/03/97 2:50p Phillipd
* Packets per second functioning.....
*
* 130 3/12/97 14:15 Oliverc
* Prevented demo playback from showing Current_Camera_View until that
* player's position has been updated from the DMO file
*
* 129 1/12/97 12:21 Oliverc
* Disabled ReleaseView() for Attract mode in SELF_PLAY mode
*
* 128 11/21/97 10:56a Phillipd
* Max Kills to end a level....
*
* 127 11/17/97 4:34p Phillipd
*
* 126 4/11/97 16:26 Philipy
* AVI now plays for stats screens
* implemented scrolling messages (not enabled)
*
* 125 10/30/97 12:40p Phillipd
*
* 124 28/10/97 9:41 Philipy
* Team member names now flash on team select screen when not ready
*
* 123 10/22/97 12:14p Phillipd
*
* 122 8/10/97 20:30 Philipy
*
* 121 7/10/97 12:37 Collinsd
* Added spotfx for a level and point and vector stuff for MX and MXA
* models.
*
* 120 1-10-97 8:26p Philipy
* IP address now only displayed when hosting IP game
*
* 119 10/01/97 2:48p Phillipd
*
* 118 9/30/97 4:20p Phillipd
*
* 117 30-09-97 10:46a Philipy
* "Create Game" screen now shows host IP Address
*
* 116 9/30/97 8:46a Phillipd
*
* 115 9/29/97 11:55a Phillipd
* Dawn of a new age with directplay 3
*
* 114 9/29/97 9:08a Phillipd
*
* 113 9/18/97 3:56p Phillipd
* Fixed stats bug....
*
* 112 9/18/97 12:16p Phillipd
*
* 111 9/18/97 9:42a Phillipd
* Proper single player started..
*
* 110 15-09-97 3:23p Philipy
* message displayed, then correct menu displayed on new host machine if
* host migrates.
* Host can now start another game, having quit 'waiting to start' menu
*
* 109 14-09-97 6:51p Philipy
* joining existing team game - you can now select which team to go into,
* and view current scores
*
* 108 5-09-97 11:12a Philipy
* demo playback stuff from new menus
*
* 107 3/09/97 19:55 Oliverc
* Forced player names & bike to match player slot number for ECTS demo
*
* 106 1-09-97 5:47p Philipy
* removed warnings....oops!
*
* 105 1-09-97 5:35p Philipy
* changes made for 3 & 4 player team game
*
* 104 26-08-97 4:16p Philipy
* various changes to enable host/join a game from new menus
*
* 103 31-07-97 5:26p Philipy
* switched off buffering for demo playback
*
* 102 28/07/97 16:44 Collinsd
* Tracker uses ships to target, demo mode works again?
*
* 101 25/07/97 12:10 Collinsd
* Changed ships bike index, and changed skin for olly.
*
* 100 22-07-97 4:32p Philipy
* removed some E3 demo stuff
*
* 99 17/07/97 15:38 Collinsd
* BGObjects now use compobjs.
*
* 98 14/07/97 12:44 Oliverc
* Changed MICROSOFT_DEBUG flag to DISABLE_IP_CHECKING
*
* 97 8/07/97 16:30 Collinsd
* Dicked about with include files FUCK!
*
* 96 6/24/97 11:12a Phillipd
*
* 95 17/06/97 9:30 Oliverc
* Disabled IP protection for MICROSOFT_DEBUG version
*
* 94 6/16/97 4:15p Phillipd
*
* 93 6/14/97 1:11p Phillipd
*
* 92 6/12/97 11:15a Phillipd
*
* 91 10/06/97 17:35 Oliverc
* Changed way fingerprint and IP addresses are handled for special demo
* versions
*
* 90 6/10/97 9:01a Phillipd
*
* 89 9-06-97 9:03p Philipy
* removed flip to GDI for E3 demo, when joining a game
*
* 88 7-06-97 9:13p Philipy
* auto join a game
*
* 87 6/07/97 3:15p Phillipd
*
* 86 6/07/97 10:52a Phillipd
*
* 85 6/06/97 19:31 Oliverc
*
* 84 6/06/97 4:00p Phillipd
*
* 83 6/06/97 3:32p Phillipd
*
* 82 6/06/97 2:24p Phillipd
*
* 81 6/06/97 2:23p Phillipd
*
* 80 6-06-97 2:20p Philipy
* join a game with new menus
*
* 79 6/05/97 4:11p Phillipd
*
* 78 6/03/97 10:46a Phillipd
*
* 77 5/27/97 5:40p Phillipd
*
* 76 5/19/97 4:48p Phillipd
* Disabled PowerVR demo fingerprint/IP address
*
* 75 5/19/97 4:19p Phillipd
* Demo for PowerVR debugging
*
* 74 5/08/97 11:23a Phillipd
* Demos now contain a name for the level not a number.....
*
* 73 5/01/97 12:46p Phillipd
*
* 72 30/04/97 10:58 Oliverc
* Moved FingerPrint[] to lastcomp.c
*
* 71 29/04/97 17:50 Oliverc
* Disabled POWERVR_DEMO
*
* 70 29/04/97 17:49 Oliverc
*
* 69 4/28/97 4:14p Phillipd
*
* 68 4/26/97 2:01p Phillipd
*
* 67 4/25/97 5:12p Phillipd
*
* 66 4/25/97 10:36a Phillipd
* Better demo playback...which player eyes works again
*
* 65 4/24/97 9:09a Phillipd
*
* 64 4/22/97 1:51p Phillipd
*
* 63 4/16/97 4:41p Phillipd
*
* 62 4/10/97 4:29p Phillipd
* DirectPlay3 is here...
*
* 61 4/10/97 10:02a Phillipd
*
* 60 4/08/97 10:41a Phillipd
* 12 players added...
*
* 59 4/07/97 12:27p Phillipd
*
* 58 4/05/97 12:08p Phillipd
*
* 57 27/03/97 12:32 Oliverc
* Added Brian Bruning's IP address (on unused #ifdef)
*
* 56 20-03-97 5:46p Collinsd
* Countdown timer now works in multiplayer.
*
* 55 3/13/97 8:56a Phillipd
*
* 54 3/12/97 6:01p Phillipd
*
* 53 3/12/97 4:42p Phillipd
*
* 52 3/11/97 5:41p Phillipd
*
* 51 3/11/97 4:55p Phillipd
* Demo Interpolate stuff is now working but not finished...
*
* 50 3/11/97 9:16a Phillipd
* Texture animation added to models..not finished..
*
* 49 3/10/97 4:03p Phillipd
*
* 48 3/01/97 12:57p Phillipd
* handles multiple join requests from 1 person,,,,
*
* 47 2/27/97 8:58a Phillipd
*
* 46 26/02/97 20:00 Oliverc
* Added the following to the set of allowed IP addresses: Sculptured US,
* Acclaim UK, Iguana UK, Acclaim Germany, Acclaim France.
* Removed Shawn's dynamic IP address.
* ...and deleted much out-of-date "Amy" fingerprint.
*
* 45 2/26/97 4:05p Phillipd
*
* 44 2/25/97 4:05p Phillipd
*
* 43 2/25/97 2:51p Phillipd
*
* 42 2/24/97 4:47p Phillipd
* GameElapsedTime is now relative to the demo not the
* real world....so dynamic speed change is possible..
*
* 41 2/24/97 10:00a Phillipd
* Demo mode with multispeed has been added..
*
* 40 2/20/97 11:10a Phillipd
* Changed the way a Player Get his Player Number...
* Much more stable and friendly...
*
* 39 19-02-97 5:08p Collinsd
* Added shawn's IP Address
*
* 38 13/02/97 17:49 Oliverc
*
* 37 13-02-97 3:36p Collinsd
*
* 36 2/11/97 5:11p Phillipd
*
* 35 11-02-97 5:08p Collinsd
* Triggers/RegenPoints and pickups now are sent across correctly.
*
* 34 5-02-97 3:00p Collinsd
* Just got rid of warnings.
*
* 33 2/04/97 5:11p Phillipd
* new player joining brute force reject..
*
* 32 2/03/97 5:16p Phillipd
* Translusceny is now controlled by global execute buffers.... which is
* much better...
*
* 31 20-01-97 11:21a Collinsd
* Added time limit to multiplayer games.
*
* 30 18-01-97 3:01p Collinsd
* Added countdown code. ( Dissabled for now ).
*
* 29 2-01-97 12:19p Collinsd
* Network game now works again.
* Orbit pulsar now works over network game.
*
* 28 12/27/96 12:34p Phillipd
* all files are not dependant on mydplay.h...just some..
* including it several times in the same files didnt help..
*
* 27 12/23/96 6:04p Phillipd
*
* 26 12/23/96 8:50a Phillipd
*
* 25 12/19/96 4:02p Phillipd
*
* 24 12/18/96 9:50a Phillipd
*
* 23 12/17/96 4:57p Phillipd
* Version Control Added..
*
* 22 12/17/96 2:56p Phillipd
*
* 21 12/17/96 2:47p Phillipd
*
* 20 12/17/96 2:32p Phillipd
*
* 19 12/17/96 12:55p Phillipd
*
* 18 12/17/96 9:20a Phillipd
*
* 17 12/14/96 5:04p Phillipd
*
* 16 12/13/96 12:52p Phillipd
*
* 15 12/12/96 12:46p Phillipd
*
* 14 12/12/96 10:56a Phillipd
*
* 13 12/06/96 12:22p Phillipd
*
* 12 12/05/96 4:17p Collinsd
* GDI flip added for tcpip
*
* 11 12/03/96 5:00p Phillipd
* Quting if not host bug fixed...
* game doesnt start if ya just quit the title screen...
*
* 10 12/03/96 11:14a Phillipd
*
* 9 12/03/96 10:40a Phillipd
* Multiplay can now back out
*
* 8 11/28/96 11:28a Phillipd
* You can see who is in a game and how many players
* there should be...
*
* 7 11/28/96 10:00a Phillipd
* Multiplayer join changed beyond all recognition,,,
*
* 6 11/27/96 11:05a Phillipd
* Fixed Mouse speed on fast machines.....
*
* 5 11/25/96 11:59a Phillipd
*
* 4 11/20/96 2:42p Phillipd
* players can now restart and keep there score...
*
* 3 11/19/96 9:31a Phillipd
*
* 2 11/18/96 3:26p Phillipd
*
* 1 11/18/96 12:23p Phillipd
* New menu multiplayer stuff..
*/
#define IDIRECTPLAY2_OR_GREATER
#include <stdio.h>
#include "windows.h"
#include "typedefs.h"
#include "main.h"
#include <dplay.h>
#include <dplobby.h>
#include "comm.h"
#include "d3dappi.h"
#include "title.h"
#include "typedefs.h"
#include <dplay.h>
#include "new3d.h"
#include "quat.h"
#include "CompObjects.h"
#include "bgobjects.h"
#include "Object.h"
#include "mydplay.h"
#include "winsock.h"
#include "MultiPlayer.h"
#include "mxload.h"
#include "mxaload.h"
#include <stdio.h>
#include "demo_id.h"
#include "text.h"
#include "ships.h"
#include "LoadSave.h"
#include "pickups.h"
#include "primary.h"
#include "controls.h"
#include "xmem.h"
#include "Local.h"
#include "dpthread.h"
// required version of Direct Play is 6.0 (4.6.0.318)
#define DPLAY_VERSION_HI (4)
#define DPLAY_VERSION_LO (6)
#define DPLAY_REVISION_HI (0)
#define DPLAY_REVISION_LO (318)
/*
* Externals
*/
extern BOOL OKToProcessKeys;
extern SLIDER MaxServerPlayersSlider;
extern BOOL OKToJoinSession;
extern int OldPPSValue;
extern char host_ip[];
#ifdef MANUAL_SESSIONDESC_PROPAGATE
extern LPDPSESSIONDESC2 glpdpSD_copy;
#endif
BOOL CheckDirectPlayVersion = TRUE;
BOOL IsServerGame = FALSE;
BOOL ResetKillsPerLevel = FALSE;
BOOL bTCP = FALSE;
extern uint8 QuickStart;
extern BOOL HarmTeamMates;
extern BOOL ServerRendering;
extern BOOL BrightShips;
extern BOOL BikeExhausts;
extern int32 ColPerspective;
extern HKEY ghCondemnedKey; // Condemned registry key handle
extern LONG RegGet(LPCTSTR lptszName, LPBYTE lpData, LPDWORD lpdwDataSize);
extern LONG RegSet(LPCTSTR lptszName, CONST BYTE * lpData, DWORD dwSize);
extern LONG RegSetA(LPCTSTR lptszName, CONST BYTE * lpData, DWORD dwSize);
extern uint32 BIGPACKETBUFFERSIZE;
extern uint32 SERVERPACKETBUFFERSIZE;
extern char cd_path[];
extern BOOL NoMenuBack;
extern void DebugLastError( void );
extern BOOL NeedFlagAtHome;
extern BOOL OwnFlagTeleportsHome;
extern BOOL CanCarryOwnFlag;
extern SLIDER CTFSlider;
extern BOOL IsLobbyLaunched;
extern BOOL UseShortPackets;
extern BOOL BigPackets;
extern char *DemoFileName( char *demoname );
extern char *DemoName( char *demofilename );
extern void SetMultiplayerPrefs( void );
extern BOOL LimitedLoad;
extern LIST MySessionsList;
extern BOOL Panel;
extern BOOL PreAttractModePanel;
extern BOOL RecordDemoToRam;
extern MENUITEM TeamGameHostMenuItem;
extern BYTE PreSynchupStatus;
extern int CurrentLoadingStep;
extern BOOL DemoShipInit[];
extern float DPlayUpdateInterval;
extern BOOL BrightShips;
extern BOOL MyBrightShips;
extern float Pulse;
extern char *EmptyString;
#if defined (SELF_PLAY) || defined(ECTS)
extern LIST BikeList;
#endif
extern BOOL IsServer;
extern BOOL IsHost; // is the user hosting/joining a game
extern DPID dcoID; // player id
extern int16 Lives;
extern BOOL BountyHunt;
extern BOOL CaptureTheFlag;
extern BOOL CTF;
extern BOOL BombTag;
extern TEXT DemoGameName;
extern BOOL RecordDemo;
extern LIST ServiceProvidersList;
extern LIST PlayersList;
extern LIST LevelList;
extern LIST TeamList[MAX_TEAMS];
extern MENUITEM TeamItem;
extern MENUITEM NewTeamItem;
extern BOOL TeamGame;
extern BYTE TeamNumber[MAX_PLAYERS];
extern SLIDER TimeLimit;
extern SLIDER DemoSpeed;
extern SLIDER MaxPlayersSlider;
extern SLIDER MaxKillsSlider;
extern int16 MaxKills;
extern TEXT MultiPlayerGameName;
extern char biker_name[256];
extern float framelag;
extern char MyName[];
extern char NickName[];
extern BYTE Current_Camera_View; // which object is currently using the camera view....
extern BYTE WhoIAm;
extern GLOBALSHIP Ships[MAX_PLAYERS];
extern int16 StatsStatus;
extern int16 Stats[MAX_PLAYERS+1][MAX_PLAYERS+1];
extern int16 StatsCount;
extern SHORTNAMETYPE Names; // all the players short Names....
extern int16 SelectedBike;
extern SLIDER NumOfPlayersSlider;
extern int MenuStackLevel;
extern BYTE GameStatus[]; // Game Status for every Ship...
extern SLIDER PacketsSlider;
extern LPDPSESSIONDESC2 glpdpSD;
extern LPDIRECTPLAY4A glpDP; // directplay object pointer
extern LPDIRECTPLAYLOBBY2A lpDPlayLobby; //Lobby stuff...
extern LPDPLCONNECTION glpdplConnection; // connection settings
extern TEXT TCPAddress;
extern DPID dcoID;