-
Notifications
You must be signed in to change notification settings - Fork 196
/
triggers.h
795 lines (601 loc) · 20.3 KB
/
triggers.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
/*
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at
* your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* In addition, as a special exception, the author gives permission to
* link the code of this program with the Half-Life Game Engine ("HL
* Engine") and Modified Game Libraries ("MODs") developed by Valve,
* L.L.C ("Valve"). You must obey the GNU General Public License in all
* respects for all of the code used other than the HL Engine and MODs
* from Valve. If you modify this file, you may extend this exception
* to your version of the file, but you are not obligated to do so. If
* you do not wish to do so, delete this exception statement from your
* version.
*
*/
#ifndef TRIGGERS_H
#define TRIGGERS_H
#ifdef _WIN32
#pragma once
#endif
#define GRENADETYPE_SMOKE 1
#define GRENADETYPE_FLASH 2
#define MAX_ITEM_COUNTS 32
#define MAX_ENTITY 512 // We can only ever move 512 entities across a transition
// triggers
#define SF_TRIGGER_ALLOWMONSTERS 1 // monsters allowed to fire this trigger
#define SF_TRIGGER_NOCLIENTS 2 // players not allowed to fire this trigger
#define SF_TRIGGER_PUSHABLES 4 // only pushables can fire this trigger
#define SF_TRIGGER_PUSH_START_OFF 2 // spawnflag that makes trigger_push spawn turned OFF
#define SF_TRIGGER_HURT_TARGETONCE 1 // Only fire hurt target once
#define SF_TRIGGER_HURT_START_OFF 2 // spawnflag that makes trigger_push spawn turned OFF
#define SF_TRIGGER_HURT_NO_CLIENTS 8 // spawnflag that makes trigger_push spawn turned OFF
#define SF_TRIGGER_HURT_CLIENTONLYFIRE 16 // trigger hurt will only fire its target if it is hurting a client
#define SF_TRIGGER_HURT_CLIENTONLYTOUCH 32 // only clients may touch this trigger.
#define SF_AUTO_FIREONCE 0x0001
#define SF_RELAY_FIREONCE 0x0001
#define SF_ENDSECTION_USEONLY 0x0001
#define SF_MULTIMAN_CLONE 0x80000000
#define SF_MULTIMAN_THREAD 0x00000001
#define SF_CHANGELEVEL_USEONLY 0x0002
#define SF_CAMERA_PLAYER_POSITION 1
#define SF_CAMERA_PLAYER_TARGET 2
#define SF_CAMERA_PLAYER_TAKECONTROL 4
// Flags to indicate masking off various render parameters that are normally copied to the targets
#define SF_RENDER_MASKFX (1 << 0)
#define SF_RENDER_MASKAMT (1 << 1)
#define SF_RENDER_MASKMODE (1 << 2)
#define SF_RENDER_MASKCOLOR (1 << 3)
class CFrictionModifier: public CBaseEntity
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual int ObjectCaps() { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
#endif // HOOK_GAMEDLL
public:
void EXPORT ChangeFriction(CBaseEntity *pOther);
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
float m_frictionFraction;
};
// This trigger will fire when the level spawns (or respawns if not fire once)
// It will check a global state before firing. It supports delay and killtargets
/* <19e39c> ../cstrike/dlls/triggers.cpp:108 */
class CAutoTrigger: public CBaseDelay
{
public:
virtual void Spawn();
virtual void Precache();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual int ObjectCaps() { return (CBaseDelay::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
virtual void Think();
#ifdef HOOK_GAMEDLL
void Spawn_();
void Precache_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
void Think_();
#endif // HOOK_GAMEDLL
public:
static TYPEDESCRIPTION IMPL(m_SaveData)[2];
int m_globalstate;
USE_TYPE triggerType;
};
/* <19e3ed> ../cstrike/dlls/triggers.cpp:191 */
class CTriggerRelay: public CBaseDelay
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual int ObjectCaps() { return (CBaseDelay::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#endif // HOOK_GAMEDLL
public:
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
USE_TYPE triggerType;
};
// The Multimanager Entity - when fired, will fire up to 16 targets
// at specified times.
// FLAG: THREAD (create clones when triggered)
// FLAG: CLONE (this is a clone for a threaded execution)
/* <19e4d6> ../cstrike/dlls/triggers.cpp:264 */
class CMultiManager: public CBaseToggle
{
public:
virtual void Spawn();
virtual void Restart();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual int ObjectCaps() { return (CBaseToggle::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
virtual BOOL HasTarget(string_t targetname);
#ifdef HOOK_GAMEDLL
void Spawn_();
void Restart_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
BOOL HasTarget_(string_t targetname);
#endif // HOOK_GAMEDLL
public:
void EXPORT ManagerThink();
void EXPORT ManagerUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
private:
/* <19dfe1> ../cstrike/dlls/triggers.cpp:293 */
BOOL IsClone()
{
if (pev->spawnflags & SF_MULTIMAN_CLONE)
{
return TRUE;
}
return FALSE;
}
/* <19e4f3> ../cstrike/dlls/triggers.cpp:294 */
BOOL ShouldClone()
{
if (IsClone())
{
return FALSE;
}
if (pev->spawnflags & SF_MULTIMAN_THREAD)
{
return TRUE;
}
return FALSE;
}
CMultiManager *Clone();
public:
static TYPEDESCRIPTION IMPL(m_SaveData)[5];
int m_cTargets;
int m_index;
float m_startTime;
int m_iTargetName[ MAX_MULTI_TARGETS ];
float m_flTargetDelay[ MAX_MULTI_TARGETS ];
};
// Render parameters trigger
//
// This entity will copy its render parameters (renderfx, rendermode, rendercolor, renderamt)
// to its targets when triggered.
/* <19e50c> ../cstrike/dlls/triggers.cpp:525 */
class CRenderFxManager: public CBaseEntity
{
public:
virtual void Spawn();
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#ifdef HOOK_GAMEDLL
void Spawn_();
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#endif // HOOK_GAMEDLL
};
/* <19e55f> ../cstrike/dlls/triggers.cpp:566 */
class CBaseTrigger: public CBaseToggle
{
public:
virtual void KeyValue(KeyValueData *pkvd);
virtual int ObjectCaps() { return (CBaseToggle::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
#ifdef HOOK_GAMEDLL
void KeyValue_(KeyValueData *pkvd);
#endif // HOOK_GAMEDLL
public:
void EXPORT TeleportTouch(CBaseEntity *pOther);
void EXPORT MultiTouch(CBaseEntity *pOther);
void EXPORT HurtTouch(CBaseEntity *pOther);
NOXREF void EXPORT CDAudioTouch(CBaseEntity *pOther);
void ActivateMultiTrigger(CBaseEntity *pActivator);
void EXPORT MultiWaitOver();
void EXPORT CounterUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
void EXPORT ToggleUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
void InitTrigger();
};
// trigger_hurt - hurts anything that touches it. if the trigger has a targetname, firing it will toggle state
// int gfToggleState = 0; // used to determine when all radiation trigger hurts have called 'RadiationThink'
/* <19e5b2> ../cstrike/dlls/triggers.cpp:629 */
class CTriggerHurt: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
void EXPORT RadiationThink();
};
/* <19e60a> ../cstrike/dlls/triggers.cpp:641 */
class CTriggerMonsterJump: public CBaseTrigger
{
public:
virtual void Spawn();
virtual void Think();
virtual void Touch(CBaseEntity *pOther);
#ifdef HOOK_GAMEDLL
void Spawn_();
void Think_();
void Touch_(CBaseEntity *pOther);
#endif // HOOK_GAMEDLL
};
// trigger_cdaudio - starts/stops cd audio tracks
/* <19e65d> ../cstrike/dlls/triggers.cpp:705 */
class CTriggerCDAudio: public CBaseTrigger
{
public:
virtual void Spawn();
virtual void Touch(CBaseEntity *pOther);
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#ifdef HOOK_GAMEDLL
void Spawn_();
void Touch_(CBaseEntity *pOther);
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#endif // HOOK_GAMEDLL
public:
void PlayTrack();
};
// This plays a CD track when fired or when the player enters it's radius
/* <19e6d2> ../cstrike/dlls/triggers.cpp:783 */
class CTargetCDAudio: public CPointEntity
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual void Think();
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
void Think_();
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#endif // HOOK_GAMEDLL
public:
void Play();
};
// QUAKED trigger_multiple (.5 .5 .5) ? notouch
// Variable sized repeatable trigger. Must be targeted at one or more entities.
// If "health" is set, the trigger must be killed to activate each time.
// If "delay" is set, the trigger waits some time after activating before firing.
// "wait" : Seconds between triggerings. (.2 default)
// If notouch is set, the trigger is only fired by other entities, not by touching.
// NOTOUCH has been obsoleted by trigger_relay!
// sounds
// 1) secret
// 2) beep beep
// 3) large switch
// 4)
// NEW
// if a trigger has a NETNAME, that NETNAME will become the TARGET of the triggered object.
/* <19e725> ../cstrike/dlls/triggers.cpp:1080 */
class CTriggerMultiple: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
};
// QUAKED trigger_once (.5 .5 .5) ? notouch
// Variable sized trigger. Triggers once, then removes itself. You must set the key "target" to the name of another object in the level that has a matching
// "targetname". If "health" is set, the trigger must be killed to activate.
// If notouch is set, the trigger is only fired by other entities, not by touching.
// if "killtarget" is set, any objects that have a matching "target" will be removed when the trigger is fired.
// if "angle" is set, the trigger will only fire when someone is facing the direction of the angle. Use "360" for an angle of 0.
// sounds
// 1) secret
// 2) beep beep
// 3) large switch
// 4)
/* <19e77d> ../cstrike/dlls/triggers.cpp:1129 */
class CTriggerOnce: public CTriggerMultiple
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
};
// QUAKED trigger_counter (.5 .5 .5) ? nomessage
// Acts as an intermediary for an action that takes multiple inputs.
// If nomessage is not set, it will print "1 more.. " etc when triggered and
// "sequence complete" when finished. After the counter has been triggered "cTriggersLeft"
// times (default 2), it will fire all of it's targets and remove itself.
/* <19e7d5> ../cstrike/dlls/triggers.cpp:1273 */
class CTriggerCounter: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
};
// Derive from point entity so this doesn't move across levels
/* <19e82d> ../cstrike/dlls/triggers.cpp:1293 */
class CTriggerVolume: public CPointEntity
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
};
// Fires a target after level transition and then dies
/* <19e885> ../cstrike/dlls/triggers.cpp:1313 */
class CFireAndDie: public CBaseDelay
{
public:
virtual void Spawn();
virtual void Precache();
virtual int ObjectCaps() { return (CBaseDelay::ObjectCaps() | FCAP_FORCE_TRANSITION); } // Always go across transitions
virtual void Think();
#ifdef HOOK_GAMEDLL
void Spawn_();
void Precache_();
void Think_();
#endif // HOOK_GAMEDLL
};
// QUAKED trigger_changelevel (0.5 0.5 0.5) ? NO_INTERMISSION
// When the player touches this, he gets sent to the map listed in the "map" variable. Unless the NO_INTERMISSION flag is set, the view will go to the info_intermission spot and display stats.
/* <19e906> ../cstrike/dlls/triggers.cpp:1345 */
class CChangeLevel: public CBaseTrigger
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
#endif // HOOK_GAMEDLL
public:
void EXPORT UseChangeLevel(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
NOXREF void EXPORT TriggerChangeLevel();
void EXPORT ExecuteChangeLevel();
void EXPORT TouchChangeLevel(CBaseEntity *pOther);
void ChangeLevelNow(CBaseEntity *pActivator);
static edict_t *FindLandmark(const char *pLandmarkName);
static int ChangeList(LEVELLIST *pLevelList, int maxList);
static int AddTransitionToList(LEVELLIST *pLevelList, int listCount, const char *pMapName, const char *pLandmarkName, edict_t *pentLandmark);
static int InTransitionVolume(CBaseEntity *pEntity, char *pVolumeName);
public:
static TYPEDESCRIPTION IMPL(m_SaveData)[4];
char m_szMapName[ cchMapNameMost ]; // trigger_changelevel only: next map
char m_szLandmarkName[ cchMapNameMost ]; // trigger_changelevel only: landmark on next map
int m_changeTarget;
float m_changeTargetDelay;
};
/* <19e99d> ../cstrike/dlls/triggers.cpp:1753 */
class CLadder: public CBaseTrigger
{
public:
virtual void Spawn();
virtual void Precache();
virtual void KeyValue(KeyValueData *pkvd);
#ifdef HOOK_GAMEDLL
void Spawn_();
void Precache_();
void KeyValue_(KeyValueData *pkvd);
#endif // HOOK_GAMEDLL
};
/* <19e9f5> ../cstrike/dlls/triggers.cpp:1797 */
class CTriggerPush: public CBaseTrigger
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual void Touch(CBaseEntity *pOther);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
void Touch_(CBaseEntity *pOther);
#endif // HOOK_GAMEDLL
};
/* <19ea4d> ../cstrike/dlls/triggers.cpp:1935 */
class CTriggerTeleport: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
};
/* <19eadb> ../cstrike/dlls/triggers.cpp:1962 */
class CBuyZone: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
void EXPORT BuyTouch(CBaseEntity *pOther);
};
/* <19eb2e> ../cstrike/dlls/triggers.cpp:2007 */
class CBombTarget: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
public:
void EXPORT BombTargetTouch(CBaseEntity *pOther);
void EXPORT BombTargetUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
};
/* <19eb81> ../cstrike/dlls/triggers.cpp:2056 */
class CHostageRescue: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
public:
void EXPORT HostageRescueTouch(CBaseEntity *pOther);
};
/* <19ebd9> ../cstrike/dlls/triggers.cpp:2098 */
class CEscapeZone: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
void EXPORT EscapeTouch(CBaseEntity *pOther);
};
/* <19ec2c> ../cstrike/dlls/triggers.cpp:2155 */
class CVIP_SafetyZone: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
void EXPORT VIP_SafetyTouch(CBaseEntity *pOther);
};
/* <19ec7f> ../cstrike/dlls/triggers.cpp:2198 */
class CTriggerSave: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
void EXPORT SaveTouch(CBaseEntity *pOther);
};
/* <19ecd2> ../cstrike/dlls/triggers.cpp:2234 */
class CTriggerEndSection: public CBaseTrigger
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
#endif // HOOK_GAMEDLL
public:
void EXPORT EndSectionTouch(CBaseEntity *pOther);
void EXPORT EndSectionUse(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
};
/* <19ed25> ../cstrike/dlls/triggers.cpp:2305 */
class CTriggerGravity: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
void EXPORT GravityTouch(CBaseEntity *pOther);
};
// this is a really bad idea.
/* <19ed7d> ../cstrike/dlls/triggers.cpp:2335 */
class CTriggerChangeTarget: public CBaseDelay
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual int ObjectCaps() { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#endif // HOOK_GAMEDLL
public:
static TYPEDESCRIPTION IMPL(m_SaveData)[1];
private:
int m_iszNewTarget;
};
/* <19edd0> ../cstrike/dlls/triggers.cpp:2391 */
class CTriggerCamera: public CBaseDelay
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
virtual int Save(CSave &save);
virtual int Restore(CRestore &restore);
virtual int ObjectCaps() { return (CBaseEntity::ObjectCaps() & ~FCAP_ACROSS_TRANSITION); }
virtual void Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
int Save_(CSave &save);
int Restore_(CRestore &restore);
void Use_(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value);
#endif // HOOK_GAMEDLL
public:
void EXPORT FollowTarget();
void Move();
static TYPEDESCRIPTION IMPL(m_SaveData)[13];
EHANDLE m_hPlayer;
EHANDLE m_hTarget;
CBaseEntity *m_pentPath;
int m_sPath;
float m_flWait;
float m_flReturnTime;
float m_flStopTime;
float m_moveDistance;
float m_targetSpeed;
float m_initialSpeed;
float m_acceleration;
float m_deceleration;
int m_state;
};
/* <19ee23> ../cstrike/dlls/triggers.cpp:2693 */
class CWeather: public CBaseTrigger
{
public:
virtual void Spawn();
#ifdef HOOK_GAMEDLL
void Spawn_();
#endif // HOOK_GAMEDLL
};
/* <1a5b85> ../cstrike/dlls/triggers.cpp:2710 */
class CClientFog: public CBaseEntity
{
public:
virtual void Spawn();
virtual void KeyValue(KeyValueData *pkvd);
#ifdef HOOK_GAMEDLL
void Spawn_();
void KeyValue_(KeyValueData *pkvd);
#endif // HOOK_GAMEDLL
public:
int m_iStartDist;
int m_iEndDist;
float m_fDensity;
};
void PlayCDTrack(int iTrack);
int BuildChangeList(LEVELLIST * pLevelList, int maxList);
NOXREF void NextLevel();
#endif // TRIGGERS_H