trigger_relay: Set m_iValue so that multisources will work properly that get targetted by them
trigger_auto: Delay the trigger of them in singleplayer until 1 player has joined Misc cleanups. The 'Janitor Simulator' on TWHL should work now.
This commit is contained in:
parent
33295ff409
commit
2d911109cc
|
@ -22,8 +22,9 @@ entity, oneMinusEntity, fromVertex, and lightingDiffuse.
|
||||||
|
|
||||||
Follow this up with a vector of the color that you'd like the vertex
|
Follow this up with a vector of the color that you'd like the vertex
|
||||||
colors to be set as. An example for green would be:
|
colors to be set as. An example for green would be:
|
||||||
|
```
|
||||||
` rgbGen const 0.0 1.0 0.0`
|
rgbGen const 0.0 1.0 0.0
|
||||||
|
```
|
||||||
|
|
||||||
#### identityLighting {#identitylighting}
|
#### identityLighting {#identitylighting}
|
||||||
|
|
||||||
|
|
|
@ -31,22 +31,23 @@ clouds. This has not be tested in a long time, so it probably doesn't
|
||||||
actually work. Set to "-" to ignore.
|
actually work. Set to "-" to ignore.
|
||||||
|
|
||||||
### Example Sky Material {#example_sky_material}
|
### Example Sky Material {#example_sky_material}
|
||||||
|
```
|
||||||
` // Vera Visions Material`
|
// Vera Visions Material
|
||||||
` {`
|
{
|
||||||
` qer_editorImage textures/skies/dune.tga`
|
qer_editorImage textures/skies/dune.tga
|
||||||
` skyParms textures/skies/dune/bg 256 -`
|
skyParms textures/skies/dune/bg 256 -
|
||||||
` noPicMip`
|
noPicMip
|
||||||
` noMipmaps`
|
noMipmaps
|
||||||
` `
|
|
||||||
` surfaceParm sky`
|
surfaceParm sky
|
||||||
` surfaceParm noimpact`
|
surfaceParm noimpact
|
||||||
` surfaceParm nolightmap`
|
surfaceParm nolightmap
|
||||||
` surfaceParm nodlight`
|
surfaceParm nodlight
|
||||||
` {`
|
{
|
||||||
` program skybox`
|
program skybox
|
||||||
` map $cube:textures/skies/dune/bg`
|
map $cube:textures/skies/dune/bg
|
||||||
` map textures/skies/clouds/dunecloud.tga`
|
map textures/skies/clouds/dunecloud.tga
|
||||||
` map textures/skies/clouds/dunecloud_layer.tga`
|
map textures/skies/clouds/dunecloud_layer.tga
|
||||||
` }`
|
}
|
||||||
` }`
|
}
|
||||||
|
```
|
|
@ -21,8 +21,10 @@ precision, and that can disturb other operations.
|
||||||
Texture coordinates are modified in the order in which **tcMods** are
|
Texture coordinates are modified in the order in which **tcMods** are
|
||||||
specified. In otherwords, if you see:
|
specified. In otherwords, if you see:
|
||||||
|
|
||||||
` tcMod scale 0.5 0.5`
|
```
|
||||||
` tcMod scroll 1 1`
|
tcMod scale 0.5 0.5
|
||||||
|
tcMod scroll 1 1
|
||||||
|
```
|
||||||
|
|
||||||
Then the texture coordinates will be **scaled then**scrolled'''.
|
Then the texture coordinates will be **scaled then**scrolled'''.
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
2
Doxyfile
2
Doxyfile
|
@ -1230,7 +1230,7 @@ HTML_FOOTER =
|
||||||
# obsolete.
|
# obsolete.
|
||||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||||
|
|
||||||
HTML_STYLESHEET =
|
HTML_STYLESHEET = Documentation/style.css
|
||||||
|
|
||||||
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||||
# cascading style sheets that are included after the standard style sheets
|
# cascading style sheets that are included after the standard style sheets
|
||||||
|
|
|
@ -147,7 +147,7 @@ CMD_ListModels(void)
|
||||||
int i = 0i;
|
int i = 0i;
|
||||||
int actual_count = 0i;
|
int actual_count = 0i;
|
||||||
|
|
||||||
for (int i = -4096; i < 4096; i++) {
|
for (i = -4096; i < 4096; i++) {
|
||||||
tmp = modelnameforindex(i);
|
tmp = modelnameforindex(i);
|
||||||
|
|
||||||
if (strlen(tmp) > 1) {
|
if (strlen(tmp) > 1) {
|
||||||
|
@ -168,7 +168,7 @@ CMD_ListSounds(void)
|
||||||
float length;
|
float length;
|
||||||
float total_length = 0.0f;
|
float total_length = 0.0f;
|
||||||
|
|
||||||
for (int i = 0; i < 4096; i++) {
|
for (i = 0; i < 4096; i++) {
|
||||||
tmp = soundnameforindex(i);
|
tmp = soundnameforindex(i);
|
||||||
length = soundlength(tmp);
|
length = soundlength(tmp);
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ CMD_ListParticles(void)
|
||||||
int i = 0i;
|
int i = 0i;
|
||||||
int actual_count = 0i;
|
int actual_count = 0i;
|
||||||
|
|
||||||
for (int i = -4096; i < 4096; i++) {
|
for (i = -4096; i < 4096; i++) {
|
||||||
tmp = particleeffectquery(i, 0);
|
tmp = particleeffectquery(i, 0);
|
||||||
|
|
||||||
if (strlen(tmp) > 1) {
|
if (strlen(tmp) > 1) {
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
void button_target(void);
|
void button_target(void);
|
||||||
|
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity,triggermode_t);
|
||||||
virtual void Damage(void);
|
virtual void Damage(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ button_target::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
button_target::Trigger(entity act, int status)
|
button_target::Trigger(entity act, triggermode_t status)
|
||||||
{
|
{
|
||||||
/* make unusable */
|
/* make unusable */
|
||||||
PlayerUse = __NULL__;
|
PlayerUse = __NULL__;
|
||||||
|
|
|
@ -41,7 +41,6 @@ public:
|
||||||
|
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Pain(void);
|
virtual void Pain(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_iUses;
|
int m_iUses;
|
||||||
|
@ -140,7 +140,7 @@ env_beverage::Spawned(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_beverage::Trigger(entity act, int unused)
|
env_beverage::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
if (m_bReady == false || m_iUses <= 0) {
|
if (m_bReady == false || m_iUses <= 0) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ env_explosion::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_explosion::Trigger(entity act, int state)
|
env_explosion::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
FX_Explosion(origin);
|
FX_Explosion(origin);
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ env_fade::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_fade::Trigger(entity eAct, int iState)
|
env_fade::Trigger(entity eAct, triggermode_t iState)
|
||||||
{
|
{
|
||||||
/* Half-Life ignores states entirely for env_fade's being triggered */
|
/* Half-Life ignores states entirely for env_fade's being triggered */
|
||||||
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual int GlobalPresent(string);
|
virtual int GlobalPresent(string);
|
||||||
virtual void AddNewGlobal(string,globalstate_t);
|
virtual void AddNewGlobal(string,globalstate_t);
|
||||||
|
@ -119,7 +119,7 @@ env_global::Spawned(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_global::Trigger(entity act, int state)
|
env_global::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
globalstate_t iOldValue = GetGlobalValue(m_strGlobalState);
|
globalstate_t iOldValue = GetGlobalValue(m_strGlobalState);
|
||||||
globalstate_t newValue = 0;
|
globalstate_t newValue = 0;
|
||||||
|
|
|
@ -51,7 +51,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ env_hudhint::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_hudhint::Trigger(entity act, int state)
|
env_hudhint::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
env_hudhint_send(act, m_strMessage, spawnflags);
|
env_hudhint_send(act, m_strMessage, spawnflags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
|
|
||||||
virtual void Play(entity,int);
|
virtual void Play(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ env_message::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_message::Play(entity act, int state)
|
env_message::Play(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||||
WriteByte(MSG_MULTICAST, EV_MESSAGE);
|
WriteByte(MSG_MULTICAST, EV_MESSAGE);
|
||||||
|
|
|
@ -81,7 +81,7 @@ env_render:NSRenderableEntity
|
||||||
public:
|
public:
|
||||||
void env_render(void);
|
void env_render(void);
|
||||||
|
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ env_render::env_render(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_render::Trigger(entity act, int state)
|
env_render::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
for (entity e = world;
|
for (entity e = world;
|
||||||
(e = find(e, ::targetname, target));) {
|
(e = find(e, ::targetname, target));) {
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ env_shake::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_shake::Trigger(entity act, int state)
|
env_shake::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
Client_ShakeOnce(origin, m_flRadius, m_flDuration, m_flFrequency, m_flAmplitude);
|
Client_ShakeOnce(origin, m_flRadius, m_flDuration, m_flFrequency, m_flAmplitude);
|
||||||
}
|
}
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void ShootGib(void);
|
virtual void ShootGib(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -213,7 +213,7 @@ env_shooter::ShootGib(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_shooter::Trigger(entity act, int state)
|
env_shooter::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -60,7 +60,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void CreateSpark(void);
|
virtual void CreateSpark(void);
|
||||||
virtual void TimedSpark(void);
|
virtual void TimedSpark(void);
|
||||||
|
|
||||||
|
@ -124,7 +124,7 @@ env_spark::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_spark::Trigger(entity act, int state)
|
env_spark::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (!HasSpawnFlags(EVSPARK_TOGGLE)) {
|
if (!HasSpawnFlags(EVSPARK_TOGGLE)) {
|
||||||
CreateSpark();
|
CreateSpark();
|
||||||
|
|
|
@ -43,7 +43,7 @@ public:
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Input(entity,string,string);
|
virtual void Input(entity,string,string);
|
||||||
|
|
||||||
virtual void PortalOpen(void);
|
virtual void PortalOpen(void);
|
||||||
|
@ -86,7 +86,7 @@ func_areaportal::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_areaportal::Trigger(entity act, int state)
|
func_areaportal::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (state == TRIG_OFF) {
|
if (state == TRIG_OFF) {
|
||||||
PortalClose();
|
PortalClose();
|
||||||
|
|
|
@ -139,7 +139,7 @@ public:
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Pain(void);
|
virtual void Pain(void);
|
||||||
virtual void Death(void);
|
virtual void Death(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void Explode(void);
|
virtual void Explode(void);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
|
@ -355,7 +355,7 @@ func_breakable::Death(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_breakable::Trigger(entity act, int state)
|
func_breakable::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetHealth() > 0)
|
if (GetHealth() > 0)
|
||||||
Death();
|
Death();
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -123,7 +123,7 @@ func_brush::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_brush::Trigger(entity act, int state)
|
func_brush::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
/* collision */
|
/* collision */
|
||||||
switch (m_iSolidity) {
|
switch (m_iSolidity) {
|
||||||
|
|
|
@ -117,7 +117,7 @@ public:
|
||||||
virtual void MoveAway(void);
|
virtual void MoveAway(void);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void Blocked(entity);
|
virtual void Blocked(entity);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void DeathTrigger(void);
|
virtual void DeathTrigger(void);
|
||||||
virtual void PlayerUse(void);
|
virtual void PlayerUse(void);
|
||||||
virtual void SetMovementDirection(void);
|
virtual void SetMovementDirection(void);
|
||||||
|
@ -412,7 +412,7 @@ func_button::MoveAway(void)
|
||||||
|
|
||||||
/* TODO: Handle state */
|
/* TODO: Handle state */
|
||||||
void
|
void
|
||||||
func_button::Trigger(entity act, int state)
|
func_button::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -45,7 +45,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void SetMovementDirection(void);
|
virtual void SetMovementDirection(void);
|
||||||
virtual void Input(entity, string, string);
|
virtual void Input(entity, string, string);
|
||||||
|
@ -143,7 +143,7 @@ func_conveyor::Touch(entity eToucher)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_conveyor::Trigger(entity act, int state)
|
func_conveyor::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_ON:
|
case TRIG_ON:
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
virtual void Arrived(void);
|
virtual void Arrived(void);
|
||||||
virtual void Returned(void);
|
virtual void Returned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity, int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Blocked(entity);
|
virtual void Blocked(entity);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void PlayerUse(void);
|
virtual void PlayerUse(void);
|
||||||
|
@ -560,7 +560,7 @@ func_door::MoveAway(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_door::Trigger(entity act, int triggerstate)
|
func_door::Trigger(entity act, triggermode_t triggerstate)
|
||||||
{
|
{
|
||||||
if (GetMaster() == 0)
|
if (GetMaster() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -104,7 +104,7 @@ public:
|
||||||
virtual void Returned(void);
|
virtual void Returned(void);
|
||||||
virtual void Back(void);
|
virtual void Back(void);
|
||||||
virtual void Away(void);
|
virtual void Away(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Use(void);
|
virtual void Use(void);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void Blocked(entity);
|
virtual void Blocked(entity);
|
||||||
|
@ -506,7 +506,7 @@ func_door_rotating::Away(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_door_rotating::Trigger(entity act, int state)
|
func_door_rotating::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE) {
|
if (GetMaster() == FALSE) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Death(void);
|
virtual void Death(void);
|
||||||
|
|
||||||
virtual void NextPath(void);
|
virtual void NextPath(void);
|
||||||
|
@ -227,7 +227,7 @@ func_guntarget::Stop(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_guntarget::Trigger(entity act, int state)
|
func_guntarget::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@ func_mortar_field::FireControlled(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_mortar_field::Trigger(entity act, int state)
|
func_mortar_field::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (m_iType) {
|
switch (m_iType) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void customphysics(void);
|
virtual void customphysics(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -141,7 +141,7 @@ func_pendulum::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_pendulum::Trigger(entity act, int state)
|
func_pendulum::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
|
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
@ -179,7 +179,7 @@ func_plat::MoveToggle(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_plat::Trigger(entity act, int state)
|
func_plat::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (HasSpawnFlags(FNCPLAT_TRIGGER))
|
if (HasSpawnFlags(FNCPLAT_TRIGGER))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
|
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
@ -222,7 +222,7 @@ func_platrot::MoveToggle(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_platrot::Trigger(entity act, int state)
|
func_platrot::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (HasSpawnFlags(FNCPLAT_TRIGGER))
|
if (HasSpawnFlags(FNCPLAT_TRIGGER))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -79,7 +79,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void Rotate(void);
|
virtual void Rotate(void);
|
||||||
virtual void Blocked(entity);
|
virtual void Blocked(entity);
|
||||||
|
@ -171,7 +171,7 @@ func_rotating::Respawn(void)
|
||||||
|
|
||||||
/* TODO: Handle state */
|
/* TODO: Handle state */
|
||||||
void
|
void
|
||||||
func_rotating::Trigger(entity act, int state)
|
func_rotating::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (vlen(avelocity) > 0) {
|
if (vlen(avelocity) > 0) {
|
||||||
ClearVelocity();
|
ClearVelocity();
|
||||||
|
|
|
@ -69,7 +69,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void SoundMove(void);
|
virtual void SoundMove(void);
|
||||||
virtual void SoundStop(void);
|
virtual void SoundStop(void);
|
||||||
|
@ -351,7 +351,7 @@ func_tracktrain::PathNext(void)
|
||||||
|
|
||||||
/* TODO: Handle state? */
|
/* TODO: Handle state? */
|
||||||
void
|
void
|
||||||
func_tracktrain::Trigger(entity act, int state)
|
func_tracktrain::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
PathMove();
|
PathMove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void SoundMove(void);
|
virtual void SoundMove(void);
|
||||||
virtual void SoundStop(void);
|
virtual void SoundStop(void);
|
||||||
|
@ -304,7 +304,7 @@ func_train::PathNext(void)
|
||||||
|
|
||||||
/* TODO: Handle state? */
|
/* TODO: Handle state? */
|
||||||
void
|
void
|
||||||
func_train::Trigger(entity act, int state)
|
func_train::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
PathMove();
|
PathMove();
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,7 +44,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Input(entity,string,string);
|
virtual void Input(entity,string,string);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -97,7 +97,7 @@ func_wall_toggle::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_wall_toggle::Trigger(entity act, int state)
|
func_wall_toggle::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ game_counter::GetCount(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
game_counter::Trigger(entity act, int state)
|
game_counter::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
|
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
|
@ -96,7 +96,7 @@ game_counter_set::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
game_counter_set::Trigger(entity act, int state)
|
game_counter_set::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
|
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
virtual void SpawnUnit(string,vector);
|
virtual void SpawnUnit(string,vector);
|
||||||
|
@ -136,7 +136,7 @@ game_player_equip::SpawnUnit(string cname, vector org)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
game_player_equip::Trigger(entity act, int state)
|
game_player_equip::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
int total, i, count, x;
|
int total, i, count, x;
|
||||||
string cname;
|
string cname;
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ game_text::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
game_text::Trigger(entity act, int state)
|
game_text::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||||
WriteByte(MSG_MULTICAST, EV_TEXT);
|
WriteByte(MSG_MULTICAST, EV_TEXT);
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ infodecal::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
infodecal::Trigger(entity act, int state)
|
infodecal::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void RestoreComplete(void);
|
virtual void RestoreComplete(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ light::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
light::Trigger(entity act, int state)
|
light::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -64,7 +64,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void Spawner(void);
|
virtual void Spawner(void);
|
||||||
virtual void TurnOn(void);
|
virtual void TurnOn(void);
|
||||||
|
@ -263,7 +263,7 @@ monstermaker::Spawner(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
monstermaker::Trigger(entity act, int state)
|
monstermaker::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -101,7 +101,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -287,7 +287,7 @@ multi_manager::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
multi_manager::Trigger(entity act, int state)
|
multi_manager::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
static void mm_enttrigger (void) {
|
static void mm_enttrigger (void) {
|
||||||
multi_manager_sub wow = (multi_manager_sub)self;
|
multi_manager_sub wow = (multi_manager_sub)self;
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual int QueryTargets(void);
|
virtual int QueryTargets(void);
|
||||||
virtual int GetValue(void);
|
virtual int GetValue(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ multisource::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
multisource::Trigger(entity act, int unused)
|
multisource::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
if (QueryTargets() == FALSE) {
|
if (QueryTargets() == FALSE) {
|
||||||
NSLog("[^1MULTISOURCE^7] %s is inactive.", targetname);
|
NSLog("[^1MULTISOURCE^7] %s is inactive.", targetname);
|
||||||
|
|
|
@ -61,7 +61,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ path_corner::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
path_corner::Trigger(entity act, int state)
|
path_corner::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
entity a;
|
entity a;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void ReloadSave(void);
|
virtual void ReloadSave(void);
|
||||||
|
|
||||||
|
@ -121,7 +121,7 @@ player_loadsaved::ReloadSave(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player_loadsaved::Trigger(entity act, int unused)
|
player_loadsaved::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||||
WriteByte(MSG_MULTICAST, EV_FADE);
|
WriteByte(MSG_MULTICAST, EV_FADE);
|
||||||
|
|
|
@ -30,7 +30,7 @@ player_weaponstrip:NSPointTrigger
|
||||||
public:
|
public:
|
||||||
void player_weaponstrip(void);
|
void player_weaponstrip(void);
|
||||||
|
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -39,7 +39,7 @@ player_weaponstrip::player_weaponstrip(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
player_weaponstrip::Trigger(entity act, int unused)
|
player_weaponstrip::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
NSClientPlayer pl;
|
NSClientPlayer pl;
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void PlaySample(void);
|
virtual void PlaySample(void);
|
||||||
virtual void Enable(void);
|
virtual void Enable(void);
|
||||||
|
@ -130,7 +130,7 @@ random_speaker::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
random_speaker::Trigger(entity act, int state)
|
random_speaker::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ random_trigger::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
random_trigger::Trigger(entity act, int state)
|
random_trigger::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
float r;
|
float r;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ scripted_sentence::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
scripted_sentence::Trigger(entity act, int unused)
|
scripted_sentence::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
entity spe;
|
entity spe;
|
||||||
spe = find(world, ::targetname, m_strSpeaker);
|
spe = find(world, ::targetname, m_strSpeaker);
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
/* overrides */
|
/* overrides */
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
|
@ -315,7 +315,7 @@ scripted_sequence::RunOnEntity(entity targ)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
scripted_sequence::Trigger(entity act, int unused)
|
scripted_sequence::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
NSMonster f;
|
NSMonster f;
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
virtual void Announce(void);
|
virtual void Announce(void);
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ speaker::Announce(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
speaker::Trigger(entity eAct, int foo)
|
speaker::Trigger(entity eAct, triggermode_t foo)
|
||||||
{
|
{
|
||||||
ScheduleThink(Announce, 0.0f);
|
ScheduleThink(Announce, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ targ_speaker::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
targ_speaker::Trigger(entity act, int state)
|
targ_speaker::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -37,7 +37,7 @@ This entity was introduced in Half-Life (1998).
|
||||||
class
|
class
|
||||||
trigger_auto:NSPointTrigger
|
trigger_auto:NSPointTrigger
|
||||||
{
|
{
|
||||||
int m_iTriggerState;
|
triggermode_t m_iTriggerState;
|
||||||
float m_flDelay;
|
float m_flDelay;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -66,7 +66,7 @@ void
|
||||||
trigger_auto::Save(float handle)
|
trigger_auto::Save(float handle)
|
||||||
{
|
{
|
||||||
super::Save(handle);
|
super::Save(handle);
|
||||||
SaveInt(handle, "m_iTriggerState", m_iTriggerState);
|
SaveFloat(handle, "m_iTriggerState", m_iTriggerState);
|
||||||
SaveFloat(handle, "m_flDelay", m_flDelay);
|
SaveFloat(handle, "m_flDelay", m_flDelay);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ trigger_auto::Restore(string strKey, string strValue)
|
||||||
{
|
{
|
||||||
switch (strKey) {
|
switch (strKey) {
|
||||||
case "m_iTriggerState":
|
case "m_iTriggerState":
|
||||||
m_iTriggerState = ReadInt(strValue);
|
m_iTriggerState = ReadFloat(strValue);
|
||||||
break;
|
break;
|
||||||
case "m_flDelay":
|
case "m_flDelay":
|
||||||
m_flDelay = ReadFloat(strValue);
|
m_flDelay = ReadFloat(strValue);
|
||||||
|
@ -88,7 +88,7 @@ trigger_auto::Restore(string strKey, string strValue)
|
||||||
void
|
void
|
||||||
trigger_auto::RestoreComplete(void)
|
trigger_auto::RestoreComplete(void)
|
||||||
{
|
{
|
||||||
ScheduleThink(Processing, 0.25f);
|
//ScheduleThink(Processing, 0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -96,7 +96,7 @@ trigger_auto::SpawnKey(string strKey, string strValue)
|
||||||
{
|
{
|
||||||
switch (strKey) {
|
switch (strKey) {
|
||||||
case "triggerstate":
|
case "triggerstate":
|
||||||
m_iTriggerState = stoi(strValue);
|
m_iTriggerState = stof(strValue);
|
||||||
break;
|
break;
|
||||||
case "delay":
|
case "delay":
|
||||||
m_flDelay = stof(strValue);
|
m_flDelay = stof(strValue);
|
||||||
|
@ -111,22 +111,42 @@ trigger_auto::Respawn(void)
|
||||||
{
|
{
|
||||||
InitPointTrigger();
|
InitPointTrigger();
|
||||||
|
|
||||||
/* deliberately add a bit more time in case we're first in the ent-lump */
|
/* deliberately add a bit more time in case we're first in the ent-lump
|
||||||
ScheduleThink(Processing, 0.25f);
|
also we'll only do this in multiplayer games. SP games will call
|
||||||
|
trigger_auto_trigger() for when one player has fully joined */
|
||||||
|
if (cvar("sv_playerslots") > 1)
|
||||||
|
ScheduleThink(Processing, 0.25f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_auto::Processing(void)
|
trigger_auto::Processing(void)
|
||||||
{
|
{
|
||||||
if (m_strGlobalState)
|
if (m_strGlobalState) {
|
||||||
if (GetGlobalValue(m_strGlobalState) == 0)
|
if (GetGlobalValue(m_strGlobalState) == 0)
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
UseTargets(this, m_iTriggerState, m_flDelay);
|
UseTargets(this, m_iTriggerState, m_flDelay);
|
||||||
print(sprintf("%S %i %f\n", target, m_iTriggerState, m_flDelay));
|
print(sprintf("%S %d %f %f\n", target, m_iTriggerState, m_flDelay, time));
|
||||||
|
|
||||||
if (HasSpawnFlags(1)) {
|
if (HasSpawnFlags(1)) {
|
||||||
NSLog("^2trigger_auto::^3Processing^7: %s triggerer removed self", target);
|
NSLog("^2trigger_auto::^3Processing^7: %s triggerer removed self", target);
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
trigger_auto_trigger(void)
|
||||||
|
{
|
||||||
|
static bool called = false;
|
||||||
|
trigger_auto loop;
|
||||||
|
|
||||||
|
/* don't do it more than once */
|
||||||
|
if (called)
|
||||||
|
return;
|
||||||
|
|
||||||
|
for (loop = __NULL__; (loop = (trigger_auto)find(loop, ::classname, "trigger_auto"));) {
|
||||||
|
loop.Processing();
|
||||||
|
}
|
||||||
|
called = true;
|
||||||
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -88,7 +88,7 @@ trigger_cdaudio::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_cdaudio::Trigger(entity act, int unused)
|
trigger_cdaudio::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
if (!(act.flags & FL_CLIENT)) {
|
if (!(act.flags & FL_CLIENT)) {
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -89,7 +89,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Input(entity,string,string);
|
virtual void Input(entity,string,string);
|
||||||
|
|
||||||
virtual void Change(void);
|
virtual void Change(void);
|
||||||
|
@ -249,7 +249,7 @@ trigger_changelevel::Change(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_changelevel::Trigger(entity act, int unused)
|
trigger_changelevel::Trigger(entity act, triggermode_t unused)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ trigger_changetarget::SpawnKey(string strKey, string strValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_changetarget::Trigger(entity act, int state)
|
trigger_changetarget::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
NSEntity f;
|
NSEntity f;
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -105,7 +105,7 @@ trigger_counter::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_counter::Trigger(entity act, int state)
|
trigger_counter::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (act.classname == "func_pushable" && !HasSpawnFlags(TRCNT_PUSHABLES))
|
if (act.classname == "func_pushable" && !HasSpawnFlags(TRCNT_PUSHABLES))
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -31,7 +31,7 @@ trigger_endsection:NSBrushTrigger
|
||||||
public:
|
public:
|
||||||
void trigger_endsection(void);
|
void trigger_endsection(void);
|
||||||
|
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,7 @@ trigger_endsection::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_endsection::Trigger(entity act, int state)
|
trigger_endsection::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
@ -194,7 +194,7 @@ trigger_hurt::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_hurt::Trigger(entity act, int state)
|
trigger_hurt::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -43,9 +43,9 @@ class trigger_once:NSBrushTrigger
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
void trigger_once(void);
|
void trigger_once(void);
|
||||||
|
|
||||||
|
/* overrides */
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
|
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
|
@ -64,6 +64,25 @@ trigger_once::trigger_once(void)
|
||||||
m_strOnTrigger = __NULL__;
|
m_strOnTrigger = __NULL__;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
trigger_once::Spawned(void)
|
||||||
|
{
|
||||||
|
super::Spawned();
|
||||||
|
|
||||||
|
if (m_strOnTrigger)
|
||||||
|
m_strOnTrigger = CreateOutput(m_strOnTrigger);
|
||||||
|
|
||||||
|
if (m_strOnStartTouch)
|
||||||
|
m_strOnStartTouch = CreateOutput(m_strOnStartTouch);
|
||||||
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
trigger_once::Respawn(void)
|
||||||
|
{
|
||||||
|
InitBrushTrigger();
|
||||||
|
m_iValue = 0;
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_once::Save(float handle)
|
trigger_once::Save(float handle)
|
||||||
{
|
{
|
||||||
|
@ -102,26 +121,6 @@ trigger_once::SpawnKey(string strKey, string strValue)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
trigger_once::Spawned(void)
|
|
||||||
{
|
|
||||||
super::Spawned();
|
|
||||||
|
|
||||||
if (m_strOnTrigger)
|
|
||||||
m_strOnTrigger = CreateOutput(m_strOnTrigger);
|
|
||||||
|
|
||||||
if (m_strOnStartTouch)
|
|
||||||
m_strOnStartTouch = CreateOutput(m_strOnStartTouch);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
trigger_once::Respawn(void)
|
|
||||||
{
|
|
||||||
InitBrushTrigger();
|
|
||||||
m_iValue = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_once::Touch(entity eToucher)
|
trigger_once::Touch(entity eToucher)
|
||||||
{
|
{
|
||||||
|
|
|
@ -37,7 +37,7 @@ public:
|
||||||
void trigger_playerfreeze(void);
|
void trigger_playerfreeze(void);
|
||||||
|
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void customphysics(void);
|
virtual void customphysics(void);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ trigger_playerfreeze::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_playerfreeze::Trigger(entity act, int state)
|
trigger_playerfreeze::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (GetMaster() == FALSE)
|
if (GetMaster() == FALSE)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity,triggermode_t);
|
||||||
virtual void Touch(entity);
|
virtual void Touch(entity);
|
||||||
virtual void SetMovementDirection(void);
|
virtual void SetMovementDirection(void);
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ trigger_push::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_push::Trigger(entity act, int state)
|
trigger_push::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -41,13 +41,13 @@ class
|
||||||
trigger_relay:NSPointTrigger
|
trigger_relay:NSPointTrigger
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
int m_iTriggerState;
|
triggermode_t m_iTriggerState;
|
||||||
int m_iEnabled;
|
int m_iEnabled;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void trigger_relay(void);
|
void trigger_relay(void);
|
||||||
|
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity,triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ public:
|
||||||
void
|
void
|
||||||
trigger_relay::trigger_relay(void)
|
trigger_relay::trigger_relay(void)
|
||||||
{
|
{
|
||||||
m_iTriggerState =
|
m_iTriggerState = 0;
|
||||||
m_iEnabled = 0;
|
m_iEnabled = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void
|
||||||
trigger_relay::Save(float handle)
|
trigger_relay::Save(float handle)
|
||||||
{
|
{
|
||||||
super::Save(handle);
|
super::Save(handle);
|
||||||
SaveInt(handle, "m_iTriggerState", m_iTriggerState);
|
SaveFloat(handle, "m_iTriggerState", m_iTriggerState);
|
||||||
SaveInt(handle, "m_iEnabled", m_iEnabled);
|
SaveInt(handle, "m_iEnabled", m_iEnabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ trigger_relay::Restore(string strKey, string strValue)
|
||||||
{
|
{
|
||||||
switch (strKey) {
|
switch (strKey) {
|
||||||
case "m_iTriggerState":
|
case "m_iTriggerState":
|
||||||
m_iTriggerState = ReadInt(strValue);
|
m_iTriggerState = ReadFloat(strValue);
|
||||||
break;
|
break;
|
||||||
case "m_iEnabled":
|
case "m_iEnabled":
|
||||||
m_iEnabled = ReadInt(strValue);
|
m_iEnabled = ReadInt(strValue);
|
||||||
|
@ -101,15 +101,22 @@ void
|
||||||
trigger_relay::Respawn(void)
|
trigger_relay::Respawn(void)
|
||||||
{
|
{
|
||||||
m_iEnabled = TRUE;
|
m_iEnabled = TRUE;
|
||||||
|
m_iValue = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
trigger_relay::Trigger(entity act, int state)
|
trigger_relay::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (m_iEnabled == FALSE)
|
if (m_iEnabled == FALSE) {
|
||||||
|
NSLog("trigger_relay (%s) has already been triggered", targetname);
|
||||||
return;
|
return;
|
||||||
if (HasSpawnFlags(TRLY_ONCE))
|
}
|
||||||
m_iEnabled = FALSE;
|
|
||||||
|
|
||||||
|
if (HasSpawnFlags(TRLY_ONCE)) {
|
||||||
|
m_iEnabled = FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
m_iValue = TRUE;
|
||||||
|
NSLog("trigger_relay (%s) will trigger %s with state %d", targetname, target, m_iTriggerState);
|
||||||
UseTargets(act, m_iTriggerState, m_flDelay);
|
UseTargets(act, m_iTriggerState, m_flDelay);
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,8 +74,8 @@ public:
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void UseNormal(entity,int);
|
virtual void UseNormal(entity,triggermode_t);
|
||||||
virtual void UseLoop(entity,int);
|
virtual void UseLoop(entity, triggermode_t);
|
||||||
#else
|
#else
|
||||||
virtual void ReceiveEntity(float,float);
|
virtual void ReceiveEntity(float,float);
|
||||||
virtual float predraw(void);
|
virtual float predraw(void);
|
||||||
|
@ -258,7 +258,7 @@ ambient_generic::Respawn(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ambient_generic::UseNormal(entity act, int state)
|
ambient_generic::UseNormal(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
NSLog("Sound once: %S Volume: %f; Radius: %d; Pitch: %d", \
|
NSLog("Sound once: %S Volume: %f; Radius: %d; Pitch: %d", \
|
||||||
m_strActivePath, m_flVolume, m_flRadius, m_flPitch);
|
m_strActivePath, m_flVolume, m_flRadius, m_flPitch);
|
||||||
|
@ -280,7 +280,7 @@ ambient_generic::UseNormal(entity act, int state)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ambient_generic::UseLoop(entity act, int state)
|
ambient_generic::UseLoop(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (m_bToggle == TRUE) {
|
if (m_bToggle == TRUE) {
|
||||||
NSLog("^2ambient_generic::^3UseLoop^7: %s stops `%s`",
|
NSLog("^2ambient_generic::^3UseLoop^7: %s stops `%s`",
|
||||||
|
@ -311,12 +311,12 @@ ambient_generic::EvaluateEntity(void)
|
||||||
if (ATTR_CHANGED(m_bLoops))
|
if (ATTR_CHANGED(m_bLoops))
|
||||||
SetSendFlags(AMBIENT_ENABLED);
|
SetSendFlags(AMBIENT_ENABLED);
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(m_strActivePath);
|
SAVE_STATE(m_strActivePath)
|
||||||
SAVE_STATE(m_flVolume);
|
SAVE_STATE(m_flVolume)
|
||||||
SAVE_STATE(m_flRadius);
|
SAVE_STATE(m_flRadius)
|
||||||
SAVE_STATE(m_flPitch);
|
SAVE_STATE(m_flPitch)
|
||||||
SAVE_STATE(m_bLoops);
|
SAVE_STATE(m_bLoops)
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
|
|
|
@ -85,7 +85,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
nonvirtual void CastLaser(void);
|
nonvirtual void CastLaser(void);
|
||||||
nonvirtual void LaunchBeam(void);
|
nonvirtual void LaunchBeam(void);
|
||||||
nonvirtual void EndBeam(void);
|
nonvirtual void EndBeam(void);
|
||||||
|
@ -258,7 +258,7 @@ env_beam::StopBeam(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_beam::Trigger(entity act, int state)
|
env_beam::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
/* if toggle isn't enabled, it can only ever get activated */
|
/* if toggle isn't enabled, it can only ever get activated */
|
||||||
if (m_flLifeTime > 0 && HasSpawnFlags(BEAM_TOGGLE) == false) {
|
if (m_flLifeTime > 0 && HasSpawnFlags(BEAM_TOGGLE) == false) {
|
||||||
|
@ -429,10 +429,10 @@ env_beam::predraw(void)
|
||||||
{
|
{
|
||||||
/* only draw when active. */
|
/* only draw when active. */
|
||||||
if (!m_iActive)
|
if (!m_iActive)
|
||||||
return;
|
return (PREDRAW_NEXT);
|
||||||
|
|
||||||
if (autocvar(r_skipBeams, 0))
|
if (autocvar(r_skipBeams, 0))
|
||||||
return;
|
return (PREDRAW_NEXT);
|
||||||
|
|
||||||
/* primitive representation */
|
/* primitive representation */
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -452,7 +452,6 @@ env_beam::predraw(void)
|
||||||
float progression = (i / (BEAM_COUNT-1));
|
float progression = (i / (BEAM_COUNT-1));
|
||||||
vector point;
|
vector point;
|
||||||
vector jitter;
|
vector jitter;
|
||||||
float strength;
|
|
||||||
float a = 1.0f;
|
float a = 1.0f;
|
||||||
|
|
||||||
/* our steps from a - b */
|
/* our steps from a - b */
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Input(entity,string,string);
|
virtual void Input(entity,string,string);
|
||||||
#else
|
#else
|
||||||
virtual void EmitBubbles(void);
|
virtual void EmitBubbles(void);
|
||||||
|
@ -167,7 +167,7 @@ env_bubbles::Input(entity eAct, string strKey, string strData)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_bubbles::Trigger(entity eAct, int iState)
|
env_bubbles::Trigger(entity eAct, triggermode_t iState)
|
||||||
{
|
{
|
||||||
switch (iState) {
|
switch (iState) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
@ -196,12 +196,12 @@ env_bubbles::EvaluateEntity(void)
|
||||||
if (ATTR_CHANGED(m_bEnabled))
|
if (ATTR_CHANGED(m_bEnabled))
|
||||||
SetSendFlags(BUBBLES_ENABLED);
|
SetSendFlags(BUBBLES_ENABLED);
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
SAVE_STATE(m_iDensity);
|
SAVE_STATE(m_iDensity)
|
||||||
SAVE_STATE(m_flFrequency);
|
SAVE_STATE(m_flFrequency)
|
||||||
SAVE_STATE(m_flCurrent);
|
SAVE_STATE(m_flCurrent)
|
||||||
SAVE_STATE(m_bEnabled);
|
SAVE_STATE(m_bEnabled)
|
||||||
}
|
}
|
||||||
float
|
float
|
||||||
env_bubbles::SendEntity(entity ePVSent, float flChanged)
|
env_bubbles::SendEntity(entity ePVSent, float flChanged)
|
||||||
|
|
|
@ -109,7 +109,7 @@ public:
|
||||||
#else
|
#else
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void Save(float);
|
virtual void Save(float);
|
||||||
virtual void Restore(string,string);
|
virtual void Restore(string,string);
|
||||||
|
@ -303,19 +303,19 @@ env_fog_controller::EvaluateEntity(void)
|
||||||
if (ATTR_CHANGED(m_vecFogDir))
|
if (ATTR_CHANGED(m_vecFogDir))
|
||||||
SetSendFlags(ENVFOG_CHANGED_DIR);
|
SetSendFlags(ENVFOG_CHANGED_DIR);
|
||||||
|
|
||||||
SAVE_STATE(m_iFogActive);
|
SAVE_STATE(m_iFogActive)
|
||||||
SAVE_STATE(m_iFogBlend);
|
SAVE_STATE(m_iFogBlend)
|
||||||
SAVE_STATE(m_flFogStart);
|
SAVE_STATE(m_flFogStart)
|
||||||
SAVE_STATE(m_flFogEnd);
|
SAVE_STATE(m_flFogEnd)
|
||||||
SAVE_STATE(m_flFogMaxDensity);
|
SAVE_STATE(m_flFogMaxDensity)
|
||||||
SAVE_STATE(m_flFogFarZ);
|
SAVE_STATE(m_flFogFarZ)
|
||||||
SAVE_STATE(m_vecFogColor);
|
SAVE_STATE(m_vecFogColor)
|
||||||
SAVE_STATE(m_vecFogColor2);
|
SAVE_STATE(m_vecFogColor2)
|
||||||
SAVE_STATE(m_vecFogDir);
|
SAVE_STATE(m_vecFogDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_fog_controller::Trigger(entity eAct, int iState)
|
env_fog_controller::Trigger(entity eAct, triggermode_t iState)
|
||||||
{
|
{
|
||||||
switch (iState) {
|
switch (iState) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -73,7 +73,7 @@ public:
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
nonvirtual void CastLaser(void);
|
nonvirtual void CastLaser(void);
|
||||||
#else
|
#else
|
||||||
virtual float predraw(void);
|
virtual float predraw(void);
|
||||||
|
@ -176,7 +176,7 @@ env_laser::CastLaser(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_laser::Trigger(entity act, int state)
|
env_laser::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
@ -317,10 +317,10 @@ env_laser::predraw(void)
|
||||||
{
|
{
|
||||||
/* only draw when active. */
|
/* only draw when active. */
|
||||||
if (!m_iActive)
|
if (!m_iActive)
|
||||||
return;
|
return (PREDRAW_NEXT);
|
||||||
|
|
||||||
if (autocvar(r_skipBeams, 0))
|
if (autocvar(r_skipBeams, 0))
|
||||||
return;
|
return (PREDRAW_NEXT);
|
||||||
|
|
||||||
/* primitive representation */
|
/* primitive representation */
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -340,7 +340,6 @@ env_laser::predraw(void)
|
||||||
float progression = (i / (LASER_COUNT-1));
|
float progression = (i / (LASER_COUNT-1));
|
||||||
vector point;
|
vector point;
|
||||||
vector jitter;
|
vector jitter;
|
||||||
float strength;
|
|
||||||
float a = 1.0f;
|
float a = 1.0f;
|
||||||
|
|
||||||
/* our steps from a - b */
|
/* our steps from a - b */
|
||||||
|
|
|
@ -84,7 +84,7 @@ public:
|
||||||
virtual void ReceiveEntity(float,float);
|
virtual void ReceiveEntity(float,float);
|
||||||
virtual float predraw(void);
|
virtual float predraw(void);
|
||||||
#else
|
#else
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
@ -166,12 +166,12 @@ env_projectedtexture::EvaluateEntity(void)
|
||||||
|
|
||||||
SetSendFlags(PRTEXFL_CHANGED_ANGLES);
|
SetSendFlags(PRTEXFL_CHANGED_ANGLES);
|
||||||
}
|
}
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
env_projectedtexture::Trigger(entity act, int state)
|
env_projectedtexture::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
virtual void Spawned(void);
|
virtual void Spawned(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
|
@ -125,15 +125,15 @@ env_sprite::EvaluateEntity(void)
|
||||||
SetSendFlags(SPRITE_CHANGED_MATERIAL);
|
SetSendFlags(SPRITE_CHANGED_MATERIAL);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(modelindex);
|
SAVE_STATE(modelindex)
|
||||||
SAVE_STATE(m_flFramerate);
|
SAVE_STATE(m_flFramerate)
|
||||||
SAVE_STATE(scale);
|
SAVE_STATE(scale)
|
||||||
SAVE_STATE(m_iRenderMode);
|
SAVE_STATE(m_iRenderMode)
|
||||||
SAVE_STATE(m_iRenderFX);
|
SAVE_STATE(m_iRenderFX)
|
||||||
SAVE_STATE(m_vecRenderColor);
|
SAVE_STATE(m_vecRenderColor)
|
||||||
SAVE_STATE(m_flRenderAmt);
|
SAVE_STATE(m_flRenderAmt)
|
||||||
SAVE_STATE(m_strMaterial);
|
SAVE_STATE(m_strMaterial)
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
|
@ -213,7 +213,7 @@ env_sprite::NetworkOnce(void)
|
||||||
|
|
||||||
/* TODO: Implement state */
|
/* TODO: Implement state */
|
||||||
void
|
void
|
||||||
env_sprite::Trigger(entity act, int state)
|
env_sprite::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
if (HasSpawnFlags(ENVS_PLAYONCE)) {
|
if (HasSpawnFlags(ENVS_PLAYONCE)) {
|
||||||
NetworkOnce();
|
NetworkOnce();
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
#else
|
#else
|
||||||
virtual void Init(void);
|
virtual void Init(void);
|
||||||
#endif
|
#endif
|
||||||
|
@ -56,7 +56,7 @@ func_illusionary::SendEntity(entity pvsent, float fl)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_illusionary::Trigger(entity act, int state)
|
func_illusionary::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -33,14 +33,14 @@ public:
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
virtual void Trigger(entity, int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
void
|
void
|
||||||
func_ladder::Trigger(entity act, int state)
|
func_ladder::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -99,7 +99,7 @@ public:
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Input(entity, string, string);
|
virtual void Input(entity, string, string);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -225,7 +225,7 @@ func_monitor::EvaluateEntity(void)
|
||||||
if (ATTR_CHANGED(origin)) {
|
if (ATTR_CHANGED(origin)) {
|
||||||
SetSendFlags(MONITORFL_CHANGED_BASE);
|
SetSendFlags(MONITORFL_CHANGED_BASE);
|
||||||
}
|
}
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
|
|
||||||
/* this monitor is disabled */
|
/* this monitor is disabled */
|
||||||
if (!m_iValue)
|
if (!m_iValue)
|
||||||
|
@ -276,7 +276,7 @@ func_monitor::EvaluateEntity(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_monitor::Trigger(entity act, int state)
|
func_monitor::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -36,7 +36,7 @@ public:
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
#else
|
#else
|
||||||
virtual void Init(void);
|
virtual void Init(void);
|
||||||
#endif
|
#endif
|
||||||
|
@ -57,7 +57,7 @@ func_wall::SendEntity(entity pvsent, float fl)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
func_wall::Trigger(entity act, int state)
|
func_wall::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -67,7 +67,7 @@ public:
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Input(entity, string, string);
|
virtual void Input(entity, string, string);
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -172,12 +172,12 @@ info_particle_system::EvaluateEntity(void)
|
||||||
SetSendFlags(PARTSYSFL_CHANGED_ANGLES);
|
SetSendFlags(PARTSYSFL_CHANGED_ANGLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
info_particle_system::Trigger(entity act, int state)
|
info_particle_system::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -94,7 +94,7 @@ public:
|
||||||
virtual void RendererRestarted(void);
|
virtual void RendererRestarted(void);
|
||||||
virtual void LightChanged(float);
|
virtual void LightChanged(float);
|
||||||
#else
|
#else
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
virtual void EvaluateEntity(void);
|
virtual void EvaluateEntity(void);
|
||||||
|
@ -236,12 +236,12 @@ light_dynamic::EvaluateEntity(void)
|
||||||
SetSendFlags(DLIGHTFL_CHANGED_ANGLES);
|
SetSendFlags(DLIGHTFL_CHANGED_ANGLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
light_dynamic::Trigger(entity act, int state)
|
light_dynamic::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
switch (state) {
|
switch (state) {
|
||||||
case TRIG_OFF:
|
case TRIG_OFF:
|
||||||
|
|
|
@ -232,12 +232,12 @@ prop_rope::EvaluateEntity(void)
|
||||||
SetSendFlags(PROPROPE_CHANGED_FLAGS);
|
SetSendFlags(PROPROPE_CHANGED_FLAGS);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAVE_STATE(m_flSag);
|
SAVE_STATE(m_flSag)
|
||||||
SAVE_STATE(m_flSwingFactor);
|
SAVE_STATE(m_flSwingFactor)
|
||||||
SAVE_STATE(m_iSegments);
|
SAVE_STATE(m_iSegments)
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(m_vecTarget);
|
SAVE_STATE(m_vecTarget)
|
||||||
SAVE_STATE(flags);
|
SAVE_STATE(flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
|
|
|
@ -838,13 +838,13 @@ prop_vehicle_driveable::EvaluateEntity(void)
|
||||||
if (ATTR_CHANGED(flags))
|
if (ATTR_CHANGED(flags))
|
||||||
SetSendFlags(VEHFL_FLAGS);
|
SetSendFlags(VEHFL_FLAGS);
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
SAVE_STATE(modelindex);
|
SAVE_STATE(modelindex);
|
||||||
SAVE_STATE(velocity);
|
SAVE_STATE(velocity)
|
||||||
SAVE_STATE(m_flTurn);
|
SAVE_STATE(m_flTurn)
|
||||||
SAVE_STATE(m_eDriver);
|
SAVE_STATE(m_eDriver)
|
||||||
SAVE_STATE(flags);
|
SAVE_STATE(flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
float
|
float
|
||||||
|
|
|
@ -59,7 +59,7 @@ public:
|
||||||
#else
|
#else
|
||||||
virtual void NextPath(void);
|
virtual void NextPath(void);
|
||||||
virtual void GoToTarget(void);
|
virtual void GoToTarget(void);
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
virtual void Respawn(void);
|
virtual void Respawn(void);
|
||||||
virtual void SpawnKey(string,string);
|
virtual void SpawnKey(string,string);
|
||||||
virtual float SendEntity(entity,float);
|
virtual float SendEntity(entity,float);
|
||||||
|
@ -190,8 +190,8 @@ trigger_camera::EvaluateEntity(void)
|
||||||
SetSendFlags(OCAMFL_CHANGED_ANGLES);
|
SetSendFlags(OCAMFL_CHANGED_ANGLES);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -258,7 +258,7 @@ trigger_camera::NextPath(void)
|
||||||
|
|
||||||
/* TODO: Handle state? */
|
/* TODO: Handle state? */
|
||||||
void
|
void
|
||||||
trigger_camera::Trigger(entity act, int state)
|
trigger_camera::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
m_eLooker = act;
|
m_eLooker = act;
|
||||||
NSLog("Triggering it on %s\n", act.netname);
|
NSLog("Triggering it on %s\n", act.netname);
|
||||||
|
|
|
@ -152,6 +152,8 @@ PutClientInServer(void)
|
||||||
if (t.Trigger)
|
if (t.Trigger)
|
||||||
t.Trigger(self, TRIG_TOGGLE);
|
t.Trigger(self, TRIG_TOGGLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trigger_auto_trigger();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Run before game physics have taken place.
|
/** Run before game physics have taken place.
|
||||||
|
|
|
@ -25,6 +25,9 @@ class NSBrushTrigger:NSEntity
|
||||||
public:
|
public:
|
||||||
void NSBrushTrigger(void);
|
void NSBrushTrigger(void);
|
||||||
|
|
||||||
|
/* overrides */
|
||||||
|
virtual int GetValue(void);
|
||||||
|
|
||||||
/** Sets up a brush trigger volume based on the brush information. */
|
/** Sets up a brush trigger volume based on the brush information. */
|
||||||
virtual void InitBrushTrigger(void);
|
nonvirtual void InitBrushTrigger(void);
|
||||||
};
|
};
|
||||||
|
|
|
@ -19,6 +19,16 @@ NSBrushTrigger::NSBrushTrigger(void)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
NSBrushTrigger::GetValue(void)
|
||||||
|
{
|
||||||
|
if (GetSolid() == SOLID_NOT) {
|
||||||
|
return (1);
|
||||||
|
}
|
||||||
|
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
NSBrushTrigger::InitBrushTrigger(void)
|
NSBrushTrigger::InitBrushTrigger(void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ NSClientPlayer::IsPlayer(void)
|
||||||
bool
|
bool
|
||||||
NSClientPlayer::IsFakeSpectator(void)
|
NSClientPlayer::IsFakeSpectator(void)
|
||||||
{
|
{
|
||||||
if (GetFlags() & FL_FAKESPEC)
|
if (HasFlags(FL_FAKESPEC))
|
||||||
return (true);
|
return (true);
|
||||||
|
|
||||||
return (false);
|
return (false);
|
||||||
|
@ -199,7 +199,7 @@ NSClientPlayer::predraw(void)
|
||||||
RenderFire();
|
RenderFire();
|
||||||
|
|
||||||
/* if we're inside of a vehicle, it may want to hide or show us regardless */
|
/* if we're inside of a vehicle, it may want to hide or show us regardless */
|
||||||
if (localplayer && flags & FL_INVEHICLE) {
|
if (localplayer && HasFlags(FL_INVEHICLE)) {
|
||||||
NSVehicle veh = (NSVehicle)vehicle;
|
NSVehicle veh = (NSVehicle)vehicle;
|
||||||
|
|
||||||
if (veh)
|
if (veh)
|
||||||
|
@ -1004,7 +1004,7 @@ NSClientPlayer::InputUse_Down(void)
|
||||||
last_used = eRad;
|
last_used = eRad;
|
||||||
|
|
||||||
/* Some entities want to support Use spamming */
|
/* Some entities want to support Use spamming */
|
||||||
if (!(flags & FL_USE_RELEASED)) {
|
if (HasFlags(FL_USE_RELEASED) == false) {
|
||||||
sound(this, CHAN_ITEM, "common/wpn_select.wav", 0.25, ATTN_IDLE);
|
sound(this, CHAN_ITEM, "common/wpn_select.wav", 0.25, ATTN_IDLE);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -1023,7 +1023,7 @@ Called when we let go of the +use button
|
||||||
void
|
void
|
||||||
NSClientPlayer::InputUse_Up(void)
|
NSClientPlayer::InputUse_Up(void)
|
||||||
{
|
{
|
||||||
if (!(flags & FL_USE_RELEASED)) {
|
if (HasFlags(FL_USE_RELEASED) == false) {
|
||||||
_NSClientPlayer_unuseworkaround(last_used);
|
_NSClientPlayer_unuseworkaround(last_used);
|
||||||
last_used = world;
|
last_used = world;
|
||||||
flags |= FL_USE_RELEASED;
|
flags |= FL_USE_RELEASED;
|
||||||
|
@ -1073,7 +1073,7 @@ NSClientPlayer::Footsteps_Update(void)
|
||||||
step_time = time + 2.0f;
|
step_time = time + 2.0f;
|
||||||
} else {
|
} else {
|
||||||
/* make it so we step once we land */
|
/* make it so we step once we land */
|
||||||
if (!(GetFlags() & FL_ONGROUND) && !(GetFlags() & FL_ONLADDER)) {
|
if (HasFlags(FL_ONGROUND | FL_ONLADDER) == false) {
|
||||||
step_time = 0.0f;
|
step_time = 0.0f;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1086,9 +1086,10 @@ NSClientPlayer::Footsteps_Update(void)
|
||||||
traceline(origin + view_ofs, origin + [0,0,-48], MOVE_NORMAL, this);
|
traceline(origin + view_ofs, origin + [0,0,-48], MOVE_NORMAL, this);
|
||||||
tex_name = getsurfacetexture(trace_ent, getsurfacenearpoint(trace_ent, trace_endpos));
|
tex_name = getsurfacetexture(trace_ent, getsurfacenearpoint(trace_ent, trace_endpos));
|
||||||
|
|
||||||
if (!(GetFlags() & FL_ONGROUND) && (!GetFlags() & FL_ONLADDER)) {
|
/* don't step in air */
|
||||||
|
if (HasFlags(FL_ONGROUND | FL_ONLADDER) == false) {
|
||||||
return;
|
return;
|
||||||
} else if (GetFlags() & FL_ONLADDER) {
|
} else if (HasFlags(FL_ONLADDER) && HasFlags(FL_ONGROUND) == false) { /* play ladder sounds */
|
||||||
if (step)
|
if (step)
|
||||||
StartSoundDef("step_ladder.left", CHAN_BODY, true);
|
StartSoundDef("step_ladder.left", CHAN_BODY, true);
|
||||||
else
|
else
|
||||||
|
@ -1097,6 +1098,8 @@ NSClientPlayer::Footsteps_Update(void)
|
||||||
/* switch between feet */
|
/* switch between feet */
|
||||||
step = 1 - step;
|
step = 1 - step;
|
||||||
return;
|
return;
|
||||||
|
} else if (HasFlags(FL_ONLADDER) && HasFlags(FL_ONGROUND)) { /* at a ladder, but not moving */
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (step) {
|
if (step) {
|
||||||
|
|
|
@ -259,6 +259,8 @@ public:
|
||||||
nonvirtual vector GetAbsoluteMaxs(void);
|
nonvirtual vector GetAbsoluteMaxs(void);
|
||||||
/** Returns a flag bitfield that the entity associates with. */
|
/** Returns a flag bitfield that the entity associates with. */
|
||||||
nonvirtual float GetFlags(void);
|
nonvirtual float GetFlags(void);
|
||||||
|
/** Returns true if the entity has the specified flags. */
|
||||||
|
nonvirtual float HasFlags(float);
|
||||||
/** Returns an absolute value of when the entity will be think again.
|
/** Returns an absolute value of when the entity will be think again.
|
||||||
Any result should be tested against `::GetTime()`. */
|
Any result should be tested against `::GetTime()`. */
|
||||||
nonvirtual float GetNextThinkTime(void);
|
nonvirtual float GetNextThinkTime(void);
|
||||||
|
|
|
@ -595,6 +595,13 @@ float NSEntity::GetFlags( void ) {
|
||||||
return ( flags );
|
return ( flags );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool NSEntity::HasFlags(float bits) {
|
||||||
|
if ( flags & bits )
|
||||||
|
return (true);
|
||||||
|
|
||||||
|
return (false);
|
||||||
|
}
|
||||||
|
|
||||||
float NSEntity::GetNextThinkTime( void ) {
|
float NSEntity::GetNextThinkTime( void ) {
|
||||||
return ( nextthink );
|
return ( nextthink );
|
||||||
}
|
}
|
||||||
|
|
|
@ -146,18 +146,18 @@ NSPhysicsEntity::EvaluateEntity(void)
|
||||||
SetSendFlags(PHYENT_CHANGED_VELOCITY);
|
SetSendFlags(PHYENT_CHANGED_VELOCITY);
|
||||||
}
|
}
|
||||||
|
|
||||||
SAVE_STATE(origin);
|
SAVE_STATE(origin)
|
||||||
SAVE_STATE(angles);
|
SAVE_STATE(angles)
|
||||||
SAVE_STATE(modelindex);
|
SAVE_STATE(modelindex)
|
||||||
SAVE_STATE(solid);
|
SAVE_STATE(solid)
|
||||||
SAVE_STATE(movetype);
|
SAVE_STATE(movetype)
|
||||||
SAVE_STATE(size);
|
SAVE_STATE(size)
|
||||||
SAVE_STATE(frame);
|
SAVE_STATE(frame)
|
||||||
SAVE_STATE(skin);
|
SAVE_STATE(skin)
|
||||||
SAVE_STATE(effects);
|
SAVE_STATE(effects)
|
||||||
SAVE_STATE(m_iBody);
|
SAVE_STATE(m_iBody)
|
||||||
SAVE_STATE(scale);
|
SAVE_STATE(scale)
|
||||||
SAVE_STATE(velocity);
|
SAVE_STATE(velocity)
|
||||||
|
|
||||||
if (ATTR_CHANGED(m_iRenderMode)) {
|
if (ATTR_CHANGED(m_iRenderMode)) {
|
||||||
SetSendFlags(PHYENT_CHANGED_RENDERMODE);
|
SetSendFlags(PHYENT_CHANGED_RENDERMODE);
|
||||||
|
|
|
@ -26,5 +26,5 @@ public:
|
||||||
void NSPointTrigger(void);
|
void NSPointTrigger(void);
|
||||||
|
|
||||||
/** Sets up a point entity trigger with no size. */
|
/** Sets up a point entity trigger with no size. */
|
||||||
virtual void InitPointTrigger(void);
|
nonvirtual void InitPointTrigger(void);
|
||||||
};
|
};
|
||||||
|
|
|
@ -31,36 +31,25 @@ typedef enum
|
||||||
GLOBAL_DEAD
|
GLOBAL_DEAD
|
||||||
} globalstate_t;
|
} globalstate_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
USE_TOGGLE,
|
||||||
|
USE_CONTINOUS
|
||||||
|
} usetype_t;
|
||||||
|
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
TRIG_OFF,
|
||||||
|
TRIG_ON,
|
||||||
|
TRIG_TOGGLE
|
||||||
|
} triggermode_t;
|
||||||
|
|
||||||
|
|
||||||
/** NSTrigger handles all the non-input as well as Legacy (Quake, GoldSource) style
|
/** NSTrigger handles all the non-input as well as Legacy (Quake, GoldSource) style
|
||||||
trigger behaviour. It also deals with masters, touches, blocking and so on.
|
trigger behaviour. It also deals with masters, touches, blocking and so on.
|
||||||
*/
|
*/
|
||||||
class NSTrigger:NSIO
|
class NSTrigger:NSIO
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
/* not needed to be saved right now */
|
|
||||||
float m_flTouchTime;
|
|
||||||
bool m_beingTouched;
|
|
||||||
entity m_eTouchLast;
|
|
||||||
|
|
||||||
nonvirtual void _TouchHandler(void);
|
|
||||||
nonvirtual void _BlockedHandler(void);
|
|
||||||
|
|
||||||
#ifdef SERVER
|
|
||||||
string m_oldstrTarget; /* needed due to trigger_changetarget */
|
|
||||||
|
|
||||||
string m_strGlobalState;
|
|
||||||
string m_strKillTarget;
|
|
||||||
string m_strMessage;
|
|
||||||
string m_strMaster;
|
|
||||||
int m_iUseType;
|
|
||||||
int m_iValue;
|
|
||||||
|
|
||||||
/* legacy trigger architecture */
|
|
||||||
float m_flDelay;
|
|
||||||
#else
|
|
||||||
float team;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void NSTrigger(void);
|
void NSTrigger(void);
|
||||||
|
|
||||||
|
@ -87,19 +76,19 @@ public:
|
||||||
virtual void Input(entity,string,string);
|
virtual void Input(entity,string,string);
|
||||||
|
|
||||||
/** Called whenever we're legacy triggered by another object or function. */
|
/** Called whenever we're legacy triggered by another object or function. */
|
||||||
virtual void Trigger(entity,int);
|
virtual void Trigger(entity, triggermode_t);
|
||||||
|
|
||||||
/** When called will trigger its legacy targets with a given delay. */
|
|
||||||
nonvirtual void UseTargets(entity,int, float);
|
|
||||||
|
|
||||||
/** Sets the legacy target for this entity. */
|
|
||||||
nonvirtual void SetTriggerTarget(string);
|
|
||||||
|
|
||||||
/* master feature */
|
/* master feature */
|
||||||
/** Returns what we will pass onto other's `::GetMaster()` calls if we're their master. */
|
/** Returns what we will pass onto other's `::GetMaster()` calls if we're their master. */
|
||||||
/* multisource overrides this, so keep virtual */
|
/* multisource overrides this, so keep virtual */
|
||||||
virtual int GetValue(void);
|
virtual int GetValue(void);
|
||||||
|
|
||||||
|
/** When called will trigger its legacy targets with a given delay. */
|
||||||
|
nonvirtual void UseTargets(entity,int,float);
|
||||||
|
|
||||||
|
/** Sets the legacy target for this entity. */
|
||||||
|
nonvirtual void SetTriggerTarget(string);
|
||||||
|
|
||||||
/** Returns whether our master allows us to be triggered. */
|
/** Returns whether our master allows us to be triggered. */
|
||||||
nonvirtual int GetMaster(void);
|
nonvirtual int GetMaster(void);
|
||||||
|
|
||||||
|
@ -120,19 +109,30 @@ public:
|
||||||
|
|
||||||
/** Retrives the team value of a given entity. */
|
/** Retrives the team value of a given entity. */
|
||||||
nonvirtual float GetTeam(void);
|
nonvirtual float GetTeam(void);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
};
|
|
||||||
|
|
||||||
enum
|
private:
|
||||||
{
|
/* not needed to be saved right now */
|
||||||
USE_TOGGLE,
|
float m_flTouchTime;
|
||||||
USE_CONTINOUS
|
bool m_beingTouched;
|
||||||
};
|
entity m_eTouchLast;
|
||||||
|
|
||||||
enum
|
nonvirtual void _TouchHandler(void);
|
||||||
{
|
nonvirtual void _BlockedHandler(void);
|
||||||
TRIG_OFF,
|
|
||||||
TRIG_ON,
|
#ifdef SERVER
|
||||||
TRIG_TOGGLE
|
string m_oldstrTarget; /* needed due to trigger_changetarget */
|
||||||
};
|
|
||||||
|
string m_strGlobalState;
|
||||||
|
string m_strKillTarget;
|
||||||
|
string m_strMessage;
|
||||||
|
string m_strMaster;
|
||||||
|
int m_iUseType;
|
||||||
|
int m_iValue;
|
||||||
|
|
||||||
|
/* legacy trigger architecture */
|
||||||
|
float m_flDelay;
|
||||||
|
#else
|
||||||
|
float team;
|
||||||
|
#endif
|
||||||
|
};
|
|
@ -36,7 +36,7 @@ NSTrigger::NSTrigger(void)
|
||||||
#ifdef SERVER
|
#ifdef SERVER
|
||||||
/* legacy trigger architecture */
|
/* legacy trigger architecture */
|
||||||
void
|
void
|
||||||
NSTrigger::Trigger(entity act, int state)
|
NSTrigger::Trigger(entity act, triggermode_t state)
|
||||||
{
|
{
|
||||||
NSLog("^2%s::^3Input^7: Triggerd by %s with no consequence",
|
NSLog("^2%s::^3Input^7: Triggerd by %s with no consequence",
|
||||||
classname, act.classname);
|
classname, act.classname);
|
||||||
|
|
Loading…
Reference in New Issue