6 .float targetfactor, target2factor, target3factor, target4factor;
7 .vector targetnormal, target2normal, target3normal, target4normal;
9 vector func_vectormamamam_origin(
entity o,
float timestep)
13 int myflags = o.spawnflags;
19 p = e.origin + timestep * e.velocity;
21 v = v + (p * o.targetnormal) * o.targetnormal * o.targetfactor;
23 v = v + (p - (p * o.targetnormal) * o.targetnormal) * o.targetfactor;
29 p = e.origin + timestep * e.velocity;
31 v = v + (p * o.target2normal) * o.target2normal * o.target2factor;
33 v = v + (p - (p * o.target2normal) * o.target2normal) * o.target2factor;
39 p = e.origin + timestep * e.velocity;
41 v = v + (p * o.target3normal) * o.target3normal * o.target3factor;
43 v = v + (p - (p * o.target3normal) * o.target3normal) * o.target3factor;
49 p = e.origin + timestep * e.velocity;
51 v = v + (p * o.target4normal) * o.target4normal * o.target4factor;
53 v = v + (p - (p * o.target4normal) * o.target4normal) * o.target4factor;
59 void func_vectormamamam_controller_think(
entity this)
65 this.
owner.velocity =
'0 0 0';
69 if(this.
owner.classname ==
"func_vectormamamam")
70 this.
owner.velocity = (this.
owner.destvec + func_vectormamamam_origin(this.
owner, VECTORMAMAMAM_TIMESTEP) - this.
owner.origin) * 10;
73 void func_vectormamamam_findtarget(
entity this)
88 objerror(
this,
"No reference entity found, so there is nothing to move. Aborting.");
90 this.
destvec = this.
origin - func_vectormamamam_origin(
this, 0);
93 controller.owner =
this;
94 controller.nextthink =
time + 1;
95 setthink(controller, func_vectormamamam_controller_think);
98 void func_vectormamamam_setactive(
entity this,
int astate)
123 void func_vectormamamam_init_for_player(
entity this,
entity player)
134 if (this.
noise !=
"")
139 if(!this.targetfactor)
140 this.targetfactor = 1;
142 if(!this.target2factor)
143 this.target2factor = 1;
145 if(!this.target3factor)
146 this.target3factor = 1;
148 if(!this.target4factor)
149 this.target4factor = 1;
151 if(this.targetnormal)
152 this.targetnormal =
normalize(this.targetnormal);
154 if(this.target2normal)
155 this.target2normal =
normalize(this.target2normal);
157 if(this.target3normal)
158 this.target3normal =
normalize(this.target3normal);
160 if(this.target4normal)
161 this.target4normal =
normalize(this.target4normal);
165 this.
message =
" was squished";
166 if(this.
dmg && (!this.message2 || this.message2 ==
""))
167 this.message2 =
"was squished by";
172 if (!InitMovingBrushTrigger(
this))
182 this.setactive = func_vectormamamam_setactive;
187 this.init_for_player = func_vectormamamam_init_for_player;
const float VECTORMAMAMAM_TIMESTEP
const int PROJECT_ON_TARGET3NORMAL
spawnfunc(info_player_attacker)
IntrusiveList g_initforplayer
#define IS_REAL_CLIENT(v)
ERASEABLE entity IL_PUSH(IntrusiveList this, entity it)
Push to tail.
const int PROJECT_ON_TARGETNORMAL
const int CH_TRIGGER_SINGLE
vector(float skel, float bonenum) _skel_get_boneabs_hidden
void SUB_NullThink(entity this)
void InitializeEntity(entity e, void(entity this) func, int order)
#define _sound(e, c, s, v, a)
const int PROJECT_ON_TARGET2NORMAL
#define new_pure(class)
purely logical entities (.origin doesn't work)
const int PROJECT_ON_TARGET4NORMAL