Subversion Repositories nw_plus

Rev

Rev 1 | Rev 8 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 h266 1
/*
2
--------------------------------------------------------------------------------
3
Duke: Nuclear Winter
4
By Joris Weimar
5
 1997 Simply Silly Software
6
--------------------------------------------------------------------------------
7
Duke: Nuclear Winter Plus
8
By Hendricks266
9
--------------------------------------------------------------------------------
10
*/
11
 
12
definecheat 14 endepisode
13
definecheat 15 endlevel
14
definecheat 25 endvolume
15
 
16
include NWDefs.con
17
include NWUser.con
18
 
19
setgamename Duke: Nuclear Winter
20
 
21
gamevar owner 0 2
22
gamevar temp2 0 2
23
gamevar temp3 0 2
24
gamevar temp4 0 2
25
gamevar ptemp 0 1
26
gamevar musicchange 0 1
7 h266 27
gamevar skin DUKE 1
1 h266 28
 
29
gamevar LOGO_FLAGS 767 0 // default; TEN screen reenabled
30
 
31
state cutsceneambience
32
  getactor[THISACTOR].lotag temp
33
 
34
  switch temp
35
 
36
    case WIND_AMBIENCE
37
    case WIND_REPEAT
38
     setactor[THISACTOR].lotag WIND2
39
    break
40
 
41
    case FLY_BY
42
     setactor[THISACTOR].lotag FLY_BY2
43
    break
44
 
45
  endswitch
46
ends
47
 
48
onevent EVENT_LOADACTOR
49
  getactor[THISACTOR].picnum picnum
50
  switch picnum
51
 
52
   case SNOWYDOORSHOCK
53
     spritepal 30
54
     cactor DOORSHOCK
55
   break
56
 
57
   case 3765 case 3766 case 3767 case 3768 cactor WOODENHORSE2 break
58
 
59
  // case PIGCOP case PIGCOPSTAYPUT case PIGCOPDIVE sizeat 48 40 break
60
   case SOBBOTWALK case SOBBOTFLY sizeat 42 36 break
61
   case ELFUZI case ELFUZISTAYPUT sizeat 32 27 break
62
   case ELFGUN case ELFGUNSTAYPUT sizeat 32 27 break
63
   case SNOWMAN sizeat 42 36 break
64
 
65
   case 1915
66
    cactor COMMANDER // failsafe fix for NWL5 bug
67
   break
68
 
69
   case MUSICANDSFX
70
     state cutsceneambience
71
   break
72
 
73
   case JETPACK
74
     ifspritepal 21 setvar temp 1
75
     spritepal 0
76
   break
77
 
78
/*
79
   case SNOWFLAKE
80
     cactor SNOW
81
     sizeat 8 8
82
   break
83
*/
84
 
85
   case XMASPRESENT
86
   case XMASPRESENT2
87
     getactor[THISACTOR].hitag temp
88
     setactor[THISACTOR].hitag 0
89
   break
90
 
91
  endswitch
92
endevent
93
 
94
onevent EVENT_EGS
95
 ifactor APLAYER setactor[THISACTOR].mdflags 16
96
 ifactor DUKETORSO setactor[THISACTOR].mdflags 16
97
 ifactor DUKEGUN setactor[THISACTOR].mdflags 16
98
 ifactor DUKELEG setactor[THISACTOR].mdflags 16
99
 ifactor DOORSHOCK setactor[THISACTOR].mdflags 16
100
 
101
 ifactor SNOW
102
   {
103
     sizeat 8 8
104
 
105
     setvar temp3 0
106
     randvar temp3 2047
107
     setactor[THISACTOR].ang temp3
108
 
109
     setvar temp2 -2047
110
     randvar temp2 2047
111
 
112
/*
113
     setvar temp3 0
114
     ifrnd 128 addvar temp3 4
115
     ifrnd 128 addvar temp3 8
116
     setactor[THISACTOR].cstat temp3
117
*/
118
   }
119
endevent
120
 
121
// -----------------------------------------------------------------------------
122
 
123
state standard_bjibs
124
  guts JIBS2 1
125
  guts JIBS3 2
126
  guts JIBS4 3
127
  guts JIBS5 2
128
  guts JIBS6 3
129
  ifrnd 6
130
  {
131
    guts JIBS1 1
132
  }         // a badly drawn spine
133
ends
134
 
135
state nwbreakobject
136
  ifaction 0
137
  {
138
    action ANULLACTION
139
    cstator 257
140
  }
141
    ifhitweapon
142
    {
143
      ifdead
144
      {
145
        ifactor WOODSLATS
146
        {
147
          sound GLASS_HEAVYBREAK
148
	  debris SCRAP3 5
149
	  debris SCRAP4 3
150
          killit
151
        }
152
      else
153
        ifactor RIBBON
154
        {
155
          sound GLASS_HEAVYBREAK
156
	  debris SCRAP3 5
157
	  debris SCRAP4 3
158
          killit
159
        }
160
      else
161
        ifactor MYBOX
162
        {
163
          sound GLASS_HEAVYBREAK
164
	  debris SCRAP3 5
165
	  debris SCRAP4 3
166
          killit
167
        }
168
      else
169
        ifactor SNOWGIB killit
170
      else
171
        ifactor DRUNKELF
172
        {
173
          sound PRED_DYING
174
          guts JIBS6 2
175
          guts JIBS6 3
176
          guts JIBS6 4
177
          killit
178
        }
179
      else
180
        ifactor CHOOCHOOSLUT
181
        {
182
          sound GLASS_HEAVYBREAK
183
	  debris SCRAP3 5
184
	  debris SCRAP4 3
185
          killit
186
        }
187
      else
188
        ifactor HORSEPOWER
189
        {
190
          sound GLASS_HEAVYBREAK
191
	  debris SCRAP3 5
192
	  debris SCRAP4 3
193
          killit
194
        }
195
      else
196
        ifactor TREEWITHSOMETHING
197
        {
198
          sound GLASS_HEAVYBREAK
199
	  debris SCRAP3 5
200
          ifrnd 96
201
          {
202
            ifrnd 64 spawn ATOMICHEALTH else spawn SHIELD
203
          }
204
          else
205
          {
206
            ifrnd 128 spawn STEROIDS else spawn FECES
207
          }
208
          killit
209
        }
210
      else
211
        ifactor SSPEAKER
212
        {
213
	  debris SCRAP4 3
214
          killit
215
        }
216
      }
217
    }
218
ends
219
 
220
useractor notenemy WOODSLATS MEDIUMSTRENGTH state nwbreakobject enda
221
 
222
useractor notenemy RIBBON WEAK state nwbreakobject enda
223
 
224
useractor notenemy SSPEAKER WEAK state nwbreakobject enda
225
 
226
useractor notenemy MYBOX WEAK state nwbreakobject enda
227
 
228
useractor notenemy DRUNKELF WEAK state nwbreakobject enda
229
 
230
useractor notenemy CHOOCHOOSLUT WEAK state nwbreakobject enda
231
 
232
useractor notenemy HORSEPOWER WEAK state nwbreakobject enda
233
 
234
useractor notenemy SNOWGIB WEAK state nwbreakobject enda
235
 
236
useractor notenemy TREEWITHSOMETHING TOUGH state nwbreakobject enda
237
 
238
actor JETPACK
239
  fall
240
  ifmove RESPAWN_ACTOR_FLAG
241
    state respawnit
242
  else
243
    ifp pshrunk nullop
244
    else
245
      ifp palive
246
        ifpdistl RETRIEVEDISTANCE
247
          ifcount 6
248
            ifpinventory GET_JETPACK JETPACK_AMOUNT
249
              ifcanseetarget
250
      {
251
        ifvare temp 1
252
        {
253
          addinventory GET_JETPACK JETPACK_NEAR_EMPTY
254
          quote 125
255
        }
256
        else
257
        {
258
          addinventory GET_JETPACK JETPACK_AMOUNT
259
          quote 41
260
        }
261
        ifspawnedby JETPACK
262
          state getcode
263
        else
264
          state quikget
265
      }
266
enda
267
 
268
action FEMHDANCE1 205 1 1 1 16
269
action FEMHDANCE3 205 1 1 1 26
270
action FEMHDANCE2 206 2 1 1 10
271
 
272
 
273
 
274
state nwbabecode
275
 getactor[THISACTOR].cstat temp
276
 ifvarand temp 1 nullop else addvar temp 1
277
 ifactor HALFBITCH { ifvarand temp 128 nullop else addvar temp 128 }
278
 ifvarand temp 256 nullop else addvar temp 256
279
 
280
 getuserdef .lockout temp2
281
 ifvare temp2 1
282
   {
283
     ifvarand temp 32768 nullop else addvar temp 32768
284
   }
285
 else
286
  // {
287
     ifvarand temp 32768 subvar temp 32768
288
  // }
289
 
290
 setactor[THISACTOR].cstat temp
291
 
292
 
293
 
294
  ifactor HALFBITCH nullop else fall
295
 
296
  ifaction FEMSHRUNK
297
  {
298
    ifcount SHRUNKDONECOUNT
299
    {
300
      action FEMANIMATE
301
      cstat 257
302
    }
303
    else
304
      ifcount SHRUNKCOUNT
305
        sizeto 40 40
306
    else
307
      state genericshrunkcode
308
  }
309
  else ifaction FEMGROW
310
  {
311
    ifcount 32
312
    {
313
      respawnhitag
314
      guts JIBS4 20
315
      guts JIBS6 20
316
      spritepal 6
317
      soundonce LADY_SCREAM
318
      ifactor SLUTASS debris SCRAP6 1
319
      sound SQUISH2
320
      killit
321
    }
322
    else
323
      sizeto MAXXSTRETCH MAXYSTRETCH
324
  }
325
 
326
 
327
  else
328
    ifaction FEMHDANCE1
329
  {
330
    ifactioncount 2
331
      action FEMHDANCE2
332
  }
333
  else
334
    ifaction FEMHDANCE2
335
  {
336
    ifactioncount 8
337
      action FEMHDANCE3
338
  }
339
  else
340
    ifaction FEMHDANCE3
341
  {
342
    ifactioncount 2
343
    action FEMANIMATE
344
  }
345
  else
346
    ifaction FEMFROZEN1
347
  {
348
    ifcount THAWTIME
349
    {
350
      action FEMANIMATE
351
      getlastpal
352
    }
353
    else
354
      ifcount FROZENDRIPTIME
355
    {
356
      ifactioncount 26
357
      {
358
        spawn WATERDRIP
359
        resetactioncount
360
      }
361
    }
362
 
363
    ifhitweapon
364
    {
365
      ifwasweapon FREEZEBLAST
366
      {
367
        strength 0
368
        break
369
      }
370
      lotsofglass 30
371
      sound GLASS_BREAKING
372
      respawnhitag
373
      ifrnd 84
374
        spawn BLOODPOOL
375
      killit
376
    }
377
    else
378
      ifp pfacing
379
        ifpdistl FROZENQUICKKICKDIST
380
          pkick
381
    break
382
  }
383
  else ifaction FEMFROZEN2
384
  {
385
    ifcount THAWTIME
386
    {
387
      action FEMANIMATE
388
      getlastpal
389
    }
390
    else
391
      ifcount FROZENDRIPTIME
392
    {
393
      ifactioncount 26
394
      {
395
        spawn WATERDRIP
396
        resetactioncount
397
      }
398
    }
399
 
400
    ifhitweapon
401
    {
402
      ifwasweapon FREEZEBLAST
403
      {
404
        strength 0
405
          break
406
      }
407
 
408
      lotsofglass 30
409
 
410
      sound GLASS_BREAKING
411
      ifrnd 84
412
        spawn BLOODPOOL
413
      respawnhitag
414
 
415
      ifrnd 128
416
        sound DUKE_HIT_STRIPPER1
417
      else
418
        sound DUKE_HIT_STRIPPER2
419
 
420
      killit
421
    }
422
    else
423
      ifp pfacing
424
        ifpdistl FROZENQUICKKICKDIST
425
          pkick
426
    break
427
  }
428
 
429
  ifhitweapon
430
  {
431
    ifdead
432
    {
433
      ifwasweapon GROWSPARK
434
      {
435
        cstat 0
436
        move 0
437
        sound ACTOR_GROWING
438
        action FEMGROW
439
        break
440
      }
441
      else ifwasweapon FREEZEBLAST
442
      {
443
        ifaction FEMSHRUNK
444
          break
445
 
446
          action FEMFROZEN1
447
 
448
        move 0
449
        spritepal 1
450
        strength 0
451
 
452
        sound SOMETHINGFROZE
453
 
454
        break
455
      }
456
 
457
      ifrnd 128
458
        sound DUKE_HIT_STRIPPER1
459
      else
460
        sound DUKE_HIT_STRIPPER2
461
 
462
      respawnhitag
463
      state standard_bjibs
464
      state random_wall_jibs
465
      spawn BLOODPOOL
466
 
467
        ifactor HALFBITCH
468
          money 3
469
      else
470
        ifactor SLUTASS
471
          money 3
472
 
473
 
474
        spritepal 6
475
        soundonce LADY_SCREAM
476
        ifactor NAKED1
477
	  debris SCRAP3 18
478
        else
479
          ifactor PODFEM1
480
	    debris SCRAP3 18
481
        killit
482
    }
483
    else
484
    {
485
      ifwasweapon SHRINKSPARK
486
      {
487
        sound ACTOR_SHRINKING
488
        move 0
489
        action FEMSHRUNK
490
        cstat 0
491
        break
492
      }
493
      else
494
        ifwasweapon GROWSPARK
495
          sound EXPANDERHIT
496
 
497
 
498
      sound SQUISH2
499
 
500
      guts JIBS6 1
501
    }
502
  }
503
 
504
 
505
 
506
  ifp pfacing
507
    ifpdistl 1280
508
      ifhitspace
509
  {
510
    tip
511
    ifrnd 128
512
      soundonce DUKE_TIP1
513
    else
514
      soundonce DUKE_TIP2
515
ifactor HALFBITCH
516
      action FEMHDANCE1
517
  }
518
ends
519
 
520
useractor notenemy HALFBITCH TOUGH
521
  state nwbabecode
522
enda
523
 
524
useractor notenemy SLUTASS TOUGH
525
  state nwbabecode
526
enda
527
 
528
state nwl3surprise
529
ifvare VOLUME 1
530
  {
531
    ifvare LEVEL 2
532
      {
533
        getactor[THISACTOR].sectnum temp
534
        switch temp
535
          case 220 case 221
536
            ifvarn musicchange 1
537
              {
538
                starttrack 12 // doom
539
                setvar musicchange 1
540
              }
541
          break
542
          case 563 case 564 case 565 case 566 case 567
543
            ifvarn musicchange 2
544
              {
545
                starttrack 13 // mario
546
                setvar musicchange 2
547
              }
548
          break
549
          case 192 case 193 case 194 case 195 case 196 case 197 case 198 case 237 case 238 case 239 case 240
550
          case 166 case 167 case 172 case 173 case 174 case 176 case 179
551
            ifvarn musicchange 0
552
              {
553
                starttrack 2 // level music
554
                setvar musicchange 0
555
              }
556
          break
557
        endswitch
558
      }
559
  }
560
ends
561
 
562
action ACOMMSPINNW   0  1  5  1  12
563
 
564
ai AICOMMSPINNW ACOMMSPINNW COMMGETVELS spin
565
 
566
state checkcommhitstate
567
 
568
  ifhitweapon
569
  {
570
    debris SCRAP3 5
571
    ifdead
572
    {
573
      ifwasweapon FREEZEBLAST
574
      {
575
        break
576
      }
577
      else
578
        ifwasweapon GROWSPARK
579
      {
580
        sound ACTOR_GROWING
581
        ai AICOMMGROW
582
        break
583
      }
584
 
585
      addkills 1
586
 
587
      ifwasweapon RADIUSEXPLOSION
588
      {
589
        debris SCRAP3 5
590
        sound SQUISH2
591
        killit
592
      }
593
      else
594
        ifwasweapon RPG
595
      {
596
        sound SQUISH2
597
        debris SCRAP3 5
598
        state standard_jibs
599
        killit
600
      }
601
 
602
      debris SCRAP3 100
603
      sound COMM_DYING
604
      ai AICOMMDYING
605
    }
606
    else
607
    {
608
      soundonce COMM_PAIN
609
      ifwasweapon SHRINKSPARK
610
      {
611
        sound ACTOR_SHRINKING
612
        ai AICOMMSHRUNK
613
      }
614
      else
615
        ifwasweapon GROWSPARK
616
          sound EXPANDERHIT
617
      else
618
        ifrnd 24
619
          ai AICOMMABOUTTOSHOOT
620
    }
621
  }
622
ends
623
 
624
actor COMMANDERSTAYPUT COMMANDERSTRENGTH
625
  cactor COMMANDER
626
  ai AICOMMABOUTTOSHOOT
627
enda
628
 
629
actor COMMANDER COMMANDERSTRENGTH
630
 
631
  state checksquished
632
 
633
  ifaction ACOMMFROZEN
634
  {
635
    fall
636
 
637
    ifcount THAWTIME
638
    {
639
      getlastpal
640
      ai AICOMMWAIT
641
    }
642
    else
643
      ifcount FROZENDRIPTIME
644
    {
645
      ifactioncount 26
646
      {
647
        spawn WATERDRIP
648
        resetactioncount
649
      }
650
    }
651
 
652
    ifhitweapon
653
    {
654
      ifwasweapon FREEZEBLAST
655
      {
656
        strength 0
657
        break
658
      }
659
      addkills 1
660
 
661
      ifrnd 84
662
        spawn BLOODPOOL
663
      lotsofglass 30
664
      sound GLASS_BREAKING
665
      killit
666
    }
667
    ifp pfacing
668
      ifpdistl FROZENQUICKKICKDIST
669
        pkick
670
    break
671
  }
672
  ifai 0
673
    ai AICOMMSHOOT
674
  else
675
    ifai AICOMMWAIT
676
  {
677
    ifcount 20
678
    {
679
      ifcansee
680
      {
681
        ifcanshoottarget
682
        {
683
          ifrnd 96
684
            ai AICOMMGET
685
          else
686
            ai AICOMMABOUTTOSHOOT
687
        }
688
      }
689
      else
690
        ai AICOMMGET
691
    }
692
  }
693
  else
694
    ifai AICOMMABOUTTOSHOOT
695
  {
696
    ifactioncount 2
697
    {
698
      ifcansee
699
        ai AICOMMSHOOT
700
      else
701
      {
702
        ai AICOMMGET
703
        break
704
      }
705
    }
706
    ifrnd 32 soundonce COMM_ATTACK
707
  }
708
  else
709
    ifai AICOMMSHOOT
710
  {
711
    ifcanshoottarget
712
    {
713
      ifcount 12
714
        ifrnd 16
715
          ai AICOMMWAIT
716
      ifactioncount 1
717
      {
718
        shoot FREEZEBLAST
719
        resetactioncount
720
      }
721
 
722
    }
723
    else
724
      ai AICOMMGET
725
  }
726
  else
727
    ifai AICOMMSHRUNK
728
  {
729
    ifcount SHRUNKDONECOUNT
730
      ai AICOMMGET
731
    else
732
      ifcount SHRUNKCOUNT
733
        sizeto 48 40
734
    else
735
      state genericshrunkcode
736
  }
737
  else
738
    ifai AICOMMGROW
739
      state genericgrowcode
740
  else
741
    ifai AICOMMGET
742
  {
743
    ifnotmoving
744
      ifrnd 4
745
        operate
746
    ifpdistl 1024
747
      ifp palive
748
    {
749
//       sound COMM_SPIN
750
      ai AICOMMSPINNW
751
      break
752
    }
753
 
754
    ifcansee
755
    {
756
      ifp phigher
757
        move COMMGETUPVELS getv geth faceplayer
758
      else
759
        move COMMGETVELS getv geth faceplayer
760
    }
761
    ifactioncount 8
762
      ifrnd 2
763
        ai AICOMMABOUTTOSHOOT
764
  }
765
  else
766
    ifai AICOMMSPINNW
767
  {
768
    soundonce COMM_SPIN
769
    ifcount 16
770
    {
771
      ifpdistl 1280
772
      {
773
        addphealth CAPTSPINNINGPLAYER
774
        sound DUKE_GRUNT
775
        palfrom 32
776
        16 resetcount
777
      }
778
      else
779
        ifpdistg 2300
780
          ai AICOMMWAIT
781
    }
782
    ifactioncount 52
783
      ai AICOMMWAIT
784
    ifnotmoving
785
      ifrnd 32
786
        operate
787
  }
788
 
789
  ifai AICOMMDYING
790
  {
791
    fall
792
    strength 0
793
 
794
    ifhitweapon
795
      ifwasweapon RADIUSEXPLOSION
796
    {
797
      sound SQUISH2
798
      spawn BLOODPOOL
799
      state standard_jibs
800
 
801
      killit
802
    }
803
 
804
    ifaction ACOMMDYING
805
      ifactioncount 8
806
    {
807
      iffloordistl 8
808
        sound THUD
809
      cstat 0
810
      action ACOMMDEAD
811
    }
812
  }
813
  else
814
  {
815
    ifrnd 2
816
      soundonce COMM_ROAM
817
    state checkcommhitstate
818
  }
819
enda
820
 
821
move TANKSTOPNW
822
 
823
useractor enemy TANK TANKSTRENGTH
824
    fall
825
 
826
//  sizeat 45 45
827
  ifaction 0
828
  {
829
    action ATANKWAIT
830
    cstat 257
831
    clipdist 100
832
  }
833
  else
834
    ifaction ATANKSPIN
835
  {
836
    soundonce TANK_ROAM
837
 
838
    ifactioncount 20
839
    {
840
      ifrnd 16
841
        ifcansee
842
          ifcanshoottarget
843
      {
844
        move TANKSTOPNW geth
845
        action ATANKSHOOTING
846
        stopsound TANK_ROAM
847
      }
848
    }
849
 
850
    ifrnd 16
851
      move TANKFORWARD seekplayer
852
  }
853
  else
854
    ifaction ATANKSHOOTING
855
  {
856
    ifactioncount 22
857
    {
858
      ifpdistg 8192
859
      {
860
        sound BOS1_ATTACK2
861
        shoot MORTER
862
      }
863
      resetcount
864
      move 0 action ATANKWAIT
865
    }
866
    else
867
      ifactioncount 2
868
    {
869
      ifcansee
870
      {
871
        ifpdistl 16384
872
        {
873
          ifrnd 128
874
          {
875
 
876
 
877
            sound PISTOL_FIRE
878
            shoot SHOTSPARK1
879
          }
880
        }
881
        else
882
          ifrnd 128
883
        {
884
          sound PRED_ATTACK
885
          shoot FIRELASER
886
        }
887
      }
888
      else
889
      {
890
        move TANKFORWARD seekplayer
891
        action ATANKSPIN
892
      }
893
    }
894
 
895
    ifrnd 16
896
    {
897
      stopsound TANK_ROAM
898
      move TANKSTOPNW faceplayerslow
899
    }
900
  }
901
  else
902
    ifaction ATANKWAIT
903
  {
904
    ifactioncount 32
905
    {
906
      move TANKFORWARD seekplayer
907
      action ATANKSPIN
908
    }
909
  }
910
  else
911
    ifaction ATANKDEAD
912
  {
913
    addkills 1
914
    hitradius 6144 TOUGH TOUGH TOUGH TOUGH
915
    sound LASERTRIP_EXPLODE
916
    debris SCRAP1 15
917
    spawn EXPLOSION2
918
    ifrnd 128 spawn SNOWMAN
919
    killit
920
  }
921
 
922
  ifhitweapon
923
  {
924
    ifdead
925
      action ATANKDEAD
926
    else
927
    {
928
      debris SCRAP1 1
929
      ifaction ATANKSHOOTING break
930
 
931
      ifrnd 192
932
      {
933
        move TANKSTOPNW geth
934
        action ATANKSHOOTING
935
        stopsound TANK_ROAM
936
      }
937
    }
938
  }
939
 
940
enda
941
 
942
 
943
include NWActor.con
944
include NWSnow.con
945
 
946
// -----------------------------------------------------------------------------
947
 
948
onevent EVENT_GAME
949
  ifactor APLAYER state nwl3surprise
950
/*
951
  ifactor MONEY
952
    {
953
      setactor[THISACTOR].mdflags 16
954
      getactor[THISACTOR].owner owner
955
      switch owner
956
      case SNOW case SNOWFLAKE case SNOWMAKER case SNOWMAKERNOMOVE
957
        getactor[THISACTOR].x x
958
        getactor[THISACTOR].y y
959
        getactor[THISACTOR].z z
960
 
961
        updatesectorz x y z temp
962
        ifvarn temp -1 getflorzofslope temp x y temp2 else killit
963
 
964
        ifvarvare z temp2 killit
965
      break
966
      endswitch
967
    }
968
*/
969
endevent
970
 
971
onevent EVENT_ANIMATESPRITES // This is a hell of a mess because putting get/settspr in states throws warnings, and I don't want that.
972
 getactor[THISACTOR].picnum picnum
973
 getactor[THISACTOR].owner owner
974
 
975
 ifvare picnum DOORSHOCK
976
   {
977
     ifspritepal 30 settspr[THISACTOR].tsprpicnum 3656
978
     ifvare VOLUME 1 ifvare LEVEL 2 settspr[THISACTOR].tsprpicnum 3656
979
     break
980
   }
981
 ifvare picnum SNOWFLAKE
982
   {
983
     settspr[THISACTOR].tsprpicnum SNOW
984
     settspr[THISACTOR].tsprxrepeat 4
985
     settspr[THISACTOR].tspryrepeat 4
986
     break
987
   }
988
/*
989
 ifvare picnum MONEY
990
   {
991
      switch owner
992
      case SNOW case SNOWFLAKE case SNOWMAKER case SNOWMAKERNOMOVE
993
        settspr[THISACTOR].tsprpicnum SNOW
994
      break
995
      endswitch
996
   }
997
*/
998
 getplayervar[THISACTOR].skin temp
999
 ifvare temp 1
1000
   {
1001
     getplayer[THISACTOR].i temp2
1002
     gettspr[temp2].tsprpicnum temp3
1003
     ifvarl temp3 1544 addvar temp3 4096
1004
     settspr[temp2].tsprpicnum temp3
1005
     settspr[temp2].tsprpal 10
1006
 
1007
     ifvare picnum DUKETORSO
1008
       {
1009
         getactor[owner].picnum temp2
1010
         ifvare temp2 APLAYER
1011
           {
1012
             gettspr[THISACTOR].tsprpicnum temp3
1013
             addvar temp3 2456
1014
             settspr[THISACTOR].tsprpicnum temp3
1015
             break
1016
           }
1017
       }
1018
     ifvare picnum DUKEGUN
1019
       {
1020
         getactor[owner].picnum temp2
1021
         ifvare temp2 APLAYER
1022
           {
1023
             gettspr[THISACTOR].tsprpicnum temp3
1024
             addvar temp3 2456
1025
             settspr[THISACTOR].tsprpicnum temp3
1026
             break
1027
           }
1028
       }
1029
     ifvare picnum DUKELEG
1030
       {
1031
         getactor[owner].picnum temp2
1032
         ifvare temp2 APLAYER settspr[THISACTOR].tsprpal 30
1033
         break
1034
       }
1035
   }
1036
 
1037
 ifvare picnum DUKETORSO
1038
   {
1039
     getactor[owner].picnum temp2
1040
     ifvare temp2 SOBBOTWALK
1041
       {
1042
         gettspr[THISACTOR].tsprpicnum temp3
1043
         addvar temp3 2456
1044
         settspr[THISACTOR].tsprpicnum temp3
1045
         break
1046
       }
1047
     ifvare temp2 SOBBOTFLY
1048
       {
1049
         gettspr[THISACTOR].tsprpicnum temp3
1050
         addvar temp3 2456
1051
         settspr[THISACTOR].tsprpicnum temp3
1052
         break
1053
       }
1054
   }
1055
 ifvare picnum DUKEGUN
1056
   {
1057
     getactor[owner].picnum temp2
1058
     ifvare temp2 SOBBOTWALK
1059
       {
1060
         gettspr[THISACTOR].tsprpicnum temp3
1061
         addvar temp3 2456
1062
         settspr[THISACTOR].tsprpicnum temp3
1063
         break
1064
       }
1065
     ifvare temp2 SOBBOTFLY
1066
       {
1067
         gettspr[THISACTOR].tsprpicnum temp3
1068
         addvar temp3 2456
1069
         settspr[THISACTOR].tsprpicnum temp3
1070
         break
1071
       }
1072
   }
1073
 ifvare picnum DUKELEG
1074
   {
1075
     getactor[owner].picnum temp2
1076
     ifvare temp2 SOBBOTWALK settspr[THISACTOR].tsprpal 30
1077
     ifvare temp2 SOBBOTFLY settspr[THISACTOR].tsprpal 30
1078
     break
1079
   }
1080
 ifvare picnum APLAYER
1081
   {
1082
     gettspr[THISACTOR].tsprpicnum temp
1083
     switch temp
1084
      case 1470 case 1471 case 1472 case 1473 case 1474
1085
       subvar temp 5
1086
       settspr[THISACTOR].tsprpicnum temp
1087
      break
1088
     endswitch
1089
   }
1090
endevent
1091
 
1092
 
1093
 
1094
 
1095
useractor notenemy NWEFFECTOR 0
1096
 cstat 32768
1097
 // sizeat 1 1
1098
 
1099
 ifspritepal 31
1100
   {
1101
      getplayer[THISACTOR].cursectnum temp3
1102
      switch temp3
1103
        case 60 case 61 case 62 case 63
1104
        case 86 case 87
1105
        case 299 case 300 case 301 case 302 case 303 case 304 case 305 case 306 case 307 case 308 case 309
1106
        case 310 case 311 case 312 case 313 case 314 case 315 case 316 case 317
1107
         soundonce PHONE_RING
1108
        break
1109
      endswitch
1110
 
1111
      ifpdistl RETRIEVEDISTANCE
1112
      ifp pfacing
1113
      ifhitspace
1114
      ifvare temp2 0
1115
        {
1116
          setvar temp 0
1117
          setvar temp2 1
1118
        }
1119
 
1120
      ifvare temp2 1
1121
        {
1122
          addvar temp 1
1123
 
1124
          stopsound PHONE_RING
1125
          ifvare temp 1 sound PHONE_PICKUP
1126
     else ifvare temp 39
1127
            {
1128
              setvar tempb 0
1129
              randvar tempb 3
1130
              switch tempb
1131
               case 0 sound LOWANG1 break
1132
               case 1 sound LOWANG2 break
1133
               case 2 sound LOWANG3 break
1134
               case 3 sound LOWANG4 break
1135
              endswitch
1136
            }
1137
     else ifvare temp 195 sound PHONE_HANGUP
1138
     else ifvare temp 247
1139
            {
1140
              setvar temp2 0
1141
              setvar temp 0
1142
            }
1143
        }
1144
   }
1145
enda
1146
 
1147
useractor notenemy 3831 0
1148
// cstat 32768
1149
 sizeat 12 13
1150
 getactor[THISACTOR].sectnum temp
1151
 getplayer[THISACTOR].cursectnum temp2
1152
 ifvarvare temp temp2
1153
   {
1154
     setuserdef[THISACTOR].volume_number 1
1155
     endofgame 13
1156
   }
1157
enda
1158
 
1159
action WOODENHORSE2FRAME  0   1   5
1160
action WOODEN2FALLFRAME  -2738  1   5
1161
useractor notenemy WOODENHORSE2 WEAK WOODENHORSE2FRAME
1162
  fall
1163
  ifhitweapon
1164
  {
1165
    ifdead
1166
    {
1167
      debris SCRAP1 4
1168
      debris SCRAP2 3
1169
      killit
1170
    }
1171
    else
1172
      action WOODEN2FALLFRAME
1173
  }
1174
enda
1175
 
1176
useractor notenemy NWSTEAM 0
1177
  ifpdistl 6144
1178
    soundonce STEAM_HISSING
1179
enda
1180
 
1181
define title_x1 73
1182
define title_x2 306
1183
define title_y 194
1184
define title_zoom 32768
1185
 
1186
onevent EVENT_DISPLAYMENU
1187
//  getplayer[THISACTOR].gm temp
1188
//  ifvarand temp 4 nullop else
1189
// {
1190
  rotatesprite title_x1 title_y title_zoom 0 3838 0 0 0 0 0 xdim ydim
1191
  rotatesprite title_x2 title_y title_zoom 0 3839 0 0 0 0 0 xdim ydim
1192
// }
1193
endevent
1194
 
1195
/*
1196
onevent EVENT_DISPLAYTITLE
1197
  rotatesprite title_x1 title_y title_zoom 0 3838 0 0 0 0 0 xdim ydim
1198
  rotatesprite title_x2 title_y title_zoom 0 3839 0 0 0 0 0 xdim ydim
1199
endevent
1200
*/
1201