20 objerror(
this,
"trigger_force without a (valid) .target!\n");
28 pushdeltatime =
time - toucher.lastpushtime;
33 toucher.lastpushtime =
time;
41 float addspeed = str - toucher.velocity *
normalize(targ.origin -
this.origin);
45 toucher.velocity += accelspeed *
normalize(targ.origin -
this.origin);
49 toucher.velocity = toucher.velocity +
normalize(targ.origin -
this.origin) * str * pushdeltatime;
71 pushdeltatime =
time - toucher.lastpushtime;
76 toucher.lastpushtime =
time;
83 toucher.velocity = toucher.velocity * (this.
strength ** pushdeltatime);
104 pushdeltatime =
time - toucher.lastpushtime;
109 toucher.lastpushtime =
time;
115 setsize(
this,
'-1 -1 -1' * this.
radius,
'1 1 1' * this.
radius);
126 toucher.velocity = toucher.velocity +
normalize(toucher.origin -
this.origin) * str * pushdeltatime;
156 WriteHeader(MSG_ENTITY, ENT_CLIENT_TRIGGER_IMPULSE);
164 trigger_common_write(
this,
true);
169 void trigger_impulse_link(
entity this)
171 trigger_link(
this, trigger_impulse_send);
187 setsize(
this,
'-1 -1 -1' * this.
radius,
'1 1 1' * this.
radius);
206 this.
strength = (this.
strength ** autocvar_g_triggerimpulse_accel_power) * autocvar_g_triggerimpulse_accel_multiplier;
211 trigger_impulse_link(
this);
214 NET_HANDLE(ENT_CLIENT_TRIGGER_IMPULSE,
bool isnew)
217 this.
radius = ReadCoord();
222 trigger_common_read(
this,
true);
226 this.entremove = trigger_remove_generic;
const int IMPULSE_DIRECTIONAL_SPEEDTARGET
const float IMPULSE_DEFAULT_ACCEL_STRENGTH
#define REGISTER_NET_LINKED(id)
#define EXACTTRIGGER_TOUCH(e, t)
#define NET_HANDLE(id, param)
spawnfunc(info_player_attacker)
void trigger_impulse_touch_accel(entity this, entity toucher)
#define UNSET_ONGROUND(s)
void trigger_impulse_touch_radial(entity this, entity toucher)
void UpdateCSQCProjectile(entity e)
const float IMPULSE_DIRECTIONAL_MAX_ACCEL_FACTOR
const float IMPULSE_DEFAULT_DIRECTIONAL_STRENGTH
const float SOLID_TRIGGER
void trigger_impulse_touch_directional(entity this, entity toucher)
const float IMPULSE_MAX_PUSHDELTATIME
bool isPushable(entity e)
const int FALLOFF_LINEAR_INV
const float IMPULSE_DEFAULT_RADIAL_STRENGTH